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.
Declaring multiple functions - Gemini Tutorial
From the course: Gemini API: Tool and Function Calling
Declaring multiple functions
- [Instructor] So far, we have been demonstrating function calling using only one function. But do you know that the Gemini API actually gives you the ability to give your model more than one function to work with? Yeah, that's what we're going to be exploring in this video. Building on our adjacent API placeholder example, we are going to be adding another function. This function will take a user ID and use the ID to pull the details of the user with that specific user ID from the JSON placeholder API. Let's begin. First we need to declare the function, so I'm just going to come up here and just under our first declaration, I'm going to declare the second function. So I'm going to call it get_user_details. That would be the name of the function itself. Then because it's a declaration, I'm going to tack on my declaration suffix. So for the name, we set this to get_user_details. For the description, we'll say that it…
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
-
-
-
-
-