Merge pull request #1992 from arc53/fix-api-answer-tool-call

fix: api answer tool call event
This commit is contained in:
Alex
2025-09-30 14:49:57 +01:00
committed by GitHub

View File

@@ -110,6 +110,8 @@ class BaseAnswerResource:
yield f"data: {data}\n\n"
elif "tool_calls" in line:
tool_calls = line["tool_calls"]
data = json.dumps({"type": "tool_calls", "tool_calls": tool_calls})
yield f"data: {data}\n\n"
elif "thought" in line:
thought += line["thought"]
data = json.dumps({"type": "thought", "thought": line["thought"]})