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.

Compositional function calling

Compositional function calling - Gemini Tutorial

From the course: Gemini API: Tool and Function Calling

Compositional function calling

- [Instructor] Compositional function calling is a sophisticated form of multi-turn function calling that allows the model to intelligently chain together multiple function calls to solve a single complex request. Unlike parallel function calling where independent functions are executed at the same time, compositional calls are executed in a sequential dependent manner. The output of one function serves as the input for the next function. Let's say for example, a user sends the prompt, "Find the latitude and longitude of London, and then tell me the weather condition at those coordinates." The model receives this prompt, and based on its understanding of the available tools, it breaks down the request into a logical sequence. get_coordinates then use the coordinates to get the weather. So it first generates a FunctionCall to a tool that gets the coordinates using the location parameter, London. Your application gets…

Contents