mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 04:17:56 +00:00
Merge pull request #1992 from arc53/fix-api-answer-tool-call
fix: api answer tool call event
This commit is contained in:
1 file changed
+2
@@ -110,6 +110,8 @@ class BaseAnswerResource:
|
|||||||
yield f"data: {data}\n\n"
|
yield f"data: {data}\n\n"
|
||||||
elif "tool_calls" in line:
|
elif "tool_calls" in line:
|
||||||
tool_calls = line["tool_calls"]
|
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:
|
elif "thought" in line:
|
||||||
thought += line["thought"]
|
thought += line["thought"]
|
||||||
data = json.dumps({"type": "thought", "thought": line["thought"]})
|
data = json.dumps({"type": "thought", "thought": line["thought"]})
|
||||||
|
|||||||
Reference in new issue
Block a user