-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Python: GPT4o function calling occasionally buggy? #8292
Comments
@bbence84, thanks for reporting. This is model related. We've tried to put some guardrails in place inside of SK to help prevent this type of issue (as you can see, we're telling the model to try again with the correct tool name...). We have heard of this a bit more these days. We'll have another look to see if there are some further improvements we can make to make tool calling more robust. |
related to #7968 |
Thanks! I am not sure anymore, if it's model related, at least now I have switched to GPT4 32K (also on Azure, Sweden), and I am still getting the error randomly. Actually it seems to be slightly different, based on the error message:
Where does the tool name "messages[5].tool_calls[0].function.name" come from? Maybe something is not getting replaced properly inside SK? Thanks! |
That's the same error. The model is sending back the |
Is there any update on this? I mean is this an LLM or a framework (SK) issue? It did not seem to happen in the past, so either a recent SK version changed something or Microsoft / OpenAI did something on their side to provoke this error. |
This is not entirely an SK issue. It's most likely a model issue where OpenAI is continuing to train with a |
Facing the same issue in the dotnet version, Was there any reason behind choosing |
I'm having the same issue with new dotnet SK 1.21 |
Same issue for me in the dotnet SDK. Very random. Both with 4o and 4o-mini. |
Hi there. We've been seeing this issue pop up more and more recently. It appears to be a bug in the model. A way to mitigate this is to set The ability to do toggle this setting in .Net will land soon. |
As mentioned above, this should be handled by toggling |
@moonbox3 Hm, this issue seems to be back even with parallel_tool_calls off. :( With the latest Python SDK (1.14.0), I am still getting:
This is how I init the kernel, maybe it's wrong?
|
Describe the bug
Using GPT4 model version 2024-05-13 on Azure (Sweden) with Semantic Kernel, Python.
I have noticed that sometimes it seems that GPT4o (os is it in SK?) gets the toolname wrong, e.g. I am getting error:
{'role': 'tool', 'content': 'The tool call with name
cc_code.MigrateCodeToCalcis not part of the provided tools, please try again with a supplied tool call name and make sure to validate the name.'
However in fact in the tools list in the JSON I have the function:
'function': {'name': 'cc_code-MigrateCodeToCalc', ...
Is it that GPT4o sometimes puts a dot instead of a dash in the function name?
Interestingly, after such an error, I am getting the below error message too:
"Invalid \'messages[5].tool_calls[0].function.name\': string does not match pattern. Expected a string that matches the pattern \'^[a-zA-Z0-9_-]+$\'.", \'type\': \'invalid_request_error\', \'param\': \'messages[5].tool_calls[0].function.name\', \'code\': \'invalid_value\'
Seems that this happens more often with a specific function name, but not 100% of the time, but most of the time.
To Reproduce
Expected behavior
Function call works all the time.
Platform
Python, SK 1.5.1
The text was updated successfully, but these errors were encountered: