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.

Exploring a function call response

Exploring a function call response - Gemini Tutorial

From the course: Gemini API: Tool and Function Calling

Exploring a function call response

- [Instructor] Continuing from the exercise we started in the previous video, we will be sending a prompt using our function declaration in this video. To do that, we first need to define the actual function that will be run. This is not totally necessary for this demonstration, but it will help us to see the actual call to the JSON Placeholder API, which I believe you most likely would like to see. So first, let us bring in our actual function definition. Let me collapse this. Scroll up, collapse, and I'm just going to go and grab the actual function definition and paste it down here. Scroll up. By the way, like I've mentioned earlier, you can have access to the function code in your exercise files to follow along. Now let's walk through this function. So we have the function fetch users, which is also the same name that was used here in our function declaration. And it has a simple doc string fetch users from…

Contents