fix: 修复工具调用被错误地发出到了消息平台上

fixes: #2060
This commit is contained in:
Soulter
2025-07-09 11:43:25 +08:00
parent 71290f0929
commit 7a9d4f0abd

View File

@@ -184,7 +184,8 @@ class LLMRequestSubStage(Stage):
await event.send(resp.data["chain"])
continue
# 对于其他情况,暂时先不处理
if resp.type == "tool_call":
continue
elif resp.type == "tool_call":
if self.streaming_response:
# 用来标记流式响应需要分节
yield MessageChain(chain=[], type="break")