From the course: OpenAI API: Function Calling

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Tools and function calls explained

Tools and function calls explained - OpenAI API Tutorial

From the course: OpenAI API: Function Calling

Tools and function calls explained

Before we dive into code, let me briefly explain the difference between tool calls and function calls. Because when you read the documentation, when you look at my code, when you work with function calling, you'll notice that the terms tool and function are used in a commingled way that makes it unclear what exactly is going on. In the request you send to the API, you specify a set of tools. Those are the tools that are available to the LLM assets doing its inference. Now, tools is a parent grouping of both built-in tools that exist on the API end. That would be web search, image generation, code generation, and other things. Function calls, two functions that sit on your app. They are custom functions you write that the LLM has no access to, but can mention in its calls and pass parameters and arguments to. And finally, custom functions, which are functions the LLM can send code to. They are three different things. They operate in three different ways. And they are all specified…

Contents