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.
Single-turn calls with automatic function calling - Gemini Tutorial
From the course: Gemini API: Tool and Function Calling
Single-turn calls with automatic function calling
- [Instructor] Back in VS Code. we'll be rebuilding our email validation function calling demo that we built in our single turn example. But this time, we'll be using automatic function calling. First, let's quickly take a mental picture of the code we had to write in the first version of this example. If we scroll up, as you can see, first, we have to declare our function, then we have to implement the function, then create the function declaration as a tool, pass it to our configuration, use our prompts. We set up the content parts. Then we write the request to our client, we get the function call response, and we extract the name and the arguments. We call the function. We then take the result of the function to create a functional response part. We build our conversation history with our first prompt, our function call object, and the function response part. Then we send our final response. 160 lines of…
Contents
-
-
-
-
-
Single-turn function call2m 21s
-
(Locked)
Implementing a single-turn function call flow8m 48s
-
(Locked)
Multi-turn function call2m 27s
-
(Locked)
Exploring a transaction processing agent4m 55s
-
(Locked)
Automatic function calling3m 17s
-
(Locked)
Single-turn calls with automatic function calling5m 46s
-
(Locked)
Parallel function calling2m 17s
-
(Locked)
Calling multiple functions in parallel5m 44s
-
(Locked)
Compositional function calling2m 21s
-
(Locked)
Creating sequential workflows5m 22s
-
-
-
-