Is it possible to disable parallel tool calls?

Ever since I switched to gpt-4-0125-preview I have been getting many more parallel tool calls. My app workflow doesn’t quite benefit from parallel calls, and I would like to disable it.

Is there a way to disable parallel tool calls via the API?

There are multiple ways depending on how you’d want to handle this.

One is to simply build a user flow that asks the user permission with a description of what the service is going to do, and lets the user decide. As stated in docs:

The latest models (gpt-3.5-turbo-0125 and gpt-4-turbo-preview ) have been trained to both detect when a function should to be called (depending on the input) and to respond with JSON that adheres to the function signature more closely than previous models. With this capability also comes potential risks. We strongly recommend building in user confirmation flows before taking actions that impact the world on behalf of users (sending an email, posting something online, making a purchase, etc).

Another possible way would be to explicitly specify in system message to use only one tool at a time, since:

Under the hood, functions are injected into the system message in a syntax the model has been trained on.