mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-12 12:37:14 +00:00
chore: Format agent code (#1077)
This commit is contained in:
@@ -8,9 +8,9 @@ from .expand.code_assistant_agent import CodeAssistantAgent
|
||||
from .expand.dashboard_assistant_agent import DashboardAssistantAgent
|
||||
from .expand.data_scientist_agent import DataScientistAgent
|
||||
from .expand.plugin_assistant_agent import PluginAssistantAgent
|
||||
from .expand.retrieve_summary_assistant_agent import RetrieveSummaryAssistantAgent
|
||||
from .expand.sql_assistant_agent import SQLAssistantAgent
|
||||
from .expand.summary_assistant_agent import SummaryAssistantAgent
|
||||
from .expand.retrieve_summary_assistant_agent import RetrieveSummaryAssistantAgent
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@@ -2,6 +2,8 @@ import logging
|
||||
from pathlib import Path
|
||||
from typing import Callable, Dict, Literal, Optional, Union
|
||||
|
||||
# TODO
|
||||
from dbgpt.configs.model_config import PLUGINS_DIR
|
||||
from dbgpt.util.json_utils import find_json_objects
|
||||
from dbgpt.vis import VisPlugin, vis_client
|
||||
|
||||
@@ -20,9 +22,6 @@ except ImportError:
|
||||
return x
|
||||
|
||||
|
||||
# TODO
|
||||
from dbgpt.configs.model_config import PLUGINS_DIR
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@@ -1,26 +1,23 @@
|
||||
import os
|
||||
import glob
|
||||
import requests
|
||||
import logging
|
||||
import tiktoken
|
||||
import pypdf
|
||||
import asyncio
|
||||
import glob
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import pdb
|
||||
|
||||
|
||||
from typing import Callable, Dict, List, Literal, Optional, Union
|
||||
from urllib.parse import urlparse
|
||||
from typing import Callable, Dict, Literal, Optional, Union, List
|
||||
|
||||
import pypdf
|
||||
import requests
|
||||
import tiktoken
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from dbgpt.agent.agents.base_agent import ConversableAgent
|
||||
from dbgpt.agent.plugin.commands.command_mange import ApiCall
|
||||
|
||||
from dbgpt.agent.memory.gpts_memory import GptsMemory
|
||||
from dbgpt.agent.agents.agent import Agent, AgentContext
|
||||
from dbgpt.core.interface.message import ModelMessageRoleType
|
||||
|
||||
from dbgpt.agent.agents.base_agent import ConversableAgent
|
||||
from dbgpt.agent.memory.gpts_memory import GptsMemory
|
||||
from dbgpt.agent.plugin.commands.command_mange import ApiCall
|
||||
from dbgpt.configs.model_config import PILOT_PATH
|
||||
from dbgpt.core.interface.message import ModelMessageRoleType
|
||||
|
||||
try:
|
||||
from termcolor import colored
|
||||
@@ -581,7 +578,6 @@ if __name__ == "__main__":
|
||||
|
||||
from dbgpt.agent.agents.agent import AgentContext
|
||||
from dbgpt.agent.agents.user_proxy_agent import UserProxyAgent
|
||||
|
||||
from dbgpt.core.interface.llm import ModelMetadata
|
||||
from dbgpt.model import OpenAILLMClient
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
from typing import Callable, Dict, Literal, Optional, Union
|
||||
|
||||
from dbgpt.agent.agents.base_agent import ConversableAgent
|
||||
@@ -6,8 +7,6 @@ from dbgpt.core.interface.message import ModelMessageRoleType
|
||||
from ...memory.gpts_memory import GptsMemory
|
||||
from ..agent import Agent, AgentContext
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import Enum
|
||||
import dataclasses
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
|
||||
|
||||
|
@@ -1,18 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
from enum import Enum
|
||||
from datetime import datetime
|
||||
from asyncio import Queue, QueueEmpty, wait_for
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from json import JSONDecodeError
|
||||
from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
ConfigDict,
|
||||
Field,
|
||||
PrivateAttr,
|
||||
)
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, PrivateAttr
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@@ -5,10 +5,10 @@ from collections import defaultdict
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from dbgpt.util.json_utils import EnhancedJSONEncoder
|
||||
from dbgpt.vis.client import VisAgentMessages, VisAgentPlans, vis_client
|
||||
|
||||
from .base import GptsMessage, GptsMessageMemory, GptsPlansMemory
|
||||
from .default_gpts_memory import DefaultGptsMessageMemory, DefaultGptsPlansMemory
|
||||
from dbgpt.vis.client import vis_client, VisAgentMessages, VisAgentPlans
|
||||
|
||||
|
||||
class GptsMemory:
|
||||
|
Reference in New Issue
Block a user