mirror of
https://github.com/open-webui/computer.git
synced 2026-11-25 06:47:38 -05:00
refac
This commit is contained in:
1 parent
a3d0d44c11
commit
31ae4db4df
1 file changed
+2
-2
+2
-2
@@ -448,7 +448,7 @@ def _to_openai_messages(messages: list[dict], instructions: str) -> list[dict]:
|
||||
if rc:
|
||||
out["reasoning_content"] = rc
|
||||
# Clean tool_calls: remove fc_id which is Responses-API-only
|
||||
if "tool_calls" in out:
|
||||
if out.get("tool_calls"):
|
||||
out["tool_calls"] = [
|
||||
{k: v for k, v in tc.items() if k != "fc_id"} for tc in out["tool_calls"]
|
||||
]
|
||||
@@ -554,7 +554,7 @@ async def stream_openai_completions(
|
||||
emitted = True
|
||||
yield {"type": "output", "item": item}
|
||||
|
||||
for tc in delta.get("tool_calls", []):
|
||||
for tc in delta.get("tool_calls") or []:
|
||||
idx = tc["index"]
|
||||
if idx not in tool_calls:
|
||||
tool_calls[idx] = {
|
||||
|
||||
Reference in new issue
Block a user