mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-09 12:59:43 +00:00
feat(agent): Add trace for agent (#1407)
This commit is contained in:
@@ -31,9 +31,12 @@ from dbgpt.agent.expand.summary_assistant_agent import SummaryAssistantAgent
|
||||
from dbgpt.agent.plan import WrappedAWELLayoutManager
|
||||
from dbgpt.agent.resource import PluginFileLoadClient
|
||||
from dbgpt.configs.model_config import ROOT_PATH
|
||||
from dbgpt.util.tracer import initialize_tracer
|
||||
|
||||
test_plugin_dir = os.path.join(ROOT_PATH, "examples/test_files/plugins")
|
||||
|
||||
initialize_tracer("/tmp/agent_trace.jsonl", create_system_app=True)
|
||||
|
||||
|
||||
async def main():
|
||||
from dbgpt.model.proxy import OpenAILLMClient
|
||||
|
@@ -40,7 +40,7 @@ async def main():
|
||||
await user_proxy.initiate_chat(
|
||||
recipient=coder,
|
||||
reviewer=user_proxy,
|
||||
message="式计算下321 * 123等于多少", # 用python代码的方式计算下321 * 123等于多少
|
||||
message="计算下321 * 123等于多少", # 用python代码的方式计算下321 * 123等于多少
|
||||
# message="download data from https://raw.githubusercontent.com/uwdata/draco/master/data/cars.csv and plot a visualization that tells us about the relationship between weight and horsepower. Save the plot to a file. Print the fields in a dataset before visualizing it.",
|
||||
)
|
||||
## dbgpt-vis message infos
|
||||
|
@@ -28,11 +28,14 @@ from dbgpt.agent import (
|
||||
)
|
||||
from dbgpt.agent.expand.data_scientist_agent import DataScientistAgent
|
||||
from dbgpt.agent.resource import SqliteLoadClient
|
||||
from dbgpt.util.tracer import initialize_tracer
|
||||
|
||||
current_dir = os.getcwd()
|
||||
parent_dir = os.path.dirname(current_dir)
|
||||
test_plugin_dir = os.path.join(parent_dir, "test_files")
|
||||
|
||||
initialize_tracer("/tmp/agent_trace.jsonl", create_system_app=True)
|
||||
|
||||
|
||||
async def main():
|
||||
from dbgpt.model.proxy.llms.chatgpt import OpenAILLMClient
|
||||
|
Reference in New Issue
Block a user