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 - 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
-
-
-
-
About declaring basic functions5m 1s
-
(Locked)
Declare our first function6m 9s
-
(Locked)
Exploring a function call response3m 19s
-
(Locked)
Initializing our client4m 28s
-
(Locked)
Extracting our function3m 58s
-
(Locked)
Declaring multiple functions3m 56s
-
(Locked)
Querying for a single user4m 21s
-
(Locked)
How function calling modes work3m 20s
-
(Locked)
Using function calling modes11m 39s
-
-
-
-
-