Today we are going to learn about Function Calling
in GLLMs (Generative Large Language Models).
Instructions are given inside the program files itself.
What you are seeing is called github repository, What you reading is a README.md
file in the repository which you'll find in almost all repositories across github. Right now we are going to clone (download) this repository into your directory (folder). For this you need to have git
installed, but don't worry if you are using github codespace you have it pre-installed. So go ahead, copy paste the following command into your VS code terminal and hit enter.
git clone https://github.com/blankspacecommunity/genai-day-5.git
if everything is alright, you'll see a folder named genai-day-5
. Inside the folder, you'll see 3 files, 2 python programs and a README.md file (which is same as this). We have to run this program right? so we have to enter to that folder. We use the cd
(meaning change directory) command to navigate into the folder. Type the following command into your terminal and hit enter.
cd genai-day-5
You can think of package as a collection of programs to do some specific task. In this case the package name is google-generativeai
. This package is written by google gemini developers. Using this package simplifies our interaction with google GLLMs like Gemini, Gemma.
Copy paste (or type) the following command in VS code terminal (or any terminal, if you are using codespace there is only vs code integrated terminal) and hit enter, this command will tell pip to install the google generative ai package.
pip install google-generativeai
There are 2 python program files in your directory (folder). Open calculation.py
and start reading, follow the instructions to complete the program.
Try running the program using the following command, Expect some errors, because the program is incomplete, try to read and understand errors (in terminal) and try to resolve it.
Once you made changes, TYPE the following command into your terminal and hit enter to run the calculation.py
python prorgram.
python calculation.py