Package-level declarations
Types
Configures the model's automatic detection of user activity.
The Firebase project has not been configured and enabled for the selected API.
Represents the aspect ratio that the generated image should conform to.
Audio record initialization failures for audio streaming
The audio transcription configuration. Its presence enables audio transcription
Defines a function that the model can use as a tool. Including a function references to enable automatic function calling.
Describes why content was blocked.
A collection of source attributions for a piece of content.
Represents the code execution result from the model.
Content part modality.
Enables context window compression to manage the model's context window.
The model's response to a count tokens request.
Represents the code that was executed by the model.
Represents file data stored in Cloud Storage for Firebase, referenced by URI.
Represents the reason why the model stopped generating content.
Parent class for any errors that occur from the FirebaseAI SDK.
The parameters used in the request are not valid.
An operation has been requested, but device doesn't support local models, or they are not available.
Catch all case for exceptions not explicitly expected.
Thrown when a function invoked by the model has an error that should be returned to the model
The configuration that specifies the function calling behavior.
Represents function call name and params received from requests.
Represents function call output to be returned to the model when it requests a function call.
A response from the model.
A GenerateContentResponse augmented with class information.
Configuration parameters to use for content generation.
Represents a reference to a backend for generative AI.
A tool that allows a Gemini model to connect to Google Maps to access and incorporate location-based information into its responses.
A grounding chunk from Google Maps.
A tool that allows the generative model to connect to Google Search to access and incorporate up-to-date information from the web into its responses.
Represents a chunk of retrieved data that supports a claim in the model's response.
Metadata returned to the client when grounding is enabled.
Provides information about how a specific segment of the model's response is supported by the retrieved grounding chunks.
Specifies how the block method computes the score that will be compared against the HarmBlockThreshold in SafetySetting.
Represents the threshold for a HarmCategory to be allowed by SafetySetting.
Category for a given harm rating.
Represents the probability that some HarmCategory is applicable in a SafetyRating.
Represents the severity of a HarmCategory being applicable in a SafetyRating.
Configuration options for generating images with Gemini models.
Represents binary data with an associated MIME type.
Represents binary data with an associated MIME type sent to and received from requests.
The provided API Key is not valid.
The specified Agent Platform location is invalid.
Some form of state occurred that shouldn't have.
Definition of a data type.
Configuration parameters to use for conversation config.
Configuration parameters to use for live content generation.
Incremental server update generated by the model in response to client messages.
Notification that the server is initiating a disconnect of the session.
Parent interface for responses from the model during live interactions.
The model is ready to receive client messages.
Request for the client to execute the provided functionCalls.
Notification for the client to cancel a previous function call from LiveServerToolCall.
A message from the server that this version of the SDK does not know.
Represents a live WebSocket session capable of streaming content to and from the server.
Represents a live WebSocket session capable of streaming content to and from the server.
A Live API session of the platform SDK. The messages of the server are buffered from the moment the session opens until they are received. resumeSession opens a new session of the platform SDK and closes the current one, as the Android SDK does.
An update of the session resumption state.
Represents token counting info for a single modality.
Configuration for a multi-speaker audio generation setup.
The request is missing a permission that is required to perform the requested operation.
A request was blocked.
Feedback on the prompt provided in the request.
The request has hit a quota limit. Learn more about quotas in the Firebase documentation.
Configures model input behavior when generating content in the Live API via realtime supported methods.
Configurable options unique to how requests to the backend are performed.
Factory for creating RequestOptions with custom configurations. This is primarily intended for use by wrapper libraries and internal tools.
A request took too long to complete.
Represents the type of content present in a response (for example, text, image, audio).
A request was stopped during generation for some reason.
The configuration that specifies information which can be used by tools during inference calls.
An assessment of the potential harm of some generated content.
A configuration for a HarmBlockThreshold of some HarmCategory allowed and blocked in responses.
Represents a Google Search entry point.
Something went wrong while trying to deserialize a response from the server.
The server responded with a non 200 response code.
Handshake failed with the server
The service is not enabled for this Firebase project. Learn how to enable the required services in the Firebase documentation.
Streaming session already receiving.
Configuration for the session resumption mechanism.
Configures the sliding window context compression mechanism.
Configures a speaker with a unique name/identifier and a specific voice.
Speech configuration class for controlling the model's speech and audio generation behaviors.
How the text of a TextPart is spoken when the model generates speech from it.
A function declaration for a template tool that can be called by the model automatically.
A function declaration for a template tool.
Contains a set of tools (like function declarations) that the server template model has access to.
Config for template tools to use with server prompts.
Gemini 2.5 series models and newer utilize a thinking process before generating a response. This allows them to reason through complex problems and plan a more coherent and accurate answer. See the thinking documentation for more details.
Specifies the quality of the thinking response.
Contains configuration for the function calling tools of the model. This can be used to change when the model can predict function calls.
Audio transcription message.
Catch all case for exceptions not explicitly expected.
The user's location (region) is not supported by the API.
Specifies the URL context configuration.
Metadata related to the UrlContext tool.
Metadata for a single URL retrieved by the UrlContext tool.
The status of a URL retrieval.
Usage metadata about response(s).
Various voices supported by the server. See the list of supported voices
A grounding chunk from the web.
Functions
Helper method to construct an ActivityDetectionConfig in a DSL-like manner.
Returns the part as a FileDataPart if it represents a file, and null otherwise
Returns the part as a InlineDataPart if it represents inline data, and null otherwise
Returns the part as a String if it represents text, and null otherwise
Helper method to construct a GenerationConfig in a DSL-like manner.
Helper method to construct an ImageConfig in a DSL-like manner.
Helper method to construct a LiveAudioConversationConfig in a DSL-like manner.
Helper method to construct a LiveGenerationConfig in a DSL-like manner.
Helper method to construct a RealtimeInputConfig in a DSL-like manner.
Helper method to construct a RetrievalConfig in a DSL-like manner.
Helper method to construct a ThinkingConfig in a DSL-like manner.