I have a small bot built on the Realtime API. I’d like to run a function on every user input but if I set "tool_choice": "required"
I end up in a continuous loop where the model tries to run the function over and over. On the other hand, if I set tool_choice
to auto I cannot prompt the model to call it at every turn. Was anyone successful in doing something similar? It looks like using "tool_choice": "required"
is correct for the assistant and chat api but the realtime ones seems to behave differently?
Why do you need tool use for this? Just run it when you send the request of the client to the API.