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.

Declare our first function

Declare our first function

- [Instructor] Now back in VS Code, I have done a little reorganization, and now we have all the code files for chapter one inside 01-understanding-fc. And all the code files for chapter two are going to be inside this declaring-functions folder. And this is the same way you're going to be seeing them in your exercise files. To begin this demonstration, let's create a new file for our function declaration exercise. Inside the second folder, that's 02-declaring-function, we're going to be creating the file declaring_functions.py. Now we can pull this to the side. In this exercise we'll be declaring a function that queries the JSON placeholder API for a list of users. The JSON placeholder API is a public API that exists for the purpose of practicing API-related exercises just like the one we're going to be doing in this video. Our function will take two arguments. One argument will represent the total number of users we…

Contents