com.google.firebase.vertexai.type

Interfaces

LiveServerMessage

This interface is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Part

This interface is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Classes

BlockReason

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Candidate

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Citation

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

CitationMetadata

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Content

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Content.Builder

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ContentModality

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

CountTokensResponse

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FileDataPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FinishReason

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FunctionCallPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FunctionCallingConfig

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FunctionDeclaration

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FunctionResponsePart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

GenerateContentResponse

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

GenerationConfig

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

GenerationConfig.Builder

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

HarmBlockMethod

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

HarmBlockThreshold

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

HarmCategory

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

HarmProbability

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

HarmSeverity

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagePart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenAspectRatio

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenGenerationConfig

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenGenerationConfig.Builder

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenGenerationResponse

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenImageFormat

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenInlineImage

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenPersonFilterLevel

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenSafetyFilterLevel

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagenSafetySettings

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

InlineDataPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

LiveGenerationConfig

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

LiveGenerationConfig.Builder

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

LiveServerContent

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

LiveServerSetupComplete

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

LiveServerToolCall

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

LiveServerToolCallCancellation

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

LiveSession

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

MediaData

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ModalityTokenCount

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

PromptFeedback

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

RequestOptions

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ResponseModality

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

SafetyRating

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

SafetySetting

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Schema

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

SpeechConfig

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

StringFormat

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

StringFormat.Custom

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

TextPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Tool

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ToolConfig

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

UsageMetadata

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Voices

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Exceptions

AudioRecordInitializationFailedException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ContentBlockedException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FirebaseVertexAIException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

InvalidAPIKeyException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

InvalidLocationException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

InvalidStateException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

PromptBlockedException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

QuotaExceededException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

RequestTimeoutException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ResponseStoppedException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

SerializationException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ServerException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ServiceConnectionHandshakeFailedException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ServiceDisabledException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

SessionAlreadyReceivingException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

UnknownException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

UnsupportedUserLocationException

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

Annotations

Top-level functions summary

Content
content(role: String?, init: Content.Builder.() -> Unit)

Function to build a new Content instances in a DSL-like manner.

GenerationConfig

Helper method to construct a GenerationConfig in a DSL-like manner.

ImagenGenerationConfig

Helper method to construct a ImagenGenerationConfig in a DSL-like manner.

LiveGenerationConfig

Helper method to construct a LiveGenerationConfig in a DSL-like manner.

Extension functions summary

FileDataPart?

Returns the part as a FileDataPart if it represents a file, and null otherwise

Bitmap?

Returns the part as a Bitmap if it represents an image, and null otherwise

InlineDataPart?

Returns the part as a InlineDataPart if it represents inline data, and null otherwise

String?

Returns the part as a String if it represents text, and null otherwise

Top-level functions

content

fun content(role: String? = "user", init: Content.Builder.() -> Unit): Content

Function to build a new Content instances in a DSL-like manner.

Contains a collection of text, image, and binary parts.

Example usage:

content("user") {
text("Example string")
)

generationConfig

fun generationConfig(init: GenerationConfig.Builder.() -> Unit): GenerationConfig

Helper method to construct a GenerationConfig in a DSL-like manner.

Example Usage:

generationConfig {
temperature = 0.75f
topP = 0.5f
topK = 30
candidateCount = 4
maxOutputTokens = 300
stopSequences = listOf("in conclusion", "-----", "do you need")
}

imagenGenerationConfig

@PublicPreviewAPI
fun imagenGenerationConfig(init: ImagenGenerationConfig.Builder.() -> Unit): ImagenGenerationConfig

Helper method to construct a ImagenGenerationConfig in a DSL-like manner.

Example Usage:

imagenGenerationConfig {
negativePrompt = "People, black and white, painting"
numberOfImages = 1
aspectRatio = ImagenAspecRatio.SQUARE_1x1
imageFormat = ImagenImageFormat.png()
addWatermark = false
}

liveGenerationConfig

fun liveGenerationConfig(init: LiveGenerationConfig.Builder.() -> Unit): LiveGenerationConfig

Helper method to construct a LiveGenerationConfig in a DSL-like manner.

Example Usage:

liveGenerationConfig {
temperature = 0.75f
topP = 0.5f
topK = 30
candidateCount = 4
maxOutputTokens = 300
...
}

Extension functions

asFileDataOrNull

fun Part.asFileDataOrNull(): FileDataPart?

Returns the part as a FileDataPart if it represents a file, and null otherwise

asImageOrNull

fun Part.asImageOrNull(): Bitmap?

Returns the part as a Bitmap if it represents an image, and null otherwise

asInlineDataPartOrNull

fun Part.asInlineDataPartOrNull(): InlineDataPart?

Returns the part as a InlineDataPart if it represents inline data, and null otherwise

asTextOrNull

fun Part.asTextOrNull(): String?

Returns the part as a String if it represents text, and null otherwise