com.google.firebase.vertexai.type

Annotations

Interfaces

Part

Interface representing data sent to and received from requests.

Classes

BlockReason

Describes why content was blocked.

Candidate

A Candidate represents a single response generated by the model for a given request.

Citation

Represents a citation of content from an external source within the model's output.

CitationMetadata

A collection of source attributions for a piece of content.

Content

Represents content sent to and received from the model.

Content.Builder

Builder class to facilitate constructing complex Content objects.

ContentKt
ContentModality

Content part modality.

CountTokensResponse

The model's response to a count tokens request.

FileDataPart

Represents file data stored in Cloud Storage for Firebase, referenced by URI.

FinishReason

Represents the reason why the model stopped generating content.

FunctionCallPart

Represents function call name and params received from requests.

FunctionCallingConfig

The configuration that specifies the function calling behavior.

FunctionDeclaration

Defines a function that the model can use as a tool.

FunctionResponsePart

Represents function call output to be returned to the model when it requests a function call.

GenerateContentResponse

A response from the model.

GenerationConfig

Configuration parameters to use for content generation.

GenerationConfig.Builder

Builder for creating a GenerationConfig.

GenerationConfigKt
HarmBlockMethod

Specifies how the block method computes the score that will be compared against the HarmBlockThreshold in SafetySetting.

HarmBlockThreshold

Represents the threshold for a HarmCategory to be allowed by SafetySetting.

HarmCategory

Category for a given harm rating.

HarmProbability

Represents the probability that some HarmCategory is applicable in a SafetyRating.

HarmSeverity

Represents the severity of a HarmCategory being applicable in a SafetyRating.

ImagePart

Represents image data sent to and received from requests.

ImagenAspectRatio

Represents the aspect ratio that the generated image should conform to.

ImagenGenerationConfig
ImagenGenerationConfig.Builder

Builder for creating a ImagenGenerationConfig.

ImagenGenerationConfigKt
ImagenGenerationResponse

Represents a response from a call to ImagenModel.generateImages

ImagenImageFormat

Represents the format an image should be returned in.

ImagenInlineImage

Represents an Imagen-generated image that is returned as inline data.

ImagenPersonFilterLevel

A filter used to prevent images from containing depictions of children or people.

ImagenSafetyFilterLevel

Used for safety filtering.

ImagenSafetySettings

A configuration for filtering unsafe content or images containing people.

InlineDataPart

Represents binary data with an associated MIME type sent to and received from requests.

LiveContentResponse

Represents the response from the model for live content updates.

LiveContentResponse.Status

Represents the status of a LiveContentResponse, within a single interaction.

LiveGenerationConfig

Configuration parameters to use for live content generation.

LiveGenerationConfig.Builder

Builder for creating a LiveGenerationConfig.

LiveGenerationConfigKt
LiveSession

Represents a live WebSocket session capable of streaming content to and from the server.

MediaData

Represents the media data to be sent to the server

ModalityTokenCount

Represents token counting info for a single modality.

PartKt
PromptFeedback

Feedback on the prompt provided in the request.

RequestOptions

Configurable options unique to how requests to the backend are performed.

ResponseModality

Represents the type of content present in a response (e.g., text, image, audio).

SafetyRating

An assessment of the potential harm of some generated content.

SafetySetting

A configuration for a HarmBlockThreshold of some HarmCategory allowed and blocked in responses.

Schema

Definition of a data type.

SpeechConfig

Speech configuration class for setting up the voice of the server's response.

StringFormat
StringFormat.Custom
TextPart

Represents text or string based data sent to and received from requests.

Tool

Contains a set of function declarations that the model has access to.

ToolConfig

Contains configuration for the function calling tools of the model.

UsageMetadata

Usage metadata about response(s).

Voices

Various voices supported by the server

Exceptions

AudioRecordInitializationFailedException

Audio record initialization failures for audio streaming

ContentBlockedException
FirebaseVertexAIException

Parent class for any errors that occur from the FirebaseVertexAI SDK.

InvalidAPIKeyException

The provided API Key is not valid.

InvalidLocationException

The specified Vertex AI location is invalid.

InvalidStateException

Some form of state occurred that shouldn't have.

PromptBlockedException

A request was blocked.

QuotaExceededException

The request has hit a quota limit.

RequestTimeoutException

A request took too long to complete.

ResponseStoppedException

A request was stopped during generation for some reason.

SerializationException

Something went wrong while trying to deserialize a response from the server.

ServerException

The server responded with a non 200 response code.

ServiceConnectionHandshakeFailedException

Handshake failed with the server

ServiceDisabledException

The service is not enabled for this Firebase project.

SessionAlreadyReceivingException

Streaming session already receiving.

UnknownException

Catch all case for exceptions not explicitly expected.

UnsupportedUserLocationException

The user's location (region) is not supported by the API.