Firebase. AI
Summary
Enumerations |
|
---|---|
BlockReason{
|
enum A type describing possible reasons to block a prompt. |
ContentModality{
|
enum Content part modality. |
FinishReason{
|
enum Represents the reason why the model stopped generating content. |
HarmCategory{
|
enum Categories describing the potential harm a piece of content may pose. |
ResponseModality{
|
enum The response type the model should return with. |
Classes |
|
---|---|
Firebase. |
An object that represents a back-and-forth chat with a model, capturing the history and saving the context in memory between each message sent. |
Firebase. |
|
Firebase. |
A type that represents a remote multimodal model (like Gemini), with the ability to generate content based on various input types. |
Firebase. |
A live, generative AI model for real-time interaction. |
Firebase. |
Manages asynchronous communication with Gemini model over a WebSocket connection. |
Firebase. |
A |
Structs |
|
---|---|
Firebase. |
A struct representing a possible reply to a content generation prompt. |
Firebase. |
A struct describing a source attribution. |
Firebase. |
A collection of source attributions for a piece of content. |
Firebase. |
The model's response to a count tokens request. |
Firebase. |
Configuration for specifying function calling behavior. |
Firebase. |
Structured representation of a function declaration. |
Firebase. |
The model's response to a generate content request. |
Firebase. |
A struct defining model parameters to be used when sending generative AI requests to the backend model. |
Firebase. |
A struct defining model parameters to be used when generating live session content. |
Firebase. |
Content generated by the model in a live session. |
Firebase. |
Represents the response from the model for live content updates. |
Firebase. |
A request to use a tool from the live session. |
Firebase. |
A request to cancel using a tool from the live session. |
Firebase. |
Represents token counting info for a single modality. |
Firebase. |
A type describing data in media formats interpretable by an AI model. |
Firebase. |
A metadata struct containing any feedback the model had on the prompt it was provided. |
Firebase. |
Configuration parameters for sending requests to the backend. |
Firebase. |
A type defining potentially harmful media categories and their model-assigned ratings. |
Firebase. |
A type used to specify a threshold for harmful content, beyond which the model will return a fallback response instead of generated content. |
Firebase. |
A struct used to configure speech generation settings. |
Firebase. |
A helper tool that the model may use when generating responses. |
Firebase. |
|
Firebase. |
Token usage metadata for processing the generate content request. |
Interfaces |
|
---|---|
Firebase. |
Represents a message received from a live session. |
Enumerations
BlockReason
BlockReason
A type describing possible reasons to block a prompt.
ContentModality
ContentModality
FinishReason
FinishReason
Represents the reason why the model stopped generating content.
HarmCategory
HarmCategory
Categories describing the potential harm a piece of content may pose.
ResponseModality
ResponseModality
The response type the model should return with.
Properties | |
---|---|
Audio
|
Public Experimental: Specifies that the model should generate audio data. Use this modality with a |
Image
|
Public Experimental: Specifies that the model should generate image data. Use this modality when you want the model to create visual content based on the provided input or prompts. The response might contain one or more generated images. See the image generation documentation for more details. Warning: Image generation using Gemini 2.0 Flash is a Public Experimental feature, which means that it is not subject to any SLA or deprecation policy and could change in backwards-incompatible ways. |
Text
|
Specifies that the model should generate textual content. Use this modality when you need the model to produce written language, such as answers to questions, summaries, creative writing, code snippets, or structured data formats like JSON. |