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.
Initializing our client - Gemini Tutorial
From the course: Gemini API: Tool and Function Calling
Initializing our client
- [Instructor] So now that we have our tool set up, let us initialize our clients. I'm going to say client = genai.client. So we have our client and we have our tools. Now, how do we pass our tools to our client? This can be done by passing the tool to our generation configuration. So, that's the next thing we're going to be doing. We're going to create a configuration and a generation configuration is created using the generate config class, GenerateContentConfig class. So now, generate config class, GenerateContentConfig class from the types model. So, inside this class, we can then pass our tools as a list into the tools argument. So, I'm just going to pass this tools. Yeah, and this is because you might want to pass other tools, like for example, the grounding with Google search tool that we're going to be seeing later. But for now, we're just going to pass in the tools that come from our function declarations.…
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
-
-
-
-
-