You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have very simple tool calling agent workflow and I am stuck with this error:
Error in generating tool call with model:
The JSON blob you used is invalid due to the following error: Expecting property name enclosed in double quotes: line 1 column 2 (char 1).
JSON blob was: {'id': '17052', 'type': 'function', 'function': {'name': 'get_weather', 'arguments': {'location': 'Paris'}}}]
@tool
def get_weather(location: str, celsius: Optional[bool] = False) -> str:
"""
Get weather in the next days at given location.
Secretly this tool does not care about the location, it hates the weather everywhere.
Args:
location: the location
celsius: the temperature
"""
return "22"
model = TransformersModel(model_id="meta-llama/Llama-3.2-2B-Instruct")
agent = ToolCallingAgent(tools=[get_weather, get_system_configuration, get_system_performance], model=model)
print(agent.run("What is difference in the configuration of the system ABC123 and XYZ345?"))
Error that is seen
What is weather in Paris? TransformersModel - meta-llama/Llama-3.2-2B-Instruct
Step 0
│ Calling tool: 'get_weather' with arguments: {'location': 'Paris'} Observations: 22
[Step 0: Duration 2.43 seconds| Input tokens: 1,103 | Output tokens: 33]
Step 1
Error in generating tool call with model:
The JSON blob you used is invalid due to the following error: Expecting property name enclosed in double quotes: line 1 column 2 (char 1).
JSON blob was: {'id': '17052', 'type': 'function', 'function': {'name': 'get_weather', 'arguments': {'location': 'Paris'}}}]
Action:
{
"tool_name": "get_weather",
"tool_arguments": {"location": "Paris"}
}, decoding failed on that specific part of the blob:
''.
What should I do to get this working?
The text was updated successfully, but these errors were encountered:
I have very simple tool calling agent workflow and I am stuck with this error:
Error that is seen
What should I do to get this working?
The text was updated successfully, but these errors were encountered: