From the course: Gemini API: Tool and Function Calling
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
How function calling works - Gemini Tutorial
From the course: Gemini API: Tool and Function Calling
How function calling works
- [Instructor] Function calling, also known as tool use, is a powerful capability of the Gemini API. It allows the Gemini, LLM to interact with external systems. Thus, instead of just generating text, the model can recommend and trigger a predefined function from your application's code. We have seen this in action in the previous video. Now let's take a look at how it works. First, we need to define a function. This definition is in two parts. The first part is the function's blueprint, which is called the function declaration. It is a description of the function that includes the function's name, summary of its purpose, parameters it accepts, their data types, and other important information that will help the model identify the function's purpose. The second part of the function definition is the actual function itself. This is the Python function or JavaScript function, if you're using the JavaScript SDK, that…