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.

Exploring a transaction processing agent

Exploring a transaction processing agent - Gemini Tutorial

From the course: Gemini API: Tool and Function Calling

Exploring a transaction processing agent

- [Instructor] Now that we understand how multi-tone function calling works, let us see in action. The file we're currently looking at in VS code contains a mini financial application for managing bank accounts and money transfer. Let's do a quick walkthrough. So we import our dependencies and then we have our two function declarations, one for checking balance and one for transferring money from one account to the other. We then define the two functions that actually perform the operations. Next is a loading indicator, which is just for us to manage the latency between our code and the Gemini API. We see our client and two definition and our configuration. Then we have a function to help us handle our calls to the Gemini model and to also manage our conversation history. Then if we scroll down, let me just collapse this function. We have the main function and what the main function does is simply set up a loop where we…

Contents