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.

Creating sequential workflows

Creating sequential workflows

- [Instructor] In this demo, we'll be writing a simple application that will call three dependent functions sequentially. The application's goal is to send a user weather information as a notification. So when the application is prompted, it first calls the function that gets the user's location. It then calls the function that uses the location information to get the weather information. Once the weather information is retrieved, it will then call the function that sends the notification to package the weather information, and send it as a notification to the user. Let's begin. First, inside our chapter three folder, let us create the file for our demo. Going to call it compositional calling dot PY. Pull this to the side. Now in this file, first let us bring in our dependencies. That's going to be gen AI and types. Good, now let's bring in our functions. First, let us bring in the location function. Grab that from…

Contents