What is Deference Between Function _call and Tool_Call?

Please if any one know what is the difference between function_call and tool_call in open ai complication. When and where I use function and tolls.

1 Like

Hi!

When building on top of the chat completions API it’s called functions.
When building on top of the assistants API it’s called tools.

Assistants also allow to use code interpreter as tools (functions), among others.

Hope this clarifies things for you.

Here are the relevant parts of the documentation:

https://platform.openai.com/docs/guides/function-calling

https://platform.openai.com/docs/assistants/tools

1 Like

Welcome @msjana70,

AFAIK, it used to be known as function calling, but with newer model updates and the introduction of the Assistants API, it has been renamed to tool calling for consistency and clarity. This is evident from the API reference where the functions parameter has been deprecated in favor of the tools parameter, and function_call in favor of tool_choice.

If you mean regarding chat completion (wasn’t sure what is ‘complication’ and thought maybe autocorrect): function call was the original api attribute but it is now deprecated in favor of tools.

This post has more information about what is different: blocking you from using a role message as you wish, placing extra tokens into context out of your control…

The huge jump in tokens when the AI uses this wrapper tool

or when it goes wrong

1 Like