# agent-fastapi **Repository Path**: apidatax/agent-fastapi ## Basic Information - **Project Name**: agent-fastapi - **Description**: 旅行规划智能体后端 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-25 - **Last Updated**: 2026-02-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 这是一个微信小程序的聊天智能体后台。 可以直接吧吧websocket入口相关的 contorllers/chat.py 注释掉 user_id = await get_current_user_ws(websocket) 问题描述 测试 websocket地址 测试数据 # ws://127.0.0.1:4000/chat/send_message # json {"sessionId":"会话id", "content":"你好"} # Authorization Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcGVuaWQiOiJvMTdnRDVrNnlWdHdNNmRNNU9xN001a05rTDIwIiwiZXhwIjoxNzcyMzI4MTQzfQ.ZlH4Oesp6v3WQ52zpWEdgjf9Kkz8pYev-gW7AbpVC00 报错信息: (看断点,是错在 start_graph.py的这个方法 async def call_llm) 接受消息 ---- >> 接受消息 ---- >> userid o17gD5k6yVtwM6dM5Oq7M5kNkL20 收到消息: {'sessionId': '会话id', 'content': '你好'} Error code: 400 - {'error': {'message': '<400> InternalError.Algo.InvalidParameter: An assistant message with "tool_calls" must be followed by tool messages responding to each "tool_call_id". The following tool_call_ids did not have response messages: message[9].role', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_parameter_error'}, 'id': 'chatcmpl-bab388a0-0438-9fe6-b28f-e704379d7db2', 'request_id': 'bab388a0-0438-9fe6-b28f-e704379d7db2'}