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.
Calling multiple functions in parallel - Gemini Tutorial
From the course: Gemini API: Tool and Function Calling
Calling multiple functions in parallel
- [Instructor] In this parallel function calling demo, we'll be writing a simple application that will call three independent functions in parallel. One function that gets the current temperature in a city, another function that gets the time zone of a specific city, and the third function that gets the population of a given city. Let's begin. First, let us create a new file in our chapter three folder for our new demo. Could call this file parallel-function-calling.py. Now, inside this file, let us bring in our dependencies. So put this aside. Say, from google import genai and from google.genai import types. Good. Now let us bring in our functions. First, let us bring in the temperature function. So just get go and grab the temperature function from our exercise files. The temperature function takes a city, will document it, and it would use this mock temperature data to return the temperature details for a specific city.…
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
-
-
-
-