Skip to content

Commit

Permalink
Add timeout possibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jankrepl committed Nov 19, 2024
1 parent b3c6d2d commit ca6760b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion swarm_copy/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ async def handle_tool_call(
)

if not approval_json:
continue
return {
"role": "tool",
"tool_call_id": tool_call.id,
"tool_name": name,
"content": "Tool execution was cancelled due to timeout.",
}, None

approval = json.loads(approval_json)
if approval["status"] == "approved":
Expand Down

0 comments on commit ca6760b

Please sign in to comment.