Supplying parallel_tool_calls=False returns this error for chat completions:
An internal error occurred: Completions.create() got an unexpected keyword argument ‘parallel_tool_calls’. Please try again later.
It’s specified in the API, so why doesn’t it work?
All the other ones work as intended (tools, tool_choice, etc)
make sure you’re updated to the latest version pip install -U openai
and using the current API:
r = openai.OpenAI().chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": user_message}],
tools=[Function.model_json_schema()],
tool_choice='required',
parallel_tool_calls=False
)
It is only working with GPT-4 Model.
Not working with any other model.
I tested it on playground