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 - Gemini Tutorial
From the course: Gemini API: Tool and Function Calling
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
-
-
-
-
About declaring basic functions5m 1s
-
(Locked)
Declare our first function6m 9s
-
(Locked)
Exploring a function call response3m 19s
-
(Locked)
Initializing our client4m 28s
-
(Locked)
Extracting our function3m 58s
-
(Locked)
Declaring multiple functions3m 56s
-
(Locked)
Querying for a single user4m 21s
-
(Locked)
How function calling modes work3m 20s
-
(Locked)
Using function calling modes11m 39s
-
-
-
-
-