How to reply to tool_calls with curl in chat completion?

Hello, I’m using curl (libcurl) with php to talk with gpt4 I’m trying to implement tools, but there’s noting in the api reference about how to reply to tool_calls. I’m able to do it with assistant but not with chat completion api.

Can someone help me ?


Tools are only currently available through Assistants. You will have to use an Assistant if you want to use tool_calls.

You are able to use tool calls in chat completions, it is not required to use the assistants framework to specify tool_call methods via API.

Here’s doing parallel tool calls and returning parallel tool returns in Python. CURL, you can just adapt existing working methods to the new specification needed for function->tool conversion.

That works perfectly, thank you !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.