Browse Source

fix:查询agentbug修复

main
gjl 1 year ago
parent
commit
cfc5c19aec
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/mindpilot/app/chat/chat.py

+ 2
- 3
src/mindpilot/app/chat/chat.py View File

@@ -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(


Loading…
Cancel
Save