Skip to content

fix: support dict-style function tool_choice for OpenAI realtime API#131

Open
Zenith-Mind wants to merge 1 commit intoAzure-Samples:mainfrom
Zenith-Mind:fix/function-toolchoice-support
Open

fix: support dict-style function tool_choice for OpenAI realtime API#131
Zenith-Mind wants to merge 1 commit intoAzure-Samples:mainfrom
Zenith-Mind:fix/function-toolchoice-support

Conversation

@Zenith-Mind
Copy link
Copy Markdown

@Zenith-Mind Zenith-Mind commented May 15, 2025

Summary

Fixes a bug in FunctionToolChoice where the SDK expects a string for function, but the OpenAI Realtime API requires an object:

Expected by API:

{
  "type": "function",
  "function": { "name": "get_rag_response" }
}


@Zenith-Mind
Copy link
Copy Markdown
Author

in open ai original documentation it is given as :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants