From cfc5c19aec24422d1da062376032488e2f1eb533 Mon Sep 17 00:00:00 2001 From: gjl <2802427218@qq.com> Date: Mon, 12 Aug 2024 13:17:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9F=A5=E8=AF=A2agentbug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mindpilot/app/chat/chat.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mindpilot/app/chat/chat.py b/src/mindpilot/app/chat/chat.py index 16635b9..84d8b37 100644 --- a/src/mindpilot/app/chat/chat.py +++ b/src/mindpilot/app/chat/chat.py @@ -112,7 +112,7 @@ async def chat( }]), tool_config: List[str] = Body([], description="工具配置", examples=[]), agent_enable: bool = Body(True, description="是否启用Agent"), - agent_name: str = Body("default", description="使用的Agent,默认为default") + agent_id: int = Body(-1, description="使用的Agent ID,默认为-1") ): """Agent 对话""" @@ -124,7 +124,7 @@ async def chat( callbacks=callbacks, configs=chat_model_config, stream=stream ) - if agent_name != "default": + if agent_id != -1: #TODO 从数据库中获取Agent相关配置 pass @@ -145,7 +145,6 @@ async def chat( chat_history = [h.to_msg_tuple() for h in _history] history_message = convert_to_messages(chat_history) - # print(history_message) task = asyncio.create_task( wrap_done(