Use the Gemini API for function calling


Function calling makes it easier for you to get structured data outputs from generative models. You can then use these outputs to call other APIs and return the relevant response data to the model. In other words, function calling helps you connect generative models to external systems so that the generated content includes the most up-to-date and accurate information.

You can provide Gemini models with descriptions of functions. These are functions that you write in the language of your app (that is, they're not Cloud Functions ). The model may ask you to call a function and send back the result to help the model handle your query.

You can learn more about function calling in the Google Cloud documentation.

Other options for working with the Gemini API