Commit ee9a22a
authored
Update _assistant_agent.py
## Description
When using Claude models (or other LLM providers) with tool calling, the `tool_call.arguments`
field may be an empty string `""` instead of `"{}"` for tools that don't require parameters.
This causes a `JSONDecodeError[ in ](file://core/mt_llm_client.py#90#24)AssistantAgent._execute_tool_call` method, even though
the tool call is valid and should be executed with empty arguments.
## Current Behavior
```python
# In _assistant_agent.py line 1547
arguments = json.loads(tool_call.arguments) # Raises JSONDecodeError for ""
```
When `tool_call.arguments = ""`, this raises:1 parent 13e144e commit ee9a22a
File tree
1 file changed
+5
-1
lines changed- python/packages/autogen-agentchat/src/autogen_agentchat/agents
1 file changed
+5
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
1547 | | - | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
1548 | 1552 | | |
1549 | 1553 | | |
1550 | 1554 | | |
| |||
0 commit comments