Firebase.AI.FunctionDeclaration

Structured representation of a function declaration.

Summary

ThisFunctionDeclaration is a representation of a block of code that can be used as aTool by the model and executed by the client.

Function calling can be used to provide data to the model that was not known at the time it was trained (for example, the current date or weather conditions) or to allow it to interact with external systems (for example, making an API request or querying/updating a database). For more details and use cases, seeIntroduction to function calling.

Constructors and Destructors

FunctionDeclaration(string name, string description, IDictionary< string,Schema > parameters, IEnumerable< string > optionalParameters)
Constructs a newFunctionDeclaration.

Public functions

FunctionDeclaration

Firebase::AI::FunctionDeclaration::FunctionDeclaration(stringname,stringdescription,IDictionary<string,Schema>parameters,IEnumerable<string>optionalParameters)

Constructs a newFunctionDeclaration.

Details
Parameters
name
The name of the function; must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
description
A brief description of the function.
parameters
Describes the parameters to this function.
optionalParameters
The names of parameters that may be omitted by the model in function calls; by default, all parameters are considered required.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-20 UTC.