-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool Calling not working - parameters not set correct #294
Comments
@AladinTheThird Can you share your code and also mention where you are setting the breakpoint. |
The code is working as it should Input:
output:
2nd Input:
output:
|
The output seems to be ok but only because it is doing nothing with the input values. So the problem gets not obvious. I modified the function and return a text with F and C depending on the boolean celsius. @tool
Output looks like this - Did some cleanup because format was a bit messy. LLM is also complaining that it got F instead C |
I dont know but this is i am getting My Tool:
|
@AladinTheThird Maybe try with that code |
@touseefahmed96 your ouput Code: Result: my output Result: Observation I assume this is not an llm issue because of the Calling Tool line indicates no differences. It seems to be a parsing issue in some way in the code parts. Your pull request |
@AladinTheThird you can try some tools from my PR some of them require api but some dont so comment out the tools which requires api and try others. |
One thing also in the fuction of @tool docstrings are very important as it parses the arguments from there maybe try to change the docstring |
Hi there,
thanks for providing Smolagents. I wanted to have a first contact with Smolagents. Looks very promising and easy to use, so I gave it a try.
I was picking an given example to get first insights.
Example: tool_calling_agent_from_any_llm.py
Stepped into the tool call with a breakpoint to check the function parameters
Parameters seems to be wrong
There seems to be no parsing of the parameters upfront the call of the function. I would expect location="Paris"
Modified the example to get a second parameter
print(agent.run("What's the weather like in Paris? Please tell me in Celsius."))
Same test. Checked the values:
location = '{"location":"Paris","celsius":true}'
celsius = False**
Observation
The LLM was able to identify the "location = Paris" and need for "celsius = True". But the tool calling does not work as it should.
There is an issue with parsing the parameters and mapped to the function call.
Am I doing wrong? Would be great if somebody could check that.
Thanks for your support
The text was updated successfully, but these errors were encountered: