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