Enable Gemini models to call external functions
Official documentation: https://ai.google.dev/gemini-api/docs/function-callingFunction calling allows Gemini models to interact with external APIs and tools by generating structured function calls based on natural language requests.
role (string): Role (user or model)parts (array): Content parts arrayfunctionDeclarations (array): Array of function declarations
name (string): Function namedescription (string): Function descriptionparameters (object): JSON schema for function parameterstemperature (number): Sampling temperaturetopP (number): Nucleus sampling parameter