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.
Implementing a single-turn function call flow - Gemini Tutorial
From the course: Gemini API: Tool and Function Calling
Implementing a single-turn function call flow
- [Narrator] With an understanding of how single-turn function calling works at hand, let's see it in action. Here in VS Code, we have a function-calling demo that contains a function that validates an email. We have the function declaration that will be passed to our model and the actual function that is going to perform the operation. The client has also been set up with the function declaration as a tool, and we have two prompts that we can use to test out the function. One with a valid email and another with an invalid email. The code to extract and also call the function is also in place. All of this, we are already familiar with. The code we'll be writing to complete this function is the final step, where the result of the function is returned to the model for a final response. The model will take our function's results and process it to deliver a user-friendly response to the user of our application. Let's…
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
-
-
-
-