-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Sending a (seemingly) valid toolChoice object produces an API error #28325
Comments
@jmaczan thanks for opening this report! Could you please share the exact model your deployment utilizes? |
@deyaaeldeen Much appreciate your quick response! I'm using GPT-4 1106-Preview. And I'm currently working on a PR fixing this btw, but I'm new to your tooling (like |
### Packages impacted by this PR @azure/openai ### Issues associated with this PR #28325 ### Describe the problem that is addressed by this PR @jmaczan found that the spec contains a bug in representing an input option to chat completions. The spec is being fixed in Azure/azure-rest-api-specs#27487. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? N/A ### Are there test cases added in this PR? _(If not, why?)_ Yes ### Provide a list of related PRs _(if any)_ Azure/azure-rest-api-specs#27487 ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary)
Orthogonal to the issue in this thread, I wanted to answer this question specifically to say yes, we do! |
@jmaczan @azure/[email protected] has been released with the fix. Please give it a try and let us know if you have any other questions or concerns! |
Hi @jmaczan. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
Much thanks for cooperation on this issue, I’m happy I could help. All the best to you and the team! |
Describe the bug
When sending
toolChoice
in third parameterobject
ofgetChatCompletions
, I get an API error:toolChoice
is defined as optional parameter inGetChatCompletionsOptions
and it might look like this:The value is send is
To Reproduce
Steps to reproduce the behavior:
And you need to specify someFunction:
Expected behavior
The worst scenario is that
toolChoice
parameter is ignored by API. The best is that it works just like in vanilla OpenAI API - https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice, meaning it allows to define when tool should be calledScreenshots
Additional context
Tasks
The text was updated successfully, but these errors were encountered: