From 89e515d40e3c985a5a64a5efd7bb0bde56fdace2 Mon Sep 17 00:00:00 2001 From: Daymon Date: Tue, 6 May 2025 15:48:04 -0500 Subject: [PATCH 01/13] Add deprecation annotations --- .../com/google/firebase/vertexai/Chat.kt | 4 ++ .../firebase/vertexai/GenerativeModel.kt | 4 ++ .../google/firebase/vertexai/ImagenModel.kt | 4 ++ .../firebase/vertexai/LiveGenerativeModel.kt | 4 ++ .../firebase/vertexai/java/ChatFutures.kt | 4 ++ .../vertexai/java/GenerativeModelFutures.kt | 4 ++ .../vertexai/java/ImagenModelFutures.kt | 4 ++ .../vertexai/java/LiveModelFutures.kt | 4 ++ .../vertexai/java/LiveSessionFutures.kt | 4 ++ .../firebase/vertexai/type/Candidate.kt | 20 ++++++ .../google/firebase/vertexai/type/Content.kt | 8 +++ .../firebase/vertexai/type/ContentModality.kt | 4 ++ .../vertexai/type/CountTokensResponse.kt | 4 ++ .../firebase/vertexai/type/Exceptions.kt | 68 +++++++++++++++++++ .../vertexai/type/FunctionCallingConfig.kt | 4 ++ .../vertexai/type/FunctionDeclaration.kt | 4 ++ .../vertexai/type/GenerateContentResponse.kt | 4 ++ .../vertexai/type/GenerationConfig.kt | 8 +++ .../firebase/vertexai/type/HarmBlockMethod.kt | 4 ++ .../vertexai/type/HarmBlockThreshold.kt | 4 ++ .../firebase/vertexai/type/HarmCategory.kt | 4 ++ .../firebase/vertexai/type/HarmProbability.kt | 4 ++ .../firebase/vertexai/type/HarmSeverity.kt | 4 ++ .../vertexai/type/ImagenAspectRatio.kt | 4 ++ .../vertexai/type/ImagenGenerationConfig.kt | 8 +++ .../vertexai/type/ImagenGenerationResponse.kt | 4 ++ .../vertexai/type/ImagenImageFormat.kt | 4 ++ .../vertexai/type/ImagenInlineImage.kt | 4 ++ .../vertexai/type/ImagenPersonFilterLevel.kt | 4 ++ .../vertexai/type/ImagenSafetyFilterLevel.kt | 4 ++ .../vertexai/type/ImagenSafetySettings.kt | 4 ++ .../vertexai/type/LiveContentResponse.kt | 4 ++ .../vertexai/type/LiveGenerationConfig.kt | 8 +++ .../firebase/vertexai/type/LiveSession.kt | 4 ++ .../firebase/vertexai/type/MediaData.kt | 4 ++ .../vertexai/type/ModalityTokenCount.kt | 4 ++ .../com/google/firebase/vertexai/type/Part.kt | 28 ++++++++ .../firebase/vertexai/type/PromptFeedback.kt | 8 +++ .../firebase/vertexai/type/RequestOptions.kt | 4 ++ .../vertexai/type/ResponseModality.kt | 4 ++ .../firebase/vertexai/type/SafetySetting.kt | 4 ++ .../google/firebase/vertexai/type/Schema.kt | 12 ++++ .../firebase/vertexai/type/SpeechConfig.kt | 4 ++ .../com/google/firebase/vertexai/type/Tool.kt | 4 ++ .../firebase/vertexai/type/ToolConfig.kt | 4 ++ .../firebase/vertexai/type/UsageMetadata.kt | 4 ++ .../google/firebase/vertexai/type/Voices.kt | 4 ++ 47 files changed, 320 insertions(+) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt index 594be41310a..dd305faf669 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt @@ -44,6 +44,10 @@ import kotlinx.coroutines.flow.onEach * from the model. This will be provided to the model for each message sent (as context for the * discussion). */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class Chat( private val model: GenerativeModel, public val history: MutableList = ArrayList() diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt index 3520aff2238..8da05e3a21b 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt @@ -47,6 +47,10 @@ import kotlinx.serialization.ExperimentalSerializationApi * Represents a multimodal model (like Gemini), capable of generating content based on various input * types. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class GenerativeModel internal constructor( private val modelName: String, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt index fa33ee6e327..f98df48a6ba 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt @@ -36,6 +36,10 @@ import com.google.firebase.vertexai.type.RequestOptions * types. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenModel internal constructor( private val modelName: String, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt index d546e09cdd2..1f711116a9e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt @@ -46,6 +46,10 @@ import kotlinx.serialization.json.JsonObject * various input types, supporting bidirectional streaming. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class LiveGenerativeModel internal constructor( private val modelName: String, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt index 2025342ff6e..0e21b3623d4 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt @@ -30,6 +30,10 @@ import org.reactivestreams.Publisher * * @see [Chat] */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public abstract class ChatFutures internal constructor() { /** diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt index eae7603924b..90d7aec35bc 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt @@ -32,6 +32,10 @@ import org.reactivestreams.Publisher * * @see [GenerativeModel] */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public abstract class GenerativeModelFutures internal constructor() { /** diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt index 97b043312c4..1a436812b7c 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt @@ -29,6 +29,10 @@ import com.google.firebase.vertexai.type.PublicPreviewAPI * @see [ImagenModel] */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public abstract class ImagenModelFutures internal constructor() { /** * Generates an image, returning the result directly to the caller. diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt index cc8fb8893d7..437840d3da8 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt @@ -28,6 +28,10 @@ import com.google.firebase.vertexai.type.ServiceConnectionHandshakeFailedExcepti * @see [LiveGenerativeModel] */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public abstract class LiveModelFutures internal constructor() { /** diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt index 169f9723ad8..2adab441eca 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt @@ -38,6 +38,10 @@ import org.reactivestreams.Publisher * @see [LiveSession] */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public abstract class LiveSessionFutures internal constructor() { /** diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt index b84bd6929f4..257efcbbb6d 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt @@ -34,6 +34,10 @@ import kotlinx.serialization.json.JsonNames * @property citationMetadata Metadata about the sources used to generate this content. * @property finishReason The reason the model stopped generating content, if it exist. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class Candidate internal constructor( public val content: Content, @@ -106,6 +110,10 @@ internal constructor( * @property severity The severity of the potential harm. * @property severityScore A numerical score representing the severity of harm. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class SafetyRating internal constructor( public val category: HarmCategory, @@ -146,6 +154,10 @@ internal constructor( * @property citations A list of individual cited sources and the parts of the content to which they * apply. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class CitationMetadata internal constructor(public val citations: List) { @Serializable @@ -173,6 +185,10 @@ public class CitationMetadata internal constructor(public val citations: List) { @@ -41,6 +45,10 @@ constructor(public val role: String? = "user", public val parts: List) { } /** Builder class to facilitate constructing complex [Content] objects. */ + @Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" + ) public class Builder { /** The producer of the content. Must be either 'user' or 'model'. By default, it's "user". */ diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt index ecd4e74d80a..480d2b7b638 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt @@ -22,6 +22,10 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable /** Content part modality. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ContentModality private constructor(public val ordinal: Int) { @Serializable(Internal.Serializer::class) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt index 49f6b0433e0..815a0bbd8c0 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt @@ -33,6 +33,10 @@ import kotlinx.serialization.Serializable * @property promptTokensDetails The breakdown, by modality, of how many tokens are consumed by the * prompt. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class CountTokensResponse( public val totalTokens: Int, public val totalBillableCharacters: Int? = null, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt index 45e9ef027a6..0d669c94bab 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt @@ -21,6 +21,10 @@ import com.google.firebase.vertexai.common.FirebaseCommonAIException import kotlinx.coroutines.TimeoutCancellationException /** Parent class for any errors that occur from the [FirebaseVertexAI] SDK. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public abstract class FirebaseVertexAIException internal constructor(message: String, cause: Throwable? = null) : RuntimeException(message, cause) { @@ -103,15 +107,27 @@ internal constructor(message: String, cause: Throwable? = null) : RuntimeExcepti } /** Something went wrong while trying to deserialize a response from the server. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class SerializationException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) /** The server responded with a non 200 response code. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ServerException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) /** The provided API Key is not valid. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class InvalidAPIKeyException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) @@ -123,6 +139,10 @@ internal constructor(message: String, cause: Throwable? = null) : * * @property response The full server response. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class PromptBlockedException internal constructor( public val response: GenerateContentResponse?, @@ -136,6 +156,10 @@ internal constructor( internal constructor(message: String, cause: Throwable? = null) : this(null, cause, message) } +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ContentBlockedException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) @@ -148,6 +172,10 @@ internal constructor(message: String, cause: Throwable? = null) : * (countries and territories) where the API is available. */ // TODO(rlazo): Add secondary constructor to pass through the message? +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class UnsupportedUserLocationException internal constructor(cause: Throwable? = null) : FirebaseVertexAIException("User location is not supported for the API use.", cause) @@ -156,6 +184,10 @@ public class UnsupportedUserLocationException internal constructor(cause: Throwa * * Usually indicative of consumer error. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class InvalidStateException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) @@ -164,6 +196,10 @@ public class InvalidStateException internal constructor(message: String, cause: * * @property response The full server response. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ResponseStoppedException internal constructor(public val response: GenerateContentResponse, cause: Throwable? = null) : FirebaseVertexAIException( @@ -176,6 +212,10 @@ internal constructor(public val response: GenerateContentResponse, cause: Throwa * * Usually occurs due to a user specified [timeout][RequestOptions.timeout]. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class RequestTimeoutException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) @@ -186,6 +226,10 @@ internal constructor(message: String, cause: Throwable? = null) : * For a list of valid locations, see * [Vertex AI locations.](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#available-regions) */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class InvalidLocationException internal constructor(location: String, cause: Throwable? = null) : FirebaseVertexAIException("Invalid location \"${location}\"", cause) @@ -195,6 +239,10 @@ internal constructor(location: String, cause: Throwable? = null) : * in the * [Firebase documentation.](https://firebase.google.com/docs/vertex-ai/faq-and-troubleshooting#required-apis) */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ServiceDisabledException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) @@ -203,24 +251,44 @@ internal constructor(message: String, cause: Throwable? = null) : * The request has hit a quota limit. Learn more about quotas in the * [Firebase documentation.](https://firebase.google.com/docs/vertex-ai/quotas) */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class QuotaExceededException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) /** Streaming session already receiving. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class SessionAlreadyReceivingException : FirebaseVertexAIException( "This session is already receiving. Please call stopReceiving() before calling this again." ) /** Audio record initialization failures for audio streaming */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class AudioRecordInitializationFailedException(message: String) : FirebaseVertexAIException(message) /** Handshake failed with the server */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ServiceConnectionHandshakeFailedException(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) /** Catch all case for exceptions not explicitly expected. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class UnknownException internal constructor(message: String, cause: Throwable? = null) : FirebaseVertexAIException(message, cause) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt index ee557556bbc..7861904d347 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt @@ -24,6 +24,10 @@ import kotlinx.serialization.Serializable * * See the static methods in the `companion object` for the list of available behaviors. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class FunctionCallingConfig internal constructor( internal val mode: Mode, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt index 8813de18b43..6ae8e4283f1 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt @@ -52,6 +52,10 @@ import kotlinx.serialization.Serializable * function. * @see Schema */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class FunctionDeclaration( internal val name: String, internal val description: String, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt index 91c2cd8f4ea..a323c12a1f4 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt @@ -26,6 +26,10 @@ import kotlinx.serialization.Serializable * When streaming, it's only populated in the first response. * @property usageMetadata Information about the number of tokens in the prompt and in the response. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class GenerateContentResponse( public val candidates: List, public val promptFeedback: PromptFeedback?, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt index 88705c58a92..42f4dd64aff 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt @@ -78,6 +78,10 @@ import kotlinx.serialization.Serializable * [Control generated output](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output) * guide for more details. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class GenerationConfig private constructor( internal val temperature: Float?, @@ -123,6 +127,10 @@ private constructor( * * @see [generationConfig] */ + @Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" + ) public class Builder { @JvmField public var temperature: Float? = null @JvmField public var topK: Int? = null diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt index 1bd16949b20..61930db5a41 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt @@ -24,6 +24,10 @@ import kotlinx.serialization.Serializable * Specifies how the block method computes the score that will be compared against the * [HarmBlockThreshold] in [SafetySetting]. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class HarmBlockMethod private constructor(public val ordinal: Int) { internal fun toInternal() = when (this) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt index d200fef9bf3..2a714d2c945 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt @@ -21,6 +21,10 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable /** Represents the threshold for a [HarmCategory] to be allowed by [SafetySetting]. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class HarmBlockThreshold private constructor(public val ordinal: Int) { internal fun toInternal() = diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt index 2429688b02b..7fbf50f6dea 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt @@ -23,6 +23,10 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable /** Category for a given harm rating. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class HarmCategory private constructor(public val ordinal: Int) { internal fun toInternal() = when (this) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt index 3d13e177819..b8d50349569 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt @@ -22,6 +22,10 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable /** Represents the probability that some [HarmCategory] is applicable in a [SafetyRating]. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class HarmProbability private constructor(public val ordinal: Int) { @Serializable(Internal.Serializer::class) internal enum class Internal { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt index 0d0a39f2ac9..1647ef001ea 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt @@ -22,6 +22,10 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable /** Represents the severity of a [HarmCategory] being applicable in a [SafetyRating]. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class HarmSeverity private constructor(public val ordinal: Int) { @Serializable(Internal.Serializer::class) internal enum class Internal { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt index e605a6e987e..0617b86d2c1 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt @@ -18,6 +18,10 @@ package com.google.firebase.vertexai.type /** Represents the aspect ratio that the generated image should conform to. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenAspectRatio private constructor(internal val internalVal: String) { public companion object { /** A square image, useful for icons, profile pictures, etc. */ diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt index d05840d9cfc..c0655ec9114 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt @@ -29,6 +29,10 @@ package com.google.firebase.vertexai.type import kotlin.jvm.JvmField @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenGenerationConfig( public val negativePrompt: String? = null, public val numberOfImages: Int? = 1, @@ -42,6 +46,10 @@ public class ImagenGenerationConfig( * This is mainly intended for Java interop. For Kotlin, use [imagenGenerationConfig] for a more * idiomatic experience. */ + @Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" + ) public class Builder { @JvmField public var negativePrompt: String? = null @JvmField public var numberOfImages: Int? = 1 diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt index 454f526bbee..5cdf6e2d628 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt @@ -28,6 +28,10 @@ import kotlinx.serialization.Serializable * the reason they were filtered out. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenGenerationResponse internal constructor(public val images: List, public val filteredReason: String?) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt index 5a44ddc3964..780c240e2f0 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt @@ -27,6 +27,10 @@ import kotlinx.serialization.Serializable * for every MIME type. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenImageFormat private constructor(public val mimeType: String, public val compressionQuality: Int?) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt index 1004f0a57ac..a61dbee95cb 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt @@ -27,6 +27,10 @@ import android.graphics.BitmapFactory * `"image/jpeg"`; to request a different format, see [ImagenGenerationConfig.imageFormat]. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenInlineImage internal constructor(public val data: ByteArray, public val mimeType: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt index 14031c86766..6c60fe54549 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt @@ -18,6 +18,10 @@ package com.google.firebase.vertexai.type /** A filter used to prevent images from containing depictions of children or people. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenPersonFilterLevel private constructor(internal val internalVal: String) { public companion object { /** No filters applied. */ diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt index 205538ebc0a..f83d21a45ff 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt @@ -18,6 +18,10 @@ package com.google.firebase.vertexai.type /** Used for safety filtering. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenSafetyFilterLevel private constructor(internal val internalVal: String) { public companion object { /** Strongest filtering level, most strict blocking. */ diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt index d5a00b557bd..f2707f07f64 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt @@ -23,6 +23,10 @@ package com.google.firebase.vertexai.type * @param personFilterLevel Used to filter images containing people. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagenSafetySettings( internal val safetyFilterLevel: ImagenSafetyFilterLevel, internal val personFilterLevel: ImagenPersonFilterLevel, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt index 4ae1d5df255..89ef1785da4 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt @@ -23,6 +23,10 @@ package com.google.firebase.vertexai.type * included in the response. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class LiveContentResponse internal constructor( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt index 36879ff7cfd..2d1c60b2b87 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt @@ -65,6 +65,10 @@ import kotlinx.serialization.Serializable * guide for more details. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class LiveGenerationConfig private constructor( internal val temperature: Float?, @@ -102,6 +106,10 @@ private constructor( * * @property speechConfig See [LiveGenerationConfig.speechConfig] */ + @Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" + ) public class Builder { @JvmField public var temperature: Float? = null @JvmField public var topK: Int? = null diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt index e7d00714548..a55d3ec795e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt @@ -58,6 +58,10 @@ import kotlinx.serialization.json.decodeFromJsonElement /** Represents a live WebSocket session capable of streaming content to and from the server. */ @PublicPreviewAPI @OptIn(ExperimentalSerializationApi::class) +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class LiveSession internal constructor( private val session: ClientWebSocketSession, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt index 7e58c9cf43c..1cbbe88f450 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt @@ -27,6 +27,10 @@ import kotlinx.serialization.Serializable * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class MediaData(public val data: ByteArray, public val mimeType: String) { @Serializable internal class Internal( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt index 16b7b1e4207..67bc2ce6903 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt @@ -24,6 +24,10 @@ import kotlinx.serialization.Serializable * @property modality The modality associated with this token count. * @property tokenCount The number of tokens counted. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ModalityTokenCount private constructor(public val modality: ContentModality, public val tokenCount: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt index cb8c22d4b9f..674d6c96373 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt @@ -31,9 +31,17 @@ import kotlinx.serialization.json.jsonObject import org.json.JSONObject /** Interface representing data sent to and received from requests. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public interface Part {} /** Represents text or string based data sent to and received from requests. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class TextPart(public val text: String) : Part { @Serializable internal data class Internal(val text: String) : InternalPart @@ -45,6 +53,10 @@ public class TextPart(public val text: String) : Part { * * @param image [Bitmap] to convert into a [Part] */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ImagePart(public val image: Bitmap) : Part { internal fun toInlineDataPart() = @@ -61,6 +73,10 @@ public class ImagePart(public val image: Bitmap) : Part { * @param mimeType an IANA standard MIME type. For supported values, see the * [Vertex AI documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-multimodal-prompts#media_requirements) */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class InlineDataPart(public val inlineData: ByteArray, public val mimeType: String) : Part { @Serializable @@ -79,6 +95,10 @@ public class InlineDataPart(public val inlineData: ByteArray, public val mimeTyp * @param args the function parameters and values as a [Map] */ // TODO(b/410040441): Support id property +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class FunctionCallPart( public val name: String, public val args: Map, @@ -99,6 +119,10 @@ public class FunctionCallPart( * @param response the response produced by the function as a [JSONObject] */ // TODO(b/410040441): Support id property +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class FunctionResponsePart(public val name: String, public val response: JsonObject) : Part { @Serializable @@ -120,6 +144,10 @@ public class FunctionResponsePart(public val name: String, public val response: * @param mimeType an IANA standard MIME type. For supported MIME type values see the * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class FileDataPart(public val uri: String, public val mimeType: String) : Part { @Serializable diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt index f7e1ad0948a..d3a5b370b21 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt @@ -28,6 +28,10 @@ import kotlinx.serialization.Serializable * @param safetyRatings A list of relevant [SafetyRating]. * @param blockReasonMessage A message describing the reason that content was blocked, if any. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class PromptFeedback( public val blockReason: BlockReason?, public val safetyRatings: List, @@ -49,6 +53,10 @@ public class PromptFeedback( } /** Describes why content was blocked. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class BlockReason private constructor(public val name: String, public val ordinal: Int) { @Serializable(Internal.Serializer::class) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt index 9aa648b6d07..4595b9cbb0b 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt @@ -22,6 +22,10 @@ import kotlin.time.DurationUnit import kotlin.time.toDuration /** Configurable options unique to how requests to the backend are performed. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class RequestOptions internal constructor( internal val timeout: Duration, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt index 09343755216..beaba528da2 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt @@ -21,6 +21,10 @@ import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable /** Represents the type of content present in a response (e.g., text, image, audio). */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ResponseModality private constructor(public val ordinal: Int) { @Serializable(Internal.Serializer::class) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt index 8095c42c532..4a7038fa1b8 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt @@ -27,6 +27,10 @@ import kotlinx.serialization.Serializable * @param method Specify if the threshold is used for probability or severity score, if not * specified it will default to [HarmBlockMethod.PROBABILITY]. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class SafetySetting( internal val harmCategory: HarmCategory, internal val threshold: HarmBlockThreshold, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt index 869d83b0eb9..8e553953ac0 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt @@ -18,7 +18,15 @@ package com.google.firebase.vertexai.type import kotlinx.serialization.Serializable +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public abstract class StringFormat private constructor(internal val value: String) { + @Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" + ) public class Custom(value: String) : StringFormat(value) } @@ -32,6 +40,10 @@ public abstract class StringFormat private constructor(internal val value: Strin * encouraged. The more information the model has about what it's expected to generate, the better * the results. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class Schema internal constructor( public val type: String, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt index b058cb01ef2..6c8e6201dc9 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt @@ -21,6 +21,10 @@ import kotlinx.serialization.Serializable /** Speech configuration class for setting up the voice of the server's response. */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class SpeechConfig( /** The voice to be used for the server's speech response. */ public val voice: Voices diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt index e62e02f55b1..86a0dbbad4d 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt @@ -25,6 +25,10 @@ import kotlinx.serialization.json.JsonObject * * @param functionDeclarations The set of functions that this tool allows the model access to */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class Tool internal constructor(internal val functionDeclarations: List?) { internal fun toInternal() = Internal(functionDeclarations?.map { it.toInternal() } ?: emptyList()) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt index 99769ed46b6..8000489ac4a 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt @@ -25,6 +25,10 @@ import kotlinx.serialization.Serializable * * @param functionCallingConfig The config for function calling */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class ToolConfig(internal val functionCallingConfig: FunctionCallingConfig?) { internal fun toInternal() = diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt index 16200792f9c..57c03832b6a 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt @@ -29,6 +29,10 @@ import kotlinx.serialization.Serializable * @param candidatesTokensDetails The breakdown, by modality, of how many tokens are consumed by the * candidates. */ +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class UsageMetadata( public val promptTokenCount: Int, public val candidatesTokenCount: Int?, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt index b0bade40957..b0d0f028fb5 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt @@ -21,6 +21,10 @@ import kotlinx.serialization.Serializable /** Various voices supported by the server */ @PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) public class Voices private constructor(public val ordinal: Int) { @Serializable internal data class Internal(@SerialName("voice_name") val voiceName: String) From 416238392d7faa46ef0eebef7bb32db80947836c Mon Sep 17 00:00:00 2001 From: Daymon Date: Tue, 6 May 2025 16:24:23 -0500 Subject: [PATCH 02/13] Update vertex golden files --- .../firebase/vertexai/VertexAIStreamingSnapshotTests.kt | 7 +++---- firebase-vertexai/update_responses.sh | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt index 981144a8e14..54eb967fbb6 100644 --- a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt +++ b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt @@ -62,10 +62,9 @@ internal class VertexAIStreamingSnapshotTests { withTimeout(testTimeout) { val responseList = responses.toList() responseList.isEmpty() shouldBe false - responseList.forEach { - it.candidates.first().finishReason shouldBe FinishReason.STOP - it.candidates.first().content.parts.isEmpty() shouldBe false - it.candidates.first().safetyRatings.isEmpty() shouldBe false + responseList.last().candidates.first().apply { + finishReason shouldBe FinishReason.STOP + content.parts.isEmpty() shouldBe false } } } diff --git a/firebase-vertexai/update_responses.sh b/firebase-vertexai/update_responses.sh index 28b0be1a25a..7d6ea18e0ee 100755 --- a/firebase-vertexai/update_responses.sh +++ b/firebase-vertexai/update_responses.sh @@ -17,7 +17,7 @@ # This script replaces mock response files for Vertex AI unit tests with a fresh # clone of the shared repository of Vertex AI test data. -RESPONSES_VERSION='v7.*' # The major version of mock responses to use +RESPONSES_VERSION='v13.*' # The major version of mock responses to use REPO_NAME="vertexai-sdk-test-data" REPO_LINK="https://github.com/FirebaseExtended/$REPO_NAME.git" From f7a57ea035b9aeee26fd715e8109da1d224c04de Mon Sep 17 00:00:00 2001 From: Daymon Date: Tue, 6 May 2025 16:24:34 -0500 Subject: [PATCH 03/13] Add change from #6925 --- .../firebase/vertexai/type/Candidate.kt | 32 ++++++++++++------- .../firebase/vertexai/type/PromptFeedback.kt | 2 +- .../VertexAIStreamingSnapshotTests.kt | 15 +++++++++ .../vertexai/VertexAIUnarySnapshotTests.kt | 13 ++++++++ 4 files changed, 50 insertions(+), 12 deletions(-) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt index 257efcbbb6d..f447ce65762 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt @@ -21,6 +21,7 @@ package com.google.firebase.vertexai.type import com.google.firebase.vertexai.common.util.FirstOrdinalSerializer import java.util.Calendar import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.InternalSerializationApi import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -55,7 +56,7 @@ internal constructor( val groundingMetadata: GroundingMetadata? = null, ) { internal fun toPublic(): Candidate { - val safetyRatings = safetyRatings?.map { it.toPublic() }.orEmpty() + val safetyRatings = safetyRatings?.mapNotNull { it.toPublic() }.orEmpty() val citations = citationMetadata?.toPublic() val finishReason = finishReason?.toPublic() @@ -128,8 +129,8 @@ internal constructor( internal data class Internal @JvmOverloads constructor( - val category: HarmCategory.Internal, - val probability: HarmProbability.Internal, + val category: HarmCategory.Internal? = null, + val probability: HarmProbability.Internal? = null, val blocked: Boolean? = null, // TODO(): any reason not to default to false? val probabilityScore: Float? = null, val severity: HarmSeverity.Internal? = null, @@ -137,14 +138,23 @@ internal constructor( ) { internal fun toPublic() = - SafetyRating( - category = category.toPublic(), - probability = probability.toPublic(), - probabilityScore = probabilityScore ?: 0f, - blocked = blocked, - severity = severity?.toPublic(), - severityScore = severityScore - ) + /** + * Due to a bug in the backend, it's possible that we receive an invalid `SafetyRating` value, + * without either category or probability. We return null in those cases to enable filtering + * by the higher level types. + */ + if (category == null || probability == null) { + null + } else { + SafetyRating( + category = category.toPublic(), + probability = probability.toPublic(), + probabilityScore = probabilityScore ?: 0f, + blocked = blocked, + severity = severity?.toPublic(), + severityScore = severityScore + ) + } } } diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt index d3a5b370b21..58cf051a205 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt @@ -46,7 +46,7 @@ public class PromptFeedback( ) { internal fun toPublic(): PromptFeedback { - val safetyRatings = safetyRatings?.map { it.toPublic() }.orEmpty() + val safetyRatings = safetyRatings?.mapNotNull { it.toPublic() }.orEmpty() return PromptFeedback(blockReason?.toPublic(), safetyRatings, blockReasonMessage) } } diff --git a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt index 54eb967fbb6..05090264292 100644 --- a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt +++ b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIStreamingSnapshotTests.kt @@ -36,7 +36,10 @@ import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.toList import kotlinx.coroutines.withTimeout import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +@RunWith(RobolectricTestRunner::class) internal class VertexAIStreamingSnapshotTests { private val testTimeout = 5.seconds @@ -69,6 +72,18 @@ internal class VertexAIStreamingSnapshotTests { } } + @Test + fun `invalid safety ratings during image generation`() = + goldenVertexStreamingFile("streaming-success-image-invalid-safety-ratings.txt") { + val responses = model.generateContentStream("prompt") + + withTimeout(testTimeout) { + val responseList = responses.toList() + + responseList.isEmpty() shouldBe false + } + } + @Test fun `unknown enum in safety ratings`() = goldenVertexStreamingFile("streaming-success-unknown-safety-enum.txt") { diff --git a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIUnarySnapshotTests.kt b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIUnarySnapshotTests.kt index f3603814423..527b4fc4876 100644 --- a/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIUnarySnapshotTests.kt +++ b/firebase-vertexai/src/test/java/com/google/firebase/vertexai/VertexAIUnarySnapshotTests.kt @@ -55,8 +55,11 @@ import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive import org.json.JSONArray import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner @OptIn(PublicPreviewAPI::class) +@RunWith(RobolectricTestRunner::class) internal class VertexAIUnarySnapshotTests { private val testTimeout = 5.seconds @@ -125,6 +128,16 @@ internal class VertexAIUnarySnapshotTests { } } + @Test + fun `invalid safety ratings during image generation`() = + goldenVertexUnaryFile("unary-success-image-invalid-safety-ratings.json") { + withTimeout(testTimeout) { + val response = model.generateContent("prompt") + + response.candidates.isEmpty() shouldBe false + } + } + @Test fun `unknown enum in finish reason`() = goldenVertexUnaryFile("unary-failure-unknown-enum-finish-reason.json") { From 63f3f0b0ad1bc8ade41a2ee55c8937c24c1c6103 Mon Sep 17 00:00:00 2001 From: Daymon Date: Tue, 6 May 2025 16:26:47 -0500 Subject: [PATCH 04/13] Update CHANGELOG.md --- firebase-vertexai/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firebase-vertexai/CHANGELOG.md b/firebase-vertexai/CHANGELOG.md index 75622f2027c..a5706855076 100644 --- a/firebase-vertexai/CHANGELOG.md +++ b/firebase-vertexai/CHANGELOG.md @@ -1,4 +1,8 @@ # Unreleased +* [changed] The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK + (firebase-ai) to accommodate the evolving set of supported features and services. + + For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk # 16.4.0 From 5e32a37c6894c2e597aaecfc78eb1f95d3459855 Mon Sep 17 00:00:00 2001 From: Daymon Date: Tue, 6 May 2025 17:11:57 -0500 Subject: [PATCH 05/13] Update Candidate.kt --- .../main/kotlin/com/google/firebase/vertexai/type/Candidate.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt index f447ce65762..8ed3f7329ea 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt @@ -21,7 +21,6 @@ package com.google.firebase.vertexai.type import com.google.firebase.vertexai.common.util.FirstOrdinalSerializer import java.util.Calendar import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.InternalSerializationApi import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable From 2ccd928ce00f0d781d18f8c0b869a8e7c239c043 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 7 May 2025 11:08:27 -0500 Subject: [PATCH 06/13] Add #6939 --- .../com/google/firebase/vertexai/common/APIController.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/APIController.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/APIController.kt index f82d4866cf6..9f5d105328e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/APIController.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/APIController.kt @@ -164,7 +164,7 @@ internal constructor( "wss://firebasevertexai.googleapis.com/ws/google.firebase.vertexai.v1beta.LlmBidiService/BidiGenerateContent/locations/$location?key=$key" suspend fun getWebSocketSession(location: String): ClientWebSocketSession = - client.webSocketSession(getBidiEndpoint(location)) + client.webSocketSession(getBidiEndpoint(location)) { applyCommonHeaders() } fun generateContentStream( request: GenerateContentRequest @@ -197,6 +197,11 @@ internal constructor( is CountTokensRequest -> setBody(request) is GenerateImageRequest -> setBody(request) } + + applyCommonHeaders() + } + + private fun HttpRequestBuilder.applyCommonHeaders() { contentType(ContentType.Application.Json) header("x-goog-api-key", key) header("x-goog-api-client", apiClient) From 6becf20a09ef756951f68223dde8234cb847d78b Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 7 May 2025 11:12:24 -0500 Subject: [PATCH 07/13] Update CHANGELOG.md --- firebase-vertexai/CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/firebase-vertexai/CHANGELOG.md b/firebase-vertexai/CHANGELOG.md index a5706855076..3a0e0d02737 100644 --- a/firebase-vertexai/CHANGELOG.md +++ b/firebase-vertexai/CHANGELOG.md @@ -1,8 +1,11 @@ # Unreleased -* [changed] The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK - (firebase-ai) to accommodate the evolving set of supported features and services. +* [changed] **Renamed / Replaced:** Vertex AI in Firebase (`FirebaseVertexAI`) has been renamed and + replaced by the new Firebase AI SDK: `FirebaseAI`. This is to accomodate the evolving set of + supported features and services. Please migrate to the new `FirebaseAI` package. See details in the + [migration guide](/docs/vertex-ai/migrate-to-latest-sdk). - For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk + Note: Existing Vertex AI in Firebase users may continue to use the SDK and receive bug fixes but, + going forward, new features will only be added into the new Firebase AI SDK. # 16.4.0 From 89be05196dd63504e9c434f04bb261d1124286c2 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 7 May 2025 11:13:00 -0500 Subject: [PATCH 08/13] Remove space between Firebase and AI --- .../com/google/firebase/vertexai/Chat.kt | 2 +- .../firebase/vertexai/GenerativeModel.kt | 2 +- .../google/firebase/vertexai/ImagenModel.kt | 2 +- .../firebase/vertexai/LiveGenerativeModel.kt | 2 +- .../firebase/vertexai/java/ChatFutures.kt | 2 +- .../vertexai/java/GenerativeModelFutures.kt | 2 +- .../vertexai/java/ImagenModelFutures.kt | 2 +- .../vertexai/java/LiveModelFutures.kt | 2 +- .../vertexai/java/LiveSessionFutures.kt | 2 +- .../firebase/vertexai/type/Candidate.kt | 10 +++--- .../google/firebase/vertexai/type/Content.kt | 4 +-- .../firebase/vertexai/type/ContentModality.kt | 2 +- .../vertexai/type/CountTokensResponse.kt | 2 +- .../firebase/vertexai/type/Exceptions.kt | 34 +++++++++---------- .../vertexai/type/FunctionCallingConfig.kt | 2 +- .../vertexai/type/FunctionDeclaration.kt | 2 +- .../vertexai/type/GenerateContentResponse.kt | 2 +- .../vertexai/type/GenerationConfig.kt | 4 +-- .../firebase/vertexai/type/HarmBlockMethod.kt | 2 +- .../vertexai/type/HarmBlockThreshold.kt | 2 +- .../firebase/vertexai/type/HarmCategory.kt | 2 +- .../firebase/vertexai/type/HarmProbability.kt | 2 +- .../firebase/vertexai/type/HarmSeverity.kt | 2 +- .../vertexai/type/ImagenAspectRatio.kt | 2 +- .../vertexai/type/ImagenGenerationConfig.kt | 4 +-- .../vertexai/type/ImagenGenerationResponse.kt | 2 +- .../vertexai/type/ImagenImageFormat.kt | 2 +- .../vertexai/type/ImagenInlineImage.kt | 2 +- .../vertexai/type/ImagenPersonFilterLevel.kt | 2 +- .../vertexai/type/ImagenSafetyFilterLevel.kt | 2 +- .../vertexai/type/ImagenSafetySettings.kt | 2 +- .../vertexai/type/LiveContentResponse.kt | 2 +- .../vertexai/type/LiveGenerationConfig.kt | 4 +-- .../firebase/vertexai/type/LiveSession.kt | 2 +- .../firebase/vertexai/type/MediaData.kt | 2 +- .../vertexai/type/ModalityTokenCount.kt | 2 +- .../com/google/firebase/vertexai/type/Part.kt | 14 ++++---- .../firebase/vertexai/type/PromptFeedback.kt | 4 +-- .../firebase/vertexai/type/RequestOptions.kt | 2 +- .../vertexai/type/ResponseModality.kt | 2 +- .../firebase/vertexai/type/SafetySetting.kt | 2 +- .../google/firebase/vertexai/type/Schema.kt | 6 ++-- .../firebase/vertexai/type/SpeechConfig.kt | 2 +- .../com/google/firebase/vertexai/type/Tool.kt | 2 +- .../firebase/vertexai/type/ToolConfig.kt | 2 +- .../firebase/vertexai/type/UsageMetadata.kt | 2 +- .../google/firebase/vertexai/type/Voices.kt | 2 +- 47 files changed, 80 insertions(+), 80 deletions(-) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt index dd305faf669..3a4f193d2d9 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt @@ -45,7 +45,7 @@ import kotlinx.coroutines.flow.onEach * discussion). */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Chat( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt index 8da05e3a21b..c46ac7761e2 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt @@ -48,7 +48,7 @@ import kotlinx.serialization.ExperimentalSerializationApi * types. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class GenerativeModel diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt index f98df48a6ba..c687712ca7d 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt @@ -37,7 +37,7 @@ import com.google.firebase.vertexai.type.RequestOptions */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenModel diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt index 1f711116a9e..e513b40fd36 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt @@ -47,7 +47,7 @@ import kotlinx.serialization.json.JsonObject */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveGenerativeModel diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt index 0e21b3623d4..ad39af15557 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt @@ -31,7 +31,7 @@ import org.reactivestreams.Publisher * @see [Chat] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class ChatFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt index 90d7aec35bc..bacb7fe63c5 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt @@ -33,7 +33,7 @@ import org.reactivestreams.Publisher * @see [GenerativeModel] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class GenerativeModelFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt index 1a436812b7c..bf13659fb1d 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt @@ -30,7 +30,7 @@ import com.google.firebase.vertexai.type.PublicPreviewAPI */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class ImagenModelFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt index 437840d3da8..6889a898878 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt @@ -29,7 +29,7 @@ import com.google.firebase.vertexai.type.ServiceConnectionHandshakeFailedExcepti */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class LiveModelFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt index 2adab441eca..e764cf18ce0 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt @@ -39,7 +39,7 @@ import org.reactivestreams.Publisher */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class LiveSessionFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt index 8ed3f7329ea..071438c7190 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt @@ -35,7 +35,7 @@ import kotlinx.serialization.json.JsonNames * @property finishReason The reason the model stopped generating content, if it exist. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Candidate @@ -111,7 +111,7 @@ internal constructor( * @property severityScore A numerical score representing the severity of harm. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SafetyRating @@ -164,7 +164,7 @@ internal constructor( * apply. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class CitationMetadata internal constructor(public val citations: List) { @@ -195,7 +195,7 @@ public class CitationMetadata internal constructor(public val citations: List) { /** Builder class to facilitate constructing complex [Content] objects. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt index 480d2b7b638..416b765b951 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt @@ -23,7 +23,7 @@ import kotlinx.serialization.Serializable /** Content part modality. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ContentModality private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt index 815a0bbd8c0..40e36d11a32 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt @@ -34,7 +34,7 @@ import kotlinx.serialization.Serializable * prompt. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class CountTokensResponse( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt index 0d669c94bab..797537ebcb2 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt @@ -22,7 +22,7 @@ import kotlinx.coroutines.TimeoutCancellationException /** Parent class for any errors that occur from the [FirebaseVertexAI] SDK. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class FirebaseVertexAIException @@ -108,7 +108,7 @@ internal constructor(message: String, cause: Throwable? = null) : RuntimeExcepti /** Something went wrong while trying to deserialize a response from the server. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SerializationException @@ -117,7 +117,7 @@ internal constructor(message: String, cause: Throwable? = null) : /** The server responded with a non 200 response code. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ServerException internal constructor(message: String, cause: Throwable? = null) : @@ -125,7 +125,7 @@ public class ServerException internal constructor(message: String, cause: Throwa /** The provided API Key is not valid. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InvalidAPIKeyException @@ -140,7 +140,7 @@ internal constructor(message: String, cause: Throwable? = null) : * @property response The full server response. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class PromptBlockedException @@ -157,7 +157,7 @@ internal constructor( } @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ContentBlockedException @@ -173,7 +173,7 @@ internal constructor(message: String, cause: Throwable? = null) : */ // TODO(rlazo): Add secondary constructor to pass through the message? @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class UnsupportedUserLocationException internal constructor(cause: Throwable? = null) : @@ -185,7 +185,7 @@ public class UnsupportedUserLocationException internal constructor(cause: Throwa * Usually indicative of consumer error. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InvalidStateException internal constructor(message: String, cause: Throwable? = null) : @@ -197,7 +197,7 @@ public class InvalidStateException internal constructor(message: String, cause: * @property response The full server response. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ResponseStoppedException @@ -213,7 +213,7 @@ internal constructor(public val response: GenerateContentResponse, cause: Throwa * Usually occurs due to a user specified [timeout][RequestOptions.timeout]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class RequestTimeoutException @@ -227,7 +227,7 @@ internal constructor(message: String, cause: Throwable? = null) : * [Vertex AI locations.](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#available-regions) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InvalidLocationException @@ -240,7 +240,7 @@ internal constructor(location: String, cause: Throwable? = null) : * [Firebase documentation.](https://firebase.google.com/docs/vertex-ai/faq-and-troubleshooting#required-apis) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ServiceDisabledException @@ -252,7 +252,7 @@ internal constructor(message: String, cause: Throwable? = null) : * [Firebase documentation.](https://firebase.google.com/docs/vertex-ai/quotas) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class QuotaExceededException @@ -261,7 +261,7 @@ internal constructor(message: String, cause: Throwable? = null) : /** Streaming session already receiving. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SessionAlreadyReceivingException : @@ -271,7 +271,7 @@ public class SessionAlreadyReceivingException : /** Audio record initialization failures for audio streaming */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class AudioRecordInitializationFailedException(message: String) : @@ -279,7 +279,7 @@ public class AudioRecordInitializationFailedException(message: String) : /** Handshake failed with the server */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ServiceConnectionHandshakeFailedException(message: String, cause: Throwable? = null) : @@ -287,7 +287,7 @@ public class ServiceConnectionHandshakeFailedException(message: String, cause: T /** Catch all case for exceptions not explicitly expected. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class UnknownException internal constructor(message: String, cause: Throwable? = null) : diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt index 7861904d347..2a2f52c0257 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt @@ -25,7 +25,7 @@ import kotlinx.serialization.Serializable * See the static methods in the `companion object` for the list of available behaviors. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionCallingConfig diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt index 6ae8e4283f1..7407edccba3 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt @@ -53,7 +53,7 @@ import kotlinx.serialization.Serializable * @see Schema */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionDeclaration( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt index a323c12a1f4..d8ed9fa974e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt @@ -27,7 +27,7 @@ import kotlinx.serialization.Serializable * @property usageMetadata Information about the number of tokens in the prompt and in the response. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class GenerateContentResponse( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt index 42f4dd64aff..d50a0de3b6a 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt @@ -79,7 +79,7 @@ import kotlinx.serialization.Serializable * guide for more details. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class GenerationConfig @@ -128,7 +128,7 @@ private constructor( * @see [generationConfig] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt index 61930db5a41..787c5e3c91e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt @@ -25,7 +25,7 @@ import kotlinx.serialization.Serializable * [HarmBlockThreshold] in [SafetySetting]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmBlockMethod private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt index 2a714d2c945..5ca67d60674 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Represents the threshold for a [HarmCategory] to be allowed by [SafetySetting]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmBlockThreshold private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt index 7fbf50f6dea..13576484c3f 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt @@ -24,7 +24,7 @@ import kotlinx.serialization.Serializable /** Category for a given harm rating. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmCategory private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt index b8d50349569..ff9862dc1ef 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt @@ -23,7 +23,7 @@ import kotlinx.serialization.Serializable /** Represents the probability that some [HarmCategory] is applicable in a [SafetyRating]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmProbability private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt index 1647ef001ea..691a0961920 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt @@ -23,7 +23,7 @@ import kotlinx.serialization.Serializable /** Represents the severity of a [HarmCategory] being applicable in a [SafetyRating]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmSeverity private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt index 0617b86d2c1..d65a16382b3 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt @@ -19,7 +19,7 @@ package com.google.firebase.vertexai.type /** Represents the aspect ratio that the generated image should conform to. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenAspectRatio private constructor(internal val internalVal: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt index c0655ec9114..6e5e70b3e5b 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt @@ -30,7 +30,7 @@ import kotlin.jvm.JvmField @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenGenerationConfig( @@ -47,7 +47,7 @@ public class ImagenGenerationConfig( * idiomatic experience. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt index 5cdf6e2d628..f7f9129a12b 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt @@ -29,7 +29,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenGenerationResponse diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt index 780c240e2f0..4a2485e8b3a 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenImageFormat diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt index a61dbee95cb..87ca82de5cf 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt @@ -28,7 +28,7 @@ import android.graphics.BitmapFactory */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenInlineImage diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt index 6c60fe54549..1ba061e8366 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt @@ -19,7 +19,7 @@ package com.google.firebase.vertexai.type /** A filter used to prevent images from containing depictions of children or people. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenPersonFilterLevel private constructor(internal val internalVal: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt index f83d21a45ff..fa58e6b33a6 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt @@ -19,7 +19,7 @@ package com.google.firebase.vertexai.type /** Used for safety filtering. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenSafetyFilterLevel private constructor(internal val internalVal: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt index f2707f07f64..95de0ceea7d 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt @@ -24,7 +24,7 @@ package com.google.firebase.vertexai.type */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenSafetySettings( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt index 89ef1785da4..1bad31d2d38 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt @@ -24,7 +24,7 @@ package com.google.firebase.vertexai.type */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveContentResponse diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt index 2d1c60b2b87..029ce5fe6d5 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt @@ -66,7 +66,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveGenerationConfig @@ -107,7 +107,7 @@ private constructor( * @property speechConfig See [LiveGenerationConfig.speechConfig] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt index a55d3ec795e..996fe49f2f5 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt @@ -59,7 +59,7 @@ import kotlinx.serialization.json.decodeFromJsonElement @PublicPreviewAPI @OptIn(ExperimentalSerializationApi::class) @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveSession diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt index 1cbbe88f450..7faee425dcb 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class MediaData(public val data: ByteArray, public val mimeType: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt index 67bc2ce6903..5059a1bbb50 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt @@ -25,7 +25,7 @@ import kotlinx.serialization.Serializable * @property tokenCount The number of tokens counted. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ModalityTokenCount diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt index 674d6c96373..ef2939a52fc 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt @@ -32,14 +32,14 @@ import org.json.JSONObject /** Interface representing data sent to and received from requests. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public interface Part {} /** Represents text or string based data sent to and received from requests. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class TextPart(public val text: String) : Part { @@ -54,7 +54,7 @@ public class TextPart(public val text: String) : Part { * @param image [Bitmap] to convert into a [Part] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagePart(public val image: Bitmap) : Part { @@ -74,7 +74,7 @@ public class ImagePart(public val image: Bitmap) : Part { * [Vertex AI documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-multimodal-prompts#media_requirements) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InlineDataPart(public val inlineData: ByteArray, public val mimeType: String) : Part { @@ -96,7 +96,7 @@ public class InlineDataPart(public val inlineData: ByteArray, public val mimeTyp */ // TODO(b/410040441): Support id property @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionCallPart( @@ -120,7 +120,7 @@ public class FunctionCallPart( */ // TODO(b/410040441): Support id property @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionResponsePart(public val name: String, public val response: JsonObject) : Part { @@ -145,7 +145,7 @@ public class FunctionResponsePart(public val name: String, public val response: * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FileDataPart(public val uri: String, public val mimeType: String) : Part { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt index 58cf051a205..aecd358c86a 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt @@ -29,7 +29,7 @@ import kotlinx.serialization.Serializable * @param blockReasonMessage A message describing the reason that content was blocked, if any. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class PromptFeedback( @@ -54,7 +54,7 @@ public class PromptFeedback( /** Describes why content was blocked. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class BlockReason private constructor(public val name: String, public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt index 4595b9cbb0b..9d17f225087 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt @@ -23,7 +23,7 @@ import kotlin.time.toDuration /** Configurable options unique to how requests to the backend are performed. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class RequestOptions diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt index beaba528da2..a6dad4961b4 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Represents the type of content present in a response (e.g., text, image, audio). */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ResponseModality private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt index 4a7038fa1b8..57136578974 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.Serializable * specified it will default to [HarmBlockMethod.PROBABILITY]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SafetySetting( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt index 8e553953ac0..8e9a7c758f5 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt @@ -19,12 +19,12 @@ package com.google.firebase.vertexai.type import kotlinx.serialization.Serializable @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class StringFormat private constructor(internal val value: String) { @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Custom(value: String) : StringFormat(value) @@ -41,7 +41,7 @@ For migration details, see the migration guide: https://firebase.google.com/docs * the results. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Schema diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt index 6c8e6201dc9..8980e14027e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Speech configuration class for setting up the voice of the server's response. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SpeechConfig( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt index 86a0dbbad4d..86422be1ba1 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt @@ -26,7 +26,7 @@ import kotlinx.serialization.json.JsonObject * @param functionDeclarations The set of functions that this tool allows the model access to */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Tool diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt index 8000489ac4a..b93cfb02704 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt @@ -26,7 +26,7 @@ import kotlinx.serialization.Serializable * @param functionCallingConfig The config for function calling */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ToolConfig(internal val functionCallingConfig: FunctionCallingConfig?) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt index 57c03832b6a..a6f38f77ffa 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt @@ -30,7 +30,7 @@ import kotlinx.serialization.Serializable * candidates. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class UsageMetadata( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt index b0d0f028fb5..5eb2fe20c60 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Various voices supported by the server */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the Firebase AI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Voices private constructor(public val ordinal: Int) { From 8984652e84fdbc4dfe2167c99596f3c645aa4a85 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 7 May 2025 14:05:49 -0500 Subject: [PATCH 09/13] Add proto changes from #6910 --- firebase-vertexai/CHANGELOG.md | 6 + firebase-vertexai/api.txt | 1382 +++++++++-------- .../vertexai/java/LiveSessionFutures.kt | 8 +- .../vertexai/type/LiveContentResponse.kt | 65 - .../vertexai/type/LiveServerMessage.kt | 211 +++ .../firebase/vertexai/type/LiveSession.kt | 173 +-- .../com/google/firebase/vertexai/type/Part.kt | 51 +- 7 files changed, 1008 insertions(+), 888 deletions(-) delete mode 100644 firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt create mode 100644 firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt diff --git a/firebase-vertexai/CHANGELOG.md b/firebase-vertexai/CHANGELOG.md index 3a0e0d02737..4405362f5b7 100644 --- a/firebase-vertexai/CHANGELOG.md +++ b/firebase-vertexai/CHANGELOG.md @@ -6,6 +6,12 @@ Note: Existing Vertex AI in Firebase users may continue to use the SDK and receive bug fixes but, going forward, new features will only be added into the new Firebase AI SDK. +* [changed] **Breaking Change**: Removed the `LiveContentResponse.Status` class, and instead have nested the status + fields as properties of `LiveContentResponse`. (#6941) +* [changed] **Breaking Change**: Removed the `LiveContentResponse` class, and instead have provided subclasses + of `LiveServerMessage` that match the responses from the model. (#6941) +* [feature] Added support for the `id` field on `FunctionResponsePart` and `FunctionCallPart`. (#6941) +* [feature] Added a helper field for getting all the `InlineDataPart` from a `GenerateContentResponse`. (#6941) # 16.4.0 diff --git a/firebase-vertexai/api.txt b/firebase-vertexai/api.txt index dac472f2a0c..98559ca3abb 100644 --- a/firebase-vertexai/api.txt +++ b/firebase-vertexai/api.txt @@ -1,16 +1,16 @@ // Signature format: 3.0 package com.google.firebase.vertexai { - public final class Chat { - ctor public Chat(com.google.firebase.vertexai.GenerativeModel model, java.util.List history = java.util.ArrayList()); - method public java.util.List getHistory(); - method public suspend Object? sendMessage(android.graphics.Bitmap prompt, kotlin.coroutines.Continuation); - method public suspend Object? sendMessage(com.google.firebase.vertexai.type.Content prompt, kotlin.coroutines.Continuation); - method public suspend Object? sendMessage(String prompt, kotlin.coroutines.Continuation); - method public kotlinx.coroutines.flow.Flow sendMessageStream(android.graphics.Bitmap prompt); - method public kotlinx.coroutines.flow.Flow sendMessageStream(com.google.firebase.vertexai.type.Content prompt); - method public kotlinx.coroutines.flow.Flow sendMessageStream(String prompt); - property public final java.util.List history; + @Deprecated public final class Chat { + ctor @Deprecated public Chat(com.google.firebase.vertexai.GenerativeModel model, java.util.List history = java.util.ArrayList()); + method @Deprecated public java.util.List getHistory(); + method @Deprecated public suspend Object? sendMessage(android.graphics.Bitmap prompt, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? sendMessage(com.google.firebase.vertexai.type.Content prompt, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? sendMessage(String prompt, kotlin.coroutines.Continuation); + method @Deprecated public kotlinx.coroutines.flow.Flow sendMessageStream(android.graphics.Bitmap prompt); + method @Deprecated public kotlinx.coroutines.flow.Flow sendMessageStream(com.google.firebase.vertexai.type.Content prompt); + method @Deprecated public kotlinx.coroutines.flow.Flow sendMessageStream(String prompt); + property @Deprecated public final java.util.List history; } public final class FirebaseVertexAI { @@ -51,599 +51,623 @@ package com.google.firebase.vertexai { method public static com.google.firebase.vertexai.FirebaseVertexAI vertexAI(com.google.firebase.Firebase, com.google.firebase.FirebaseApp app = Firebase.app, String location = "us-central1"); } - public final class GenerativeModel { - method public suspend Object? countTokens(android.graphics.Bitmap prompt, kotlin.coroutines.Continuation); - method public suspend Object? countTokens(com.google.firebase.vertexai.type.Content[] prompt, kotlin.coroutines.Continuation); - method public suspend Object? countTokens(String prompt, kotlin.coroutines.Continuation); - method public suspend Object? generateContent(android.graphics.Bitmap prompt, kotlin.coroutines.Continuation); - method public suspend Object? generateContent(com.google.firebase.vertexai.type.Content[] prompt, kotlin.coroutines.Continuation); - method public suspend Object? generateContent(String prompt, kotlin.coroutines.Continuation); - method public kotlinx.coroutines.flow.Flow generateContentStream(android.graphics.Bitmap prompt); - method public kotlinx.coroutines.flow.Flow generateContentStream(com.google.firebase.vertexai.type.Content... prompt); - method public kotlinx.coroutines.flow.Flow generateContentStream(String prompt); - method public com.google.firebase.vertexai.Chat startChat(java.util.List history = emptyList()); + @Deprecated public final class GenerativeModel { + method @Deprecated public suspend Object? countTokens(android.graphics.Bitmap prompt, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? countTokens(com.google.firebase.vertexai.type.Content[] prompt, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? countTokens(String prompt, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? generateContent(android.graphics.Bitmap prompt, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? generateContent(com.google.firebase.vertexai.type.Content[] prompt, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? generateContent(String prompt, kotlin.coroutines.Continuation); + method @Deprecated public kotlinx.coroutines.flow.Flow generateContentStream(android.graphics.Bitmap prompt); + method @Deprecated public kotlinx.coroutines.flow.Flow generateContentStream(com.google.firebase.vertexai.type.Content... prompt); + method @Deprecated public kotlinx.coroutines.flow.Flow generateContentStream(String prompt); + method @Deprecated public com.google.firebase.vertexai.Chat startChat(java.util.List history = emptyList()); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenModel { - method public suspend Object? generateImages(String prompt, kotlin.coroutines.Continuation>); + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenModel { + method @Deprecated public suspend Object? generateImages(String prompt, kotlin.coroutines.Continuation>); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveGenerativeModel { - method public suspend Object? connect(kotlin.coroutines.Continuation); + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveGenerativeModel { + method @Deprecated public suspend Object? connect(kotlin.coroutines.Continuation); } } package com.google.firebase.vertexai.java { - public abstract class ChatFutures { - method public static final com.google.firebase.vertexai.java.ChatFutures from(com.google.firebase.vertexai.Chat chat); - method public abstract com.google.firebase.vertexai.Chat getChat(); - method public abstract com.google.common.util.concurrent.ListenableFuture sendMessage(com.google.firebase.vertexai.type.Content prompt); - method public abstract org.reactivestreams.Publisher sendMessageStream(com.google.firebase.vertexai.type.Content prompt); - field public static final com.google.firebase.vertexai.java.ChatFutures.Companion Companion; + @Deprecated public abstract class ChatFutures { + method @Deprecated public static final com.google.firebase.vertexai.java.ChatFutures from(com.google.firebase.vertexai.Chat chat); + method @Deprecated public abstract com.google.firebase.vertexai.Chat getChat(); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture sendMessage(com.google.firebase.vertexai.type.Content prompt); + method @Deprecated public abstract org.reactivestreams.Publisher sendMessageStream(com.google.firebase.vertexai.type.Content prompt); + field @Deprecated public static final com.google.firebase.vertexai.java.ChatFutures.Companion Companion; } - public static final class ChatFutures.Companion { - method public com.google.firebase.vertexai.java.ChatFutures from(com.google.firebase.vertexai.Chat chat); + @Deprecated public static final class ChatFutures.Companion { + method @Deprecated public com.google.firebase.vertexai.java.ChatFutures from(com.google.firebase.vertexai.Chat chat); } - public abstract class GenerativeModelFutures { - method public abstract com.google.common.util.concurrent.ListenableFuture countTokens(com.google.firebase.vertexai.type.Content... prompt); - method public static final com.google.firebase.vertexai.java.GenerativeModelFutures from(com.google.firebase.vertexai.GenerativeModel model); - method public abstract com.google.common.util.concurrent.ListenableFuture generateContent(com.google.firebase.vertexai.type.Content... prompt); - method public abstract org.reactivestreams.Publisher generateContentStream(com.google.firebase.vertexai.type.Content... prompt); - method public abstract com.google.firebase.vertexai.GenerativeModel getGenerativeModel(); - method public abstract com.google.firebase.vertexai.java.ChatFutures startChat(); - method public abstract com.google.firebase.vertexai.java.ChatFutures startChat(java.util.List history); - field public static final com.google.firebase.vertexai.java.GenerativeModelFutures.Companion Companion; + @Deprecated public abstract class GenerativeModelFutures { + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture countTokens(com.google.firebase.vertexai.type.Content... prompt); + method @Deprecated public static final com.google.firebase.vertexai.java.GenerativeModelFutures from(com.google.firebase.vertexai.GenerativeModel model); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture generateContent(com.google.firebase.vertexai.type.Content... prompt); + method @Deprecated public abstract org.reactivestreams.Publisher generateContentStream(com.google.firebase.vertexai.type.Content... prompt); + method @Deprecated public abstract com.google.firebase.vertexai.GenerativeModel getGenerativeModel(); + method @Deprecated public abstract com.google.firebase.vertexai.java.ChatFutures startChat(); + method @Deprecated public abstract com.google.firebase.vertexai.java.ChatFutures startChat(java.util.List history); + field @Deprecated public static final com.google.firebase.vertexai.java.GenerativeModelFutures.Companion Companion; } - public static final class GenerativeModelFutures.Companion { - method public com.google.firebase.vertexai.java.GenerativeModelFutures from(com.google.firebase.vertexai.GenerativeModel model); + @Deprecated public static final class GenerativeModelFutures.Companion { + method @Deprecated public com.google.firebase.vertexai.java.GenerativeModelFutures from(com.google.firebase.vertexai.GenerativeModel model); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public abstract class ImagenModelFutures { - method public static final com.google.firebase.vertexai.java.ImagenModelFutures from(com.google.firebase.vertexai.ImagenModel model); - method public abstract com.google.common.util.concurrent.ListenableFuture> generateImages(String prompt); - method public abstract com.google.firebase.vertexai.ImagenModel getImageModel(); - field public static final com.google.firebase.vertexai.java.ImagenModelFutures.Companion Companion; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public abstract class ImagenModelFutures { + method @Deprecated public static final com.google.firebase.vertexai.java.ImagenModelFutures from(com.google.firebase.vertexai.ImagenModel model); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture> generateImages(String prompt); + method @Deprecated public abstract com.google.firebase.vertexai.ImagenModel getImageModel(); + field @Deprecated public static final com.google.firebase.vertexai.java.ImagenModelFutures.Companion Companion; } - public static final class ImagenModelFutures.Companion { - method public com.google.firebase.vertexai.java.ImagenModelFutures from(com.google.firebase.vertexai.ImagenModel model); + @Deprecated public static final class ImagenModelFutures.Companion { + method @Deprecated public com.google.firebase.vertexai.java.ImagenModelFutures from(com.google.firebase.vertexai.ImagenModel model); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public abstract class LiveModelFutures { - method public abstract com.google.common.util.concurrent.ListenableFuture connect(); - method public static final com.google.firebase.vertexai.java.LiveModelFutures from(com.google.firebase.vertexai.LiveGenerativeModel model); - field public static final com.google.firebase.vertexai.java.LiveModelFutures.Companion Companion; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public abstract class LiveModelFutures { + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture connect(); + method @Deprecated public static final com.google.firebase.vertexai.java.LiveModelFutures from(com.google.firebase.vertexai.LiveGenerativeModel model); + field @Deprecated public static final com.google.firebase.vertexai.java.LiveModelFutures.Companion Companion; } - public static final class LiveModelFutures.Companion { - method public com.google.firebase.vertexai.java.LiveModelFutures from(com.google.firebase.vertexai.LiveGenerativeModel model); + @Deprecated public static final class LiveModelFutures.Companion { + method @Deprecated public com.google.firebase.vertexai.java.LiveModelFutures from(com.google.firebase.vertexai.LiveGenerativeModel model); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public abstract class LiveSessionFutures { - method public abstract com.google.common.util.concurrent.ListenableFuture close(); - method public static final com.google.firebase.vertexai.java.LiveSessionFutures from(com.google.firebase.vertexai.type.LiveSession session); - method public abstract org.reactivestreams.Publisher receive(); - method public abstract com.google.common.util.concurrent.ListenableFuture send(com.google.firebase.vertexai.type.Content content); - method public abstract com.google.common.util.concurrent.ListenableFuture send(String text); - method public abstract com.google.common.util.concurrent.ListenableFuture sendFunctionResponse(java.util.List functionList); - method public abstract com.google.common.util.concurrent.ListenableFuture sendMediaStream(java.util.List mediaChunks); - method @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public abstract com.google.common.util.concurrent.ListenableFuture startAudioConversation(); - method public abstract com.google.common.util.concurrent.ListenableFuture startAudioConversation(kotlin.jvm.functions.Function1? functionCallHandler); - method @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public abstract com.google.common.util.concurrent.ListenableFuture stopAudioConversation(); - method public abstract void stopReceiving(); - field public static final com.google.firebase.vertexai.java.LiveSessionFutures.Companion Companion; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public abstract class LiveSessionFutures { + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture close(); + method @Deprecated public static final com.google.firebase.vertexai.java.LiveSessionFutures from(com.google.firebase.vertexai.type.LiveSession session); + method @Deprecated public abstract org.reactivestreams.Publisher receive(); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture send(com.google.firebase.vertexai.type.Content content); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture send(String text); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture sendFunctionResponse(java.util.List functionList); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture sendMediaStream(java.util.List mediaChunks); + method @Deprecated @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public abstract com.google.common.util.concurrent.ListenableFuture startAudioConversation(); + method @Deprecated public abstract com.google.common.util.concurrent.ListenableFuture startAudioConversation(kotlin.jvm.functions.Function1? functionCallHandler); + method @Deprecated @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public abstract com.google.common.util.concurrent.ListenableFuture stopAudioConversation(); + method @Deprecated public abstract void stopReceiving(); + field @Deprecated public static final com.google.firebase.vertexai.java.LiveSessionFutures.Companion Companion; } - public static final class LiveSessionFutures.Companion { - method public com.google.firebase.vertexai.java.LiveSessionFutures from(com.google.firebase.vertexai.type.LiveSession session); + @Deprecated public static final class LiveSessionFutures.Companion { + method @Deprecated public com.google.firebase.vertexai.java.LiveSessionFutures from(com.google.firebase.vertexai.type.LiveSession session); } } package com.google.firebase.vertexai.type { - public final class AudioRecordInitializationFailedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - ctor public AudioRecordInitializationFailedException(String message); - } - - public final class BlockReason { - method public String getName(); - method public int getOrdinal(); - property public final String name; - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.BlockReason BLOCKLIST; - field public static final com.google.firebase.vertexai.type.BlockReason.Companion Companion; - field public static final com.google.firebase.vertexai.type.BlockReason OTHER; - field public static final com.google.firebase.vertexai.type.BlockReason PROHIBITED_CONTENT; - field public static final com.google.firebase.vertexai.type.BlockReason SAFETY; - field public static final com.google.firebase.vertexai.type.BlockReason UNKNOWN; - } - - public static final class BlockReason.Companion { - } - - public final class Candidate { - method public com.google.firebase.vertexai.type.CitationMetadata? getCitationMetadata(); - method public com.google.firebase.vertexai.type.Content getContent(); - method public com.google.firebase.vertexai.type.FinishReason? getFinishReason(); - method public java.util.List getSafetyRatings(); - property public final com.google.firebase.vertexai.type.CitationMetadata? citationMetadata; - property public final com.google.firebase.vertexai.type.Content content; - property public final com.google.firebase.vertexai.type.FinishReason? finishReason; - property public final java.util.List safetyRatings; - } - - public final class Citation { - method public int getEndIndex(); - method public String? getLicense(); - method public java.util.Calendar? getPublicationDate(); - method public int getStartIndex(); - method public String? getTitle(); - method public String? getUri(); - property public final int endIndex; - property public final String? license; - property public final java.util.Calendar? publicationDate; - property public final int startIndex; - property public final String? title; - property public final String? uri; - } - - public final class CitationMetadata { - method public java.util.List getCitations(); - property public final java.util.List citations; - } - - public final class Content { - ctor public Content(String? role = "user", java.util.List parts); - ctor public Content(java.util.List parts); - method public com.google.firebase.vertexai.type.Content copy(String? role = role, java.util.List parts = parts); - method public java.util.List getParts(); - method public String? getRole(); - property public final java.util.List parts; - property public final String? role; - } - - public static final class Content.Builder { - ctor public Content.Builder(); - method public com.google.firebase.vertexai.type.Content.Builder addFileData(String uri, String mimeType); - method public com.google.firebase.vertexai.type.Content.Builder addImage(android.graphics.Bitmap image); - method public com.google.firebase.vertexai.type.Content.Builder addInlineData(byte[] bytes, String mimeType); - method public com.google.firebase.vertexai.type.Content.Builder addPart(T data); - method public com.google.firebase.vertexai.type.Content.Builder addText(String text); - method public com.google.firebase.vertexai.type.Content build(); - method public java.util.List getParts(); - method public String? getRole(); - method public void setParts(java.util.List); - method public void setRole(String?); - property public final java.util.List parts; - property public final String? role; - } - - public final class ContentBlockedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + @Deprecated public final class AudioRecordInitializationFailedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + ctor @Deprecated public AudioRecordInitializationFailedException(String message); + } + + @Deprecated public final class BlockReason { + method @Deprecated public String getName(); + method @Deprecated public int getOrdinal(); + property @Deprecated public final String name; + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.BlockReason BLOCKLIST; + field @Deprecated public static final com.google.firebase.vertexai.type.BlockReason.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.BlockReason OTHER; + field @Deprecated public static final com.google.firebase.vertexai.type.BlockReason PROHIBITED_CONTENT; + field @Deprecated public static final com.google.firebase.vertexai.type.BlockReason SAFETY; + field @Deprecated public static final com.google.firebase.vertexai.type.BlockReason UNKNOWN; + } + + @Deprecated public static final class BlockReason.Companion { + } + + @Deprecated public final class Candidate { + method @Deprecated public com.google.firebase.vertexai.type.CitationMetadata? getCitationMetadata(); + method @Deprecated public com.google.firebase.vertexai.type.Content getContent(); + method @Deprecated public com.google.firebase.vertexai.type.FinishReason? getFinishReason(); + method @Deprecated public java.util.List getSafetyRatings(); + property @Deprecated public final com.google.firebase.vertexai.type.CitationMetadata? citationMetadata; + property @Deprecated public final com.google.firebase.vertexai.type.Content content; + property @Deprecated public final com.google.firebase.vertexai.type.FinishReason? finishReason; + property @Deprecated public final java.util.List safetyRatings; + } + + @Deprecated public final class Citation { + method @Deprecated public int getEndIndex(); + method @Deprecated public String? getLicense(); + method @Deprecated public java.util.Calendar? getPublicationDate(); + method @Deprecated public int getStartIndex(); + method @Deprecated public String? getTitle(); + method @Deprecated public String? getUri(); + property @Deprecated public final int endIndex; + property @Deprecated public final String? license; + property @Deprecated public final java.util.Calendar? publicationDate; + property @Deprecated public final int startIndex; + property @Deprecated public final String? title; + property @Deprecated public final String? uri; + } + + @Deprecated public final class CitationMetadata { + method @Deprecated public java.util.List getCitations(); + property @Deprecated public final java.util.List citations; + } + + @Deprecated public final class Content { + ctor @Deprecated public Content(String? role = "user", java.util.List parts); + ctor @Deprecated public Content(java.util.List parts); + method @Deprecated public com.google.firebase.vertexai.type.Content copy(String? role = role, java.util.List parts = parts); + method @Deprecated public java.util.List getParts(); + method @Deprecated public String? getRole(); + property @Deprecated public final java.util.List parts; + property @Deprecated public final String? role; + } + + @Deprecated public static final class Content.Builder { + ctor @Deprecated public Content.Builder(); + method @Deprecated public com.google.firebase.vertexai.type.Content.Builder addFileData(String uri, String mimeType); + method @Deprecated public com.google.firebase.vertexai.type.Content.Builder addImage(android.graphics.Bitmap image); + method @Deprecated public com.google.firebase.vertexai.type.Content.Builder addInlineData(byte[] bytes, String mimeType); + method @Deprecated public com.google.firebase.vertexai.type.Content.Builder addPart(T data); + method @Deprecated public com.google.firebase.vertexai.type.Content.Builder addText(String text); + method @Deprecated public com.google.firebase.vertexai.type.Content build(); + method @Deprecated public java.util.List getParts(); + method @Deprecated public String? getRole(); + method @Deprecated public void setParts(java.util.List); + method @Deprecated public void setRole(String?); + property @Deprecated public final java.util.List parts; + property @Deprecated public final String? role; + } + + @Deprecated public final class ContentBlockedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { } public final class ContentKt { method public static com.google.firebase.vertexai.type.Content content(String? role = "user", kotlin.jvm.functions.Function1 init); } - public final class ContentModality { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.ContentModality AUDIO; - field public static final com.google.firebase.vertexai.type.ContentModality.Companion Companion; - field public static final com.google.firebase.vertexai.type.ContentModality DOCUMENT; - field public static final com.google.firebase.vertexai.type.ContentModality IMAGE; - field public static final com.google.firebase.vertexai.type.ContentModality TEXT; - field public static final com.google.firebase.vertexai.type.ContentModality UNSPECIFIED; - field public static final com.google.firebase.vertexai.type.ContentModality VIDEO; + @Deprecated public final class ContentModality { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.ContentModality AUDIO; + field @Deprecated public static final com.google.firebase.vertexai.type.ContentModality.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.ContentModality DOCUMENT; + field @Deprecated public static final com.google.firebase.vertexai.type.ContentModality IMAGE; + field @Deprecated public static final com.google.firebase.vertexai.type.ContentModality TEXT; + field @Deprecated public static final com.google.firebase.vertexai.type.ContentModality UNSPECIFIED; + field @Deprecated public static final com.google.firebase.vertexai.type.ContentModality VIDEO; + } + + @Deprecated public static final class ContentModality.Companion { + } + + @Deprecated public final class CountTokensResponse { + ctor @Deprecated public CountTokensResponse(int totalTokens, Integer? totalBillableCharacters = null, java.util.List promptTokensDetails = emptyList()); + method @Deprecated public operator int component1(); + method @Deprecated public operator Integer? component2(); + method @Deprecated public operator java.util.List? component3(); + method @Deprecated public java.util.List getPromptTokensDetails(); + method @Deprecated public Integer? getTotalBillableCharacters(); + method @Deprecated public int getTotalTokens(); + property @Deprecated public final java.util.List promptTokensDetails; + property @Deprecated public final Integer? totalBillableCharacters; + property @Deprecated public final int totalTokens; + } + + @Deprecated public final class FileDataPart implements com.google.firebase.vertexai.type.Part { + ctor @Deprecated public FileDataPart(String uri, String mimeType); + method @Deprecated public String getMimeType(); + method @Deprecated public String getUri(); + property @Deprecated public final String mimeType; + property @Deprecated public final String uri; + } + + @Deprecated public final class FinishReason { + method @Deprecated public String getName(); + method @Deprecated public int getOrdinal(); + property @Deprecated public final String name; + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason BLOCKLIST; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason MALFORMED_FUNCTION_CALL; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason MAX_TOKENS; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason OTHER; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason PROHIBITED_CONTENT; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason RECITATION; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason SAFETY; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason SPII; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason STOP; + field @Deprecated public static final com.google.firebase.vertexai.type.FinishReason UNKNOWN; + } + + @Deprecated public static final class FinishReason.Companion { + } + + @Deprecated public abstract class FirebaseVertexAIException extends java.lang.RuntimeException { + } + + @Deprecated public final class FunctionCallPart implements com.google.firebase.vertexai.type.Part { + ctor @Deprecated public FunctionCallPart(String name, java.util.Map args); + ctor @Deprecated public FunctionCallPart(String name, java.util.Map args, String? id = null); + method @Deprecated public java.util.Map getArgs(); + method @Deprecated public String? getId(); + method @Deprecated public String getName(); + property @Deprecated public final java.util.Map args; + property @Deprecated public final String? id; + property @Deprecated public final String name; + } + + @Deprecated public final class FunctionCallingConfig { + method @Deprecated public static com.google.firebase.vertexai.type.FunctionCallingConfig any(); + method @Deprecated public static com.google.firebase.vertexai.type.FunctionCallingConfig any(java.util.List? allowedFunctionNames = null); + method @Deprecated public static com.google.firebase.vertexai.type.FunctionCallingConfig auto(); + method @Deprecated public static com.google.firebase.vertexai.type.FunctionCallingConfig none(); + field @Deprecated public static final com.google.firebase.vertexai.type.FunctionCallingConfig.Companion Companion; + } + + @Deprecated public static final class FunctionCallingConfig.Companion { + method @Deprecated public com.google.firebase.vertexai.type.FunctionCallingConfig any(); + method @Deprecated public com.google.firebase.vertexai.type.FunctionCallingConfig any(java.util.List? allowedFunctionNames = null); + method @Deprecated public com.google.firebase.vertexai.type.FunctionCallingConfig auto(); + method @Deprecated public com.google.firebase.vertexai.type.FunctionCallingConfig none(); + } + + @Deprecated public final class FunctionDeclaration { + ctor @Deprecated public FunctionDeclaration(String name, String description, java.util.Map parameters, java.util.List optionalParameters = emptyList()); + } + + @Deprecated public final class FunctionResponsePart implements com.google.firebase.vertexai.type.Part { + ctor @Deprecated public FunctionResponsePart(String name, kotlinx.serialization.json.JsonObject response); + ctor @Deprecated public FunctionResponsePart(String name, kotlinx.serialization.json.JsonObject response, String? id = null); + method @Deprecated public String? getId(); + method @Deprecated public String getName(); + method @Deprecated public kotlinx.serialization.json.JsonObject getResponse(); + property @Deprecated public final String? id; + property @Deprecated public final String name; + property @Deprecated public final kotlinx.serialization.json.JsonObject response; + } + + @Deprecated public final class GenerateContentResponse { + ctor @Deprecated public GenerateContentResponse(java.util.List candidates, com.google.firebase.vertexai.type.PromptFeedback? promptFeedback, com.google.firebase.vertexai.type.UsageMetadata? usageMetadata); + method @Deprecated public java.util.List getCandidates(); + method @Deprecated public java.util.List getFunctionCalls(); + method @Deprecated public java.util.List getInlineDataParts(); + method @Deprecated public com.google.firebase.vertexai.type.PromptFeedback? getPromptFeedback(); + method @Deprecated public String? getText(); + method @Deprecated public com.google.firebase.vertexai.type.UsageMetadata? getUsageMetadata(); + property @Deprecated public final java.util.List candidates; + property @Deprecated public final java.util.List functionCalls; + property @Deprecated public final java.util.List inlineDataParts; + property @Deprecated public final com.google.firebase.vertexai.type.PromptFeedback? promptFeedback; + property @Deprecated public final String? text; + property @Deprecated public final com.google.firebase.vertexai.type.UsageMetadata? usageMetadata; + } + + @Deprecated public final class GenerationConfig { + field @Deprecated public static final com.google.firebase.vertexai.type.GenerationConfig.Companion Companion; + } + + @Deprecated public static final class GenerationConfig.Builder { + ctor @Deprecated public GenerationConfig.Builder(); + method @Deprecated public com.google.firebase.vertexai.type.GenerationConfig build(); + field @Deprecated public Integer? candidateCount; + field @Deprecated public Float? frequencyPenalty; + field @Deprecated public Integer? maxOutputTokens; + field @Deprecated public Float? presencePenalty; + field @Deprecated public String? responseMimeType; + field @Deprecated public java.util.List? responseModalities; + field @Deprecated public com.google.firebase.vertexai.type.Schema? responseSchema; + field @Deprecated public java.util.List? stopSequences; + field @Deprecated public Float? temperature; + field @Deprecated public Integer? topK; + field @Deprecated public Float? topP; + } + + @Deprecated public static final class GenerationConfig.Companion { + method @Deprecated public com.google.firebase.vertexai.type.GenerationConfig.Builder builder(); } - public static final class ContentModality.Companion { - } - - public final class CountTokensResponse { - ctor public CountTokensResponse(int totalTokens, Integer? totalBillableCharacters = null, java.util.List promptTokensDetails = emptyList()); - method public operator int component1(); - method public operator Integer? component2(); - method public operator java.util.List? component3(); - method public java.util.List getPromptTokensDetails(); - method public Integer? getTotalBillableCharacters(); - method public int getTotalTokens(); - property public final java.util.List promptTokensDetails; - property public final Integer? totalBillableCharacters; - property public final int totalTokens; - } - - public final class FileDataPart implements com.google.firebase.vertexai.type.Part { - ctor public FileDataPart(String uri, String mimeType); - method public String getMimeType(); - method public String getUri(); - property public final String mimeType; - property public final String uri; - } - - public final class FinishReason { - method public String getName(); - method public int getOrdinal(); - property public final String name; - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.FinishReason BLOCKLIST; - field public static final com.google.firebase.vertexai.type.FinishReason.Companion Companion; - field public static final com.google.firebase.vertexai.type.FinishReason MALFORMED_FUNCTION_CALL; - field public static final com.google.firebase.vertexai.type.FinishReason MAX_TOKENS; - field public static final com.google.firebase.vertexai.type.FinishReason OTHER; - field public static final com.google.firebase.vertexai.type.FinishReason PROHIBITED_CONTENT; - field public static final com.google.firebase.vertexai.type.FinishReason RECITATION; - field public static final com.google.firebase.vertexai.type.FinishReason SAFETY; - field public static final com.google.firebase.vertexai.type.FinishReason SPII; - field public static final com.google.firebase.vertexai.type.FinishReason STOP; - field public static final com.google.firebase.vertexai.type.FinishReason UNKNOWN; - } - - public static final class FinishReason.Companion { - } - - public abstract class FirebaseVertexAIException extends java.lang.RuntimeException { - } - - public final class FunctionCallPart implements com.google.firebase.vertexai.type.Part { - ctor public FunctionCallPart(String name, java.util.Map args); - method public java.util.Map getArgs(); - method public String getName(); - property public final java.util.Map args; - property public final String name; - } - - public final class FunctionCallingConfig { - method public static com.google.firebase.vertexai.type.FunctionCallingConfig any(); - method public static com.google.firebase.vertexai.type.FunctionCallingConfig any(java.util.List? allowedFunctionNames = null); - method public static com.google.firebase.vertexai.type.FunctionCallingConfig auto(); - method public static com.google.firebase.vertexai.type.FunctionCallingConfig none(); - field public static final com.google.firebase.vertexai.type.FunctionCallingConfig.Companion Companion; - } - - public static final class FunctionCallingConfig.Companion { - method public com.google.firebase.vertexai.type.FunctionCallingConfig any(); - method public com.google.firebase.vertexai.type.FunctionCallingConfig any(java.util.List? allowedFunctionNames = null); - method public com.google.firebase.vertexai.type.FunctionCallingConfig auto(); - method public com.google.firebase.vertexai.type.FunctionCallingConfig none(); - } - - public final class FunctionDeclaration { - ctor public FunctionDeclaration(String name, String description, java.util.Map parameters, java.util.List optionalParameters = emptyList()); - } - - public final class FunctionResponsePart implements com.google.firebase.vertexai.type.Part { - ctor public FunctionResponsePart(String name, kotlinx.serialization.json.JsonObject response); - method public String getName(); - method public kotlinx.serialization.json.JsonObject getResponse(); - property public final String name; - property public final kotlinx.serialization.json.JsonObject response; + public final class GenerationConfigKt { + method public static com.google.firebase.vertexai.type.GenerationConfig generationConfig(kotlin.jvm.functions.Function1 init); } - public final class GenerateContentResponse { - ctor public GenerateContentResponse(java.util.List candidates, com.google.firebase.vertexai.type.PromptFeedback? promptFeedback, com.google.firebase.vertexai.type.UsageMetadata? usageMetadata); - method public java.util.List getCandidates(); - method public java.util.List getFunctionCalls(); - method public java.util.List getInlineDataParts(); - method public com.google.firebase.vertexai.type.PromptFeedback? getPromptFeedback(); - method public String? getText(); - method public com.google.firebase.vertexai.type.UsageMetadata? getUsageMetadata(); - property public final java.util.List candidates; - property public final java.util.List functionCalls; - property public final java.util.List inlineDataParts; - property public final com.google.firebase.vertexai.type.PromptFeedback? promptFeedback; - property public final String? text; - property public final com.google.firebase.vertexai.type.UsageMetadata? usageMetadata; + @Deprecated public final class HarmBlockMethod { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockMethod.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockMethod PROBABILITY; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockMethod SEVERITY; } - public final class GenerationConfig { - field public static final com.google.firebase.vertexai.type.GenerationConfig.Companion Companion; - } - - public static final class GenerationConfig.Builder { - ctor public GenerationConfig.Builder(); - method public com.google.firebase.vertexai.type.GenerationConfig build(); - field public Integer? candidateCount; - field public Float? frequencyPenalty; - field public Integer? maxOutputTokens; - field public Float? presencePenalty; - field public String? responseMimeType; - field public java.util.List? responseModalities; - field public com.google.firebase.vertexai.type.Schema? responseSchema; - field public java.util.List? stopSequences; - field public Float? temperature; - field public Integer? topK; - field public Float? topP; + @Deprecated public static final class HarmBlockMethod.Companion { } - public static final class GenerationConfig.Companion { - method public com.google.firebase.vertexai.type.GenerationConfig.Builder builder(); + @Deprecated public final class HarmBlockThreshold { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockThreshold.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockThreshold LOW_AND_ABOVE; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockThreshold MEDIUM_AND_ABOVE; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockThreshold NONE; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockThreshold OFF; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmBlockThreshold ONLY_HIGH; } - public final class GenerationConfigKt { - method public static com.google.firebase.vertexai.type.GenerationConfig generationConfig(kotlin.jvm.functions.Function1 init); + @Deprecated public static final class HarmBlockThreshold.Companion { } - public final class HarmBlockMethod { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.HarmBlockMethod.Companion Companion; - field public static final com.google.firebase.vertexai.type.HarmBlockMethod PROBABILITY; - field public static final com.google.firebase.vertexai.type.HarmBlockMethod SEVERITY; + @Deprecated public final class HarmCategory { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmCategory CIVIC_INTEGRITY; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmCategory.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmCategory DANGEROUS_CONTENT; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmCategory HARASSMENT; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmCategory HATE_SPEECH; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmCategory SEXUALLY_EXPLICIT; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmCategory UNKNOWN; } - public static final class HarmBlockMethod.Companion { + @Deprecated public static final class HarmCategory.Companion { } - public final class HarmBlockThreshold { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.HarmBlockThreshold.Companion Companion; - field public static final com.google.firebase.vertexai.type.HarmBlockThreshold LOW_AND_ABOVE; - field public static final com.google.firebase.vertexai.type.HarmBlockThreshold MEDIUM_AND_ABOVE; - field public static final com.google.firebase.vertexai.type.HarmBlockThreshold NONE; - field public static final com.google.firebase.vertexai.type.HarmBlockThreshold OFF; - field public static final com.google.firebase.vertexai.type.HarmBlockThreshold ONLY_HIGH; + @Deprecated public final class HarmProbability { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmProbability.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmProbability HIGH; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmProbability LOW; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmProbability MEDIUM; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmProbability NEGLIGIBLE; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmProbability UNKNOWN; } - public static final class HarmBlockThreshold.Companion { + @Deprecated public static final class HarmProbability.Companion { } - public final class HarmCategory { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.HarmCategory CIVIC_INTEGRITY; - field public static final com.google.firebase.vertexai.type.HarmCategory.Companion Companion; - field public static final com.google.firebase.vertexai.type.HarmCategory DANGEROUS_CONTENT; - field public static final com.google.firebase.vertexai.type.HarmCategory HARASSMENT; - field public static final com.google.firebase.vertexai.type.HarmCategory HATE_SPEECH; - field public static final com.google.firebase.vertexai.type.HarmCategory SEXUALLY_EXPLICIT; - field public static final com.google.firebase.vertexai.type.HarmCategory UNKNOWN; + @Deprecated public final class HarmSeverity { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmSeverity.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmSeverity HIGH; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmSeverity LOW; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmSeverity MEDIUM; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmSeverity NEGLIGIBLE; + field @Deprecated public static final com.google.firebase.vertexai.type.HarmSeverity UNKNOWN; } - public static final class HarmCategory.Companion { + @Deprecated public static final class HarmSeverity.Companion { } - public final class HarmProbability { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.HarmProbability.Companion Companion; - field public static final com.google.firebase.vertexai.type.HarmProbability HIGH; - field public static final com.google.firebase.vertexai.type.HarmProbability LOW; - field public static final com.google.firebase.vertexai.type.HarmProbability MEDIUM; - field public static final com.google.firebase.vertexai.type.HarmProbability NEGLIGIBLE; - field public static final com.google.firebase.vertexai.type.HarmProbability UNKNOWN; + @Deprecated public final class ImagePart implements com.google.firebase.vertexai.type.Part { + ctor @Deprecated public ImagePart(android.graphics.Bitmap image); + method @Deprecated public android.graphics.Bitmap getImage(); + property @Deprecated public final android.graphics.Bitmap image; } - public static final class HarmProbability.Companion { + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenAspectRatio { + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenAspectRatio.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenAspectRatio LANDSCAPE_16x9; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenAspectRatio LANDSCAPE_4x3; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenAspectRatio PORTRAIT_3x4; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenAspectRatio PORTRAIT_9x16; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenAspectRatio SQUARE_1x1; } - public final class HarmSeverity { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.HarmSeverity.Companion Companion; - field public static final com.google.firebase.vertexai.type.HarmSeverity HIGH; - field public static final com.google.firebase.vertexai.type.HarmSeverity LOW; - field public static final com.google.firebase.vertexai.type.HarmSeverity MEDIUM; - field public static final com.google.firebase.vertexai.type.HarmSeverity NEGLIGIBLE; - field public static final com.google.firebase.vertexai.type.HarmSeverity UNKNOWN; + @Deprecated public static final class ImagenAspectRatio.Companion { } - public static final class HarmSeverity.Companion { + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenGenerationConfig { + ctor @Deprecated public ImagenGenerationConfig(String? negativePrompt = null, Integer? numberOfImages = 1, com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio = null, com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat = null, Boolean? addWatermark = null); + method @Deprecated public Boolean? getAddWatermark(); + method @Deprecated public com.google.firebase.vertexai.type.ImagenAspectRatio? getAspectRatio(); + method @Deprecated public com.google.firebase.vertexai.type.ImagenImageFormat? getImageFormat(); + method @Deprecated public String? getNegativePrompt(); + method @Deprecated public Integer? getNumberOfImages(); + property @Deprecated public final Boolean? addWatermark; + property @Deprecated public final com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio; + property @Deprecated public final com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat; + property @Deprecated public final String? negativePrompt; + property @Deprecated public final Integer? numberOfImages; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenGenerationConfig.Companion Companion; } - public final class ImagePart implements com.google.firebase.vertexai.type.Part { - ctor public ImagePart(android.graphics.Bitmap image); - method public android.graphics.Bitmap getImage(); - property public final android.graphics.Bitmap image; + @Deprecated public static final class ImagenGenerationConfig.Builder { + ctor @Deprecated public ImagenGenerationConfig.Builder(); + method @Deprecated public com.google.firebase.vertexai.type.ImagenGenerationConfig build(); + method @Deprecated public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setAddWatermark(boolean addWatermark); + method @Deprecated public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setAspectRatio(com.google.firebase.vertexai.type.ImagenAspectRatio aspectRatio); + method @Deprecated public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setImageFormat(com.google.firebase.vertexai.type.ImagenImageFormat imageFormat); + method @Deprecated public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setNegativePrompt(String negativePrompt); + method @Deprecated public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setNumberOfImages(int numberOfImages); + field @Deprecated public Boolean? addWatermark; + field @Deprecated public com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio; + field @Deprecated public com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat; + field @Deprecated public String? negativePrompt; + field @Deprecated public Integer? numberOfImages; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenAspectRatio { - field public static final com.google.firebase.vertexai.type.ImagenAspectRatio.Companion Companion; - field public static final com.google.firebase.vertexai.type.ImagenAspectRatio LANDSCAPE_16x9; - field public static final com.google.firebase.vertexai.type.ImagenAspectRatio LANDSCAPE_4x3; - field public static final com.google.firebase.vertexai.type.ImagenAspectRatio PORTRAIT_3x4; - field public static final com.google.firebase.vertexai.type.ImagenAspectRatio PORTRAIT_9x16; - field public static final com.google.firebase.vertexai.type.ImagenAspectRatio SQUARE_1x1; + @Deprecated public static final class ImagenGenerationConfig.Companion { + method @Deprecated public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder builder(); } - public static final class ImagenAspectRatio.Companion { + public final class ImagenGenerationConfigKt { + method @com.google.firebase.vertexai.type.PublicPreviewAPI public static com.google.firebase.vertexai.type.ImagenGenerationConfig imagenGenerationConfig(kotlin.jvm.functions.Function1 init); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenGenerationConfig { - ctor public ImagenGenerationConfig(String? negativePrompt = null, Integer? numberOfImages = 1, com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio = null, com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat = null, Boolean? addWatermark = null); - method public Boolean? getAddWatermark(); - method public com.google.firebase.vertexai.type.ImagenAspectRatio? getAspectRatio(); - method public com.google.firebase.vertexai.type.ImagenImageFormat? getImageFormat(); - method public String? getNegativePrompt(); - method public Integer? getNumberOfImages(); - property public final Boolean? addWatermark; - property public final com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio; - property public final com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat; - property public final String? negativePrompt; - property public final Integer? numberOfImages; - field public static final com.google.firebase.vertexai.type.ImagenGenerationConfig.Companion Companion; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenGenerationResponse { + method @Deprecated public String? getFilteredReason(); + method @Deprecated public java.util.List getImages(); + property @Deprecated public final String? filteredReason; + property @Deprecated public final java.util.List images; } - public static final class ImagenGenerationConfig.Builder { - ctor public ImagenGenerationConfig.Builder(); - method public com.google.firebase.vertexai.type.ImagenGenerationConfig build(); - method public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setAddWatermark(boolean addWatermark); - method public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setAspectRatio(com.google.firebase.vertexai.type.ImagenAspectRatio aspectRatio); - method public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setImageFormat(com.google.firebase.vertexai.type.ImagenImageFormat imageFormat); - method public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setNegativePrompt(String negativePrompt); - method public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder setNumberOfImages(int numberOfImages); - field public Boolean? addWatermark; - field public com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio; - field public com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat; - field public String? negativePrompt; - field public Integer? numberOfImages; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenImageFormat { + method @Deprecated public Integer? getCompressionQuality(); + method @Deprecated public String getMimeType(); + method @Deprecated public static com.google.firebase.vertexai.type.ImagenImageFormat jpeg(Integer? compressionQuality = null); + method @Deprecated public static com.google.firebase.vertexai.type.ImagenImageFormat png(); + property @Deprecated public final Integer? compressionQuality; + property @Deprecated public final String mimeType; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenImageFormat.Companion Companion; } - public static final class ImagenGenerationConfig.Companion { - method public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder builder(); + @Deprecated public static final class ImagenImageFormat.Companion { + method @Deprecated public com.google.firebase.vertexai.type.ImagenImageFormat jpeg(Integer? compressionQuality = null); + method @Deprecated public com.google.firebase.vertexai.type.ImagenImageFormat png(); } - public final class ImagenGenerationConfigKt { - method @com.google.firebase.vertexai.type.PublicPreviewAPI public static com.google.firebase.vertexai.type.ImagenGenerationConfig imagenGenerationConfig(kotlin.jvm.functions.Function1 init); + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenInlineImage { + method @Deprecated public android.graphics.Bitmap asBitmap(); + method @Deprecated public byte[] getData(); + method @Deprecated public String getMimeType(); + property @Deprecated public final byte[] data; + property @Deprecated public final String mimeType; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenGenerationResponse { - method public String? getFilteredReason(); - method public java.util.List getImages(); - property public final String? filteredReason; - property public final java.util.List images; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenPersonFilterLevel { + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel ALLOW_ADULT; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel ALLOW_ALL; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel BLOCK_ALL; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel.Companion Companion; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenImageFormat { - method public Integer? getCompressionQuality(); - method public String getMimeType(); - method public static com.google.firebase.vertexai.type.ImagenImageFormat jpeg(Integer? compressionQuality = null); - method public static com.google.firebase.vertexai.type.ImagenImageFormat png(); - property public final Integer? compressionQuality; - property public final String mimeType; - field public static final com.google.firebase.vertexai.type.ImagenImageFormat.Companion Companion; + @Deprecated public static final class ImagenPersonFilterLevel.Companion { } - public static final class ImagenImageFormat.Companion { - method public com.google.firebase.vertexai.type.ImagenImageFormat jpeg(Integer? compressionQuality = null); - method public com.google.firebase.vertexai.type.ImagenImageFormat png(); + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenSafetyFilterLevel { + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_LOW_AND_ABOVE; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_MEDIUM_AND_ABOVE; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_NONE; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_ONLY_HIGH; + field @Deprecated public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel.Companion Companion; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenInlineImage { - method public android.graphics.Bitmap asBitmap(); - method public byte[] getData(); - method public String getMimeType(); - property public final byte[] data; - property public final String mimeType; + @Deprecated public static final class ImagenSafetyFilterLevel.Companion { } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenPersonFilterLevel { - field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel ALLOW_ADULT; - field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel ALLOW_ALL; - field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel BLOCK_ALL; - field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel.Companion Companion; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenSafetySettings { + ctor @Deprecated public ImagenSafetySettings(com.google.firebase.vertexai.type.ImagenSafetyFilterLevel safetyFilterLevel, com.google.firebase.vertexai.type.ImagenPersonFilterLevel personFilterLevel); } - public static final class ImagenPersonFilterLevel.Companion { + @Deprecated public final class InlineDataPart implements com.google.firebase.vertexai.type.Part { + ctor @Deprecated public InlineDataPart(byte[] inlineData, String mimeType); + method @Deprecated public byte[] getInlineData(); + method @Deprecated public String getMimeType(); + property @Deprecated public final byte[] inlineData; + property @Deprecated public final String mimeType; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenSafetyFilterLevel { - field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_LOW_AND_ABOVE; - field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_MEDIUM_AND_ABOVE; - field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_NONE; - field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_ONLY_HIGH; - field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel.Companion Companion; + @Deprecated public final class InvalidAPIKeyException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { } - public static final class ImagenSafetyFilterLevel.Companion { + @Deprecated public final class InvalidLocationException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenSafetySettings { - ctor public ImagenSafetySettings(com.google.firebase.vertexai.type.ImagenSafetyFilterLevel safetyFilterLevel, com.google.firebase.vertexai.type.ImagenPersonFilterLevel personFilterLevel); + @Deprecated public final class InvalidStateException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { } - public final class InlineDataPart implements com.google.firebase.vertexai.type.Part { - ctor public InlineDataPart(byte[] inlineData, String mimeType); - method public byte[] getInlineData(); - method public String getMimeType(); - property public final byte[] inlineData; - property public final String mimeType; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveGenerationConfig { + field @Deprecated public static final com.google.firebase.vertexai.type.LiveGenerationConfig.Companion Companion; } - public final class InvalidAPIKeyException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + @Deprecated public static final class LiveGenerationConfig.Builder { + ctor @Deprecated public LiveGenerationConfig.Builder(); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig build(); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setCandidateCount(Integer? candidateCount); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setFrequencyPenalty(Float? frequencyPenalty); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setMaxOutputTokens(Integer? maxOutputTokens); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setPresencePenalty(Float? presencePenalty); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setResponseModality(com.google.firebase.vertexai.type.ResponseModality? responseModality); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setSpeechConfig(com.google.firebase.vertexai.type.SpeechConfig? speechConfig); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setTemperature(Float? temperature); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setTopK(Integer? topK); + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setTopP(Float? topP); + field @Deprecated public Integer? candidateCount; + field @Deprecated public Float? frequencyPenalty; + field @Deprecated public Integer? maxOutputTokens; + field @Deprecated public Float? presencePenalty; + field @Deprecated public com.google.firebase.vertexai.type.ResponseModality? responseModality; + field @Deprecated public com.google.firebase.vertexai.type.SpeechConfig? speechConfig; + field @Deprecated public Float? temperature; + field @Deprecated public Integer? topK; + field @Deprecated public Float? topP; } - public final class InvalidLocationException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + @Deprecated public static final class LiveGenerationConfig.Companion { + method @Deprecated public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder builder(); } - public final class InvalidStateException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + public final class LiveGenerationConfigKt { + method public static com.google.firebase.vertexai.type.LiveGenerationConfig liveGenerationConfig(kotlin.jvm.functions.Function1 init); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveContentResponse { - method public com.google.firebase.vertexai.type.Content? getData(); - method public java.util.List? getFunctionCalls(); - method public Boolean? getInterrupted(); - method public String? getText(); - method public Boolean? getTurnComplete(); - property public final com.google.firebase.vertexai.type.Content? data; - property public final java.util.List? functionCalls; - property public final Boolean? interrupted; - property public final String? text; - property public final Boolean? turnComplete; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveServerContent implements com.google.firebase.vertexai.type.LiveServerMessage { + ctor @Deprecated public LiveServerContent(com.google.firebase.vertexai.type.Content? content, boolean interrupted, boolean turnComplete, boolean generationComplete); + method @Deprecated public com.google.firebase.vertexai.type.Content? getContent(); + method @Deprecated public boolean getGenerationComplete(); + method @Deprecated public boolean getInterrupted(); + method @Deprecated public boolean getTurnComplete(); + property @Deprecated public final com.google.firebase.vertexai.type.Content? content; + property @Deprecated public final boolean generationComplete; + property @Deprecated public final boolean interrupted; + property @Deprecated public final boolean turnComplete; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveGenerationConfig { - field public static final com.google.firebase.vertexai.type.LiveGenerationConfig.Companion Companion; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public interface LiveServerMessage { } - public static final class LiveGenerationConfig.Builder { - ctor public LiveGenerationConfig.Builder(); - method public com.google.firebase.vertexai.type.LiveGenerationConfig build(); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setCandidateCount(Integer? candidateCount); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setFrequencyPenalty(Float? frequencyPenalty); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setMaxOutputTokens(Integer? maxOutputTokens); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setPresencePenalty(Float? presencePenalty); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setResponseModality(com.google.firebase.vertexai.type.ResponseModality? responseModality); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setSpeechConfig(com.google.firebase.vertexai.type.SpeechConfig? speechConfig); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setTemperature(Float? temperature); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setTopK(Integer? topK); - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder setTopP(Float? topP); - field public Integer? candidateCount; - field public Float? frequencyPenalty; - field public Integer? maxOutputTokens; - field public Float? presencePenalty; - field public com.google.firebase.vertexai.type.ResponseModality? responseModality; - field public com.google.firebase.vertexai.type.SpeechConfig? speechConfig; - field public Float? temperature; - field public Integer? topK; - field public Float? topP; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveServerSetupComplete implements com.google.firebase.vertexai.type.LiveServerMessage { + ctor @Deprecated public LiveServerSetupComplete(); } - public static final class LiveGenerationConfig.Companion { - method public com.google.firebase.vertexai.type.LiveGenerationConfig.Builder builder(); + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveServerToolCall implements com.google.firebase.vertexai.type.LiveServerMessage { + ctor @Deprecated public LiveServerToolCall(java.util.List functionCalls); + method @Deprecated public java.util.List getFunctionCalls(); + property @Deprecated public final java.util.List functionCalls; } - public final class LiveGenerationConfigKt { - method public static com.google.firebase.vertexai.type.LiveGenerationConfig liveGenerationConfig(kotlin.jvm.functions.Function1 init); + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveServerToolCallCancellation implements com.google.firebase.vertexai.type.LiveServerMessage { + ctor @Deprecated public LiveServerToolCallCancellation(java.util.List functionIds); + method @Deprecated public java.util.List getFunctionIds(); + property @Deprecated public final java.util.List functionIds; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveSession { - method public suspend Object? close(kotlin.coroutines.Continuation); - method public kotlinx.coroutines.flow.Flow receive(); - method public suspend Object? send(com.google.firebase.vertexai.type.Content content, kotlin.coroutines.Continuation); - method public suspend Object? send(String text, kotlin.coroutines.Continuation); - method public suspend Object? sendFunctionResponse(java.util.List functionList, kotlin.coroutines.Continuation); - method public suspend Object? sendMediaStream(java.util.List mediaChunks, kotlin.coroutines.Continuation); - method @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public suspend Object? startAudioConversation(kotlin.jvm.functions.Function1? functionCallHandler = null, kotlin.coroutines.Continuation); - method public void stopAudioConversation(); - method public void stopReceiving(); + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class LiveSession { + method @Deprecated public suspend Object? close(kotlin.coroutines.Continuation); + method @Deprecated public kotlinx.coroutines.flow.Flow receive(); + method @Deprecated public suspend Object? send(com.google.firebase.vertexai.type.Content content, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? send(String text, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? sendFunctionResponse(java.util.List functionList, kotlin.coroutines.Continuation); + method @Deprecated public suspend Object? sendMediaStream(java.util.List mediaChunks, kotlin.coroutines.Continuation); + method @Deprecated @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public suspend Object? startAudioConversation(kotlin.jvm.functions.Function1? functionCallHandler = null, kotlin.coroutines.Continuation); + method @Deprecated public void stopAudioConversation(); + method @Deprecated public void stopReceiving(); } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class MediaData { - ctor public MediaData(byte[] data, String mimeType); - method public byte[] getData(); - method public String getMimeType(); - property public final byte[] data; - property public final String mimeType; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class MediaData { + ctor @Deprecated public MediaData(byte[] data, String mimeType); + method @Deprecated public byte[] getData(); + method @Deprecated public String getMimeType(); + property @Deprecated public final byte[] data; + property @Deprecated public final String mimeType; } - public final class ModalityTokenCount { - method public operator com.google.firebase.vertexai.type.ContentModality component1(); - method public operator int component2(); - method public com.google.firebase.vertexai.type.ContentModality getModality(); - method public int getTokenCount(); - property public final com.google.firebase.vertexai.type.ContentModality modality; - property public final int tokenCount; + @Deprecated public final class ModalityTokenCount { + method @Deprecated public operator com.google.firebase.vertexai.type.ContentModality component1(); + method @Deprecated public operator int component2(); + method @Deprecated public com.google.firebase.vertexai.type.ContentModality getModality(); + method @Deprecated public int getTokenCount(); + property @Deprecated public final com.google.firebase.vertexai.type.ContentModality modality; + property @Deprecated public final int tokenCount; } - public interface Part { + @Deprecated public interface Part { } public final class PartKt { @@ -653,234 +677,234 @@ package com.google.firebase.vertexai.type { method public static String? asTextOrNull(com.google.firebase.vertexai.type.Part); } - public final class PromptBlockedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - method public com.google.firebase.vertexai.type.GenerateContentResponse? getResponse(); - property public final com.google.firebase.vertexai.type.GenerateContentResponse? response; + @Deprecated public final class PromptBlockedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + method @Deprecated public com.google.firebase.vertexai.type.GenerateContentResponse? getResponse(); + property @Deprecated public final com.google.firebase.vertexai.type.GenerateContentResponse? response; } - public final class PromptFeedback { - ctor public PromptFeedback(com.google.firebase.vertexai.type.BlockReason? blockReason, java.util.List safetyRatings, String? blockReasonMessage); - method public com.google.firebase.vertexai.type.BlockReason? getBlockReason(); - method public String? getBlockReasonMessage(); - method public java.util.List getSafetyRatings(); - property public final com.google.firebase.vertexai.type.BlockReason? blockReason; - property public final String? blockReasonMessage; - property public final java.util.List safetyRatings; + @Deprecated public final class PromptFeedback { + ctor @Deprecated public PromptFeedback(com.google.firebase.vertexai.type.BlockReason? blockReason, java.util.List safetyRatings, String? blockReasonMessage); + method @Deprecated public com.google.firebase.vertexai.type.BlockReason? getBlockReason(); + method @Deprecated public String? getBlockReasonMessage(); + method @Deprecated public java.util.List getSafetyRatings(); + property @Deprecated public final com.google.firebase.vertexai.type.BlockReason? blockReason; + property @Deprecated public final String? blockReasonMessage; + property @Deprecated public final java.util.List safetyRatings; } @kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.ERROR, message="This API is part of an experimental public preview and may change in " + "backwards-incompatible ways without notice.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface PublicPreviewAPI { } - public final class QuotaExceededException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - } - - public final class RequestOptions { - ctor public RequestOptions(); - ctor public RequestOptions(long timeoutInMillis = 180.seconds.inWholeMilliseconds); - } - - public final class RequestTimeoutException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - } - - public final class ResponseModality { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.ResponseModality AUDIO; - field public static final com.google.firebase.vertexai.type.ResponseModality.Companion Companion; - field public static final com.google.firebase.vertexai.type.ResponseModality IMAGE; - field public static final com.google.firebase.vertexai.type.ResponseModality TEXT; - } - - public static final class ResponseModality.Companion { - } - - public final class ResponseStoppedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - method public com.google.firebase.vertexai.type.GenerateContentResponse getResponse(); - property public final com.google.firebase.vertexai.type.GenerateContentResponse response; - } - - public final class SafetyRating { - method public Boolean? getBlocked(); - method public com.google.firebase.vertexai.type.HarmCategory getCategory(); - method public com.google.firebase.vertexai.type.HarmProbability getProbability(); - method public float getProbabilityScore(); - method public com.google.firebase.vertexai.type.HarmSeverity? getSeverity(); - method public Float? getSeverityScore(); - property public final Boolean? blocked; - property public final com.google.firebase.vertexai.type.HarmCategory category; - property public final com.google.firebase.vertexai.type.HarmProbability probability; - property public final float probabilityScore; - property public final com.google.firebase.vertexai.type.HarmSeverity? severity; - property public final Float? severityScore; - } - - public final class SafetySetting { - ctor public SafetySetting(com.google.firebase.vertexai.type.HarmCategory harmCategory, com.google.firebase.vertexai.type.HarmBlockThreshold threshold, com.google.firebase.vertexai.type.HarmBlockMethod? method = null); - } - - public final class Schema { - method public static com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items); - method public static com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null); - method public static com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema boolean(); - method public static com.google.firebase.vertexai.type.Schema boolean(String? description = null); - method public static com.google.firebase.vertexai.type.Schema boolean(String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema enumeration(java.util.List values); - method public static com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null); - method public static com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null, boolean nullable = false); - method public String? getDescription(); - method public java.util.List? getEnum(); - method public String? getFormat(); - method public com.google.firebase.vertexai.type.Schema? getItems(); - method public Boolean? getNullable(); - method public java.util.Map? getProperties(); - method public java.util.List? getRequired(); - method public String getType(); - method public static com.google.firebase.vertexai.type.Schema numDouble(); - method public static com.google.firebase.vertexai.type.Schema numDouble(String? description = null); - method public static com.google.firebase.vertexai.type.Schema numDouble(String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema numFloat(); - method public static com.google.firebase.vertexai.type.Schema numFloat(String? description = null); - method public static com.google.firebase.vertexai.type.Schema numFloat(String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema numInt(); - method public static com.google.firebase.vertexai.type.Schema numInt(String? description = null); - method public static com.google.firebase.vertexai.type.Schema numInt(String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema numLong(); - method public static com.google.firebase.vertexai.type.Schema numLong(String? description = null); - method public static com.google.firebase.vertexai.type.Schema numLong(String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties); - method public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList()); - method public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null); - method public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema str(); - method public static com.google.firebase.vertexai.type.Schema str(String? description = null); - method public static com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false); - method public static com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false, com.google.firebase.vertexai.type.StringFormat? format = null); - property public final String? description; - property public final java.util.List? enum; - property public final String? format; - property public final com.google.firebase.vertexai.type.Schema? items; - property public final Boolean? nullable; - property public final java.util.Map? properties; - property public final java.util.List? required; - property public final String type; - field public static final com.google.firebase.vertexai.type.Schema.Companion Companion; + @Deprecated public final class QuotaExceededException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + } + + @Deprecated public final class RequestOptions { + ctor @Deprecated public RequestOptions(); + ctor @Deprecated public RequestOptions(long timeoutInMillis = 180.seconds.inWholeMilliseconds); + } + + @Deprecated public final class RequestTimeoutException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + } + + @Deprecated public final class ResponseModality { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.ResponseModality AUDIO; + field @Deprecated public static final com.google.firebase.vertexai.type.ResponseModality.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.ResponseModality IMAGE; + field @Deprecated public static final com.google.firebase.vertexai.type.ResponseModality TEXT; + } + + @Deprecated public static final class ResponseModality.Companion { + } + + @Deprecated public final class ResponseStoppedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + method @Deprecated public com.google.firebase.vertexai.type.GenerateContentResponse getResponse(); + property @Deprecated public final com.google.firebase.vertexai.type.GenerateContentResponse response; + } + + @Deprecated public final class SafetyRating { + method @Deprecated public Boolean? getBlocked(); + method @Deprecated public com.google.firebase.vertexai.type.HarmCategory getCategory(); + method @Deprecated public com.google.firebase.vertexai.type.HarmProbability getProbability(); + method @Deprecated public float getProbabilityScore(); + method @Deprecated public com.google.firebase.vertexai.type.HarmSeverity? getSeverity(); + method @Deprecated public Float? getSeverityScore(); + property @Deprecated public final Boolean? blocked; + property @Deprecated public final com.google.firebase.vertexai.type.HarmCategory category; + property @Deprecated public final com.google.firebase.vertexai.type.HarmProbability probability; + property @Deprecated public final float probabilityScore; + property @Deprecated public final com.google.firebase.vertexai.type.HarmSeverity? severity; + property @Deprecated public final Float? severityScore; + } + + @Deprecated public final class SafetySetting { + ctor @Deprecated public SafetySetting(com.google.firebase.vertexai.type.HarmCategory harmCategory, com.google.firebase.vertexai.type.HarmBlockThreshold threshold, com.google.firebase.vertexai.type.HarmBlockMethod? method = null); + } + + @Deprecated public final class Schema { + method @Deprecated public static com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items); + method @Deprecated public static com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema boolean(); + method @Deprecated public static com.google.firebase.vertexai.type.Schema boolean(String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema boolean(String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema enumeration(java.util.List values); + method @Deprecated public static com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null, boolean nullable = false); + method @Deprecated public String? getDescription(); + method @Deprecated public java.util.List? getEnum(); + method @Deprecated public String? getFormat(); + method @Deprecated public com.google.firebase.vertexai.type.Schema? getItems(); + method @Deprecated public Boolean? getNullable(); + method @Deprecated public java.util.Map? getProperties(); + method @Deprecated public java.util.List? getRequired(); + method @Deprecated public String getType(); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numDouble(); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numDouble(String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numDouble(String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numFloat(); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numFloat(String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numFloat(String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numInt(); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numInt(String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numInt(String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numLong(); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numLong(String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema numLong(String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties); + method @Deprecated public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList()); + method @Deprecated public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema str(); + method @Deprecated public static com.google.firebase.vertexai.type.Schema str(String? description = null); + method @Deprecated public static com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false); + method @Deprecated public static com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false, com.google.firebase.vertexai.type.StringFormat? format = null); + property @Deprecated public final String? description; + property @Deprecated public final java.util.List? enum; + property @Deprecated public final String? format; + property @Deprecated public final com.google.firebase.vertexai.type.Schema? items; + property @Deprecated public final Boolean? nullable; + property @Deprecated public final java.util.Map? properties; + property @Deprecated public final java.util.List? required; + property @Deprecated public final String type; + field @Deprecated public static final com.google.firebase.vertexai.type.Schema.Companion Companion; } - public static final class Schema.Companion { - method public com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items); - method public com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null); - method public com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema boolean(); - method public com.google.firebase.vertexai.type.Schema boolean(String? description = null); - method public com.google.firebase.vertexai.type.Schema boolean(String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema enumeration(java.util.List values); - method public com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null); - method public com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema numDouble(); - method public com.google.firebase.vertexai.type.Schema numDouble(String? description = null); - method public com.google.firebase.vertexai.type.Schema numDouble(String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema numFloat(); - method public com.google.firebase.vertexai.type.Schema numFloat(String? description = null); - method public com.google.firebase.vertexai.type.Schema numFloat(String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema numInt(); - method public com.google.firebase.vertexai.type.Schema numInt(String? description = null); - method public com.google.firebase.vertexai.type.Schema numInt(String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema numLong(); - method public com.google.firebase.vertexai.type.Schema numLong(String? description = null); - method public com.google.firebase.vertexai.type.Schema numLong(String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties); - method public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList()); - method public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null); - method public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema str(); - method public com.google.firebase.vertexai.type.Schema str(String? description = null); - method public com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false); - method public com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false, com.google.firebase.vertexai.type.StringFormat? format = null); - } - - public final class SerializationException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - } - - public final class ServerException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - } - - public final class ServiceConnectionHandshakeFailedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - ctor public ServiceConnectionHandshakeFailedException(String message, Throwable? cause = null); - } - - public final class ServiceDisabledException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - } - - public final class SessionAlreadyReceivingException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { - ctor public SessionAlreadyReceivingException(); - } - - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class SpeechConfig { - ctor public SpeechConfig(com.google.firebase.vertexai.type.Voices voice); - method public com.google.firebase.vertexai.type.Voices getVoice(); - property public final com.google.firebase.vertexai.type.Voices voice; - } - - public abstract class StringFormat { - } - - public static final class StringFormat.Custom extends com.google.firebase.vertexai.type.StringFormat { - ctor public StringFormat.Custom(String value); - } - - public final class TextPart implements com.google.firebase.vertexai.type.Part { - ctor public TextPart(String text); - method public String getText(); - property public final String text; - } + @Deprecated public static final class Schema.Companion { + method @Deprecated public com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items); + method @Deprecated public com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema array(com.google.firebase.vertexai.type.Schema items, String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema boolean(); + method @Deprecated public com.google.firebase.vertexai.type.Schema boolean(String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema boolean(String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema enumeration(java.util.List values); + method @Deprecated public com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema enumeration(java.util.List values, String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema numDouble(); + method @Deprecated public com.google.firebase.vertexai.type.Schema numDouble(String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema numDouble(String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema numFloat(); + method @Deprecated public com.google.firebase.vertexai.type.Schema numFloat(String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema numFloat(String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema numInt(); + method @Deprecated public com.google.firebase.vertexai.type.Schema numInt(String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema numInt(String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema numLong(); + method @Deprecated public com.google.firebase.vertexai.type.Schema numLong(String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema numLong(String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties); + method @Deprecated public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList()); + method @Deprecated public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema obj(java.util.Map properties, java.util.List optionalProperties = emptyList(), String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema str(); + method @Deprecated public com.google.firebase.vertexai.type.Schema str(String? description = null); + method @Deprecated public com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false); + method @Deprecated public com.google.firebase.vertexai.type.Schema str(String? description = null, boolean nullable = false, com.google.firebase.vertexai.type.StringFormat? format = null); + } + + @Deprecated public final class SerializationException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + } + + @Deprecated public final class ServerException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + } + + @Deprecated public final class ServiceConnectionHandshakeFailedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + ctor @Deprecated public ServiceConnectionHandshakeFailedException(String message, Throwable? cause = null); + } + + @Deprecated public final class ServiceDisabledException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + } + + @Deprecated public final class SessionAlreadyReceivingException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + ctor @Deprecated public SessionAlreadyReceivingException(); + } + + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class SpeechConfig { + ctor @Deprecated public SpeechConfig(com.google.firebase.vertexai.type.Voices voice); + method @Deprecated public com.google.firebase.vertexai.type.Voices getVoice(); + property @Deprecated public final com.google.firebase.vertexai.type.Voices voice; + } + + @Deprecated public abstract class StringFormat { + } + + @Deprecated public static final class StringFormat.Custom extends com.google.firebase.vertexai.type.StringFormat { + ctor @Deprecated public StringFormat.Custom(String value); + } + + @Deprecated public final class TextPart implements com.google.firebase.vertexai.type.Part { + ctor @Deprecated public TextPart(String text); + method @Deprecated public String getText(); + property @Deprecated public final String text; + } - public final class Tool { - method public static com.google.firebase.vertexai.type.Tool functionDeclarations(java.util.List functionDeclarations); - field public static final com.google.firebase.vertexai.type.Tool.Companion Companion; + @Deprecated public final class Tool { + method @Deprecated public static com.google.firebase.vertexai.type.Tool functionDeclarations(java.util.List functionDeclarations); + field @Deprecated public static final com.google.firebase.vertexai.type.Tool.Companion Companion; } - public static final class Tool.Companion { - method public com.google.firebase.vertexai.type.Tool functionDeclarations(java.util.List functionDeclarations); + @Deprecated public static final class Tool.Companion { + method @Deprecated public com.google.firebase.vertexai.type.Tool functionDeclarations(java.util.List functionDeclarations); } - public final class ToolConfig { - ctor public ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig? functionCallingConfig); + @Deprecated public final class ToolConfig { + ctor @Deprecated public ToolConfig(com.google.firebase.vertexai.type.FunctionCallingConfig? functionCallingConfig); } - public final class UnknownException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + @Deprecated public final class UnknownException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { } - public final class UnsupportedUserLocationException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { + @Deprecated public final class UnsupportedUserLocationException extends com.google.firebase.vertexai.type.FirebaseVertexAIException { } - public final class UsageMetadata { - ctor public UsageMetadata(int promptTokenCount, Integer? candidatesTokenCount, int totalTokenCount, java.util.List promptTokensDetails, java.util.List candidatesTokensDetails); - method public Integer? getCandidatesTokenCount(); - method public java.util.List getCandidatesTokensDetails(); - method public int getPromptTokenCount(); - method public java.util.List getPromptTokensDetails(); - method public int getTotalTokenCount(); - property public final Integer? candidatesTokenCount; - property public final java.util.List candidatesTokensDetails; - property public final int promptTokenCount; - property public final java.util.List promptTokensDetails; - property public final int totalTokenCount; + @Deprecated public final class UsageMetadata { + ctor @Deprecated public UsageMetadata(int promptTokenCount, Integer? candidatesTokenCount, int totalTokenCount, java.util.List promptTokensDetails, java.util.List candidatesTokensDetails); + method @Deprecated public Integer? getCandidatesTokenCount(); + method @Deprecated public java.util.List getCandidatesTokensDetails(); + method @Deprecated public int getPromptTokenCount(); + method @Deprecated public java.util.List getPromptTokensDetails(); + method @Deprecated public int getTotalTokenCount(); + property @Deprecated public final Integer? candidatesTokenCount; + property @Deprecated public final java.util.List candidatesTokensDetails; + property @Deprecated public final int promptTokenCount; + property @Deprecated public final java.util.List promptTokensDetails; + property @Deprecated public final int totalTokenCount; } - @com.google.firebase.vertexai.type.PublicPreviewAPI public final class Voices { - method public int getOrdinal(); - property public final int ordinal; - field public static final com.google.firebase.vertexai.type.Voices AOEDE; - field public static final com.google.firebase.vertexai.type.Voices CHARON; - field public static final com.google.firebase.vertexai.type.Voices.Companion Companion; - field public static final com.google.firebase.vertexai.type.Voices FENRIR; - field public static final com.google.firebase.vertexai.type.Voices KORE; - field public static final com.google.firebase.vertexai.type.Voices PUCK; - field public static final com.google.firebase.vertexai.type.Voices UNSPECIFIED; + @Deprecated @com.google.firebase.vertexai.type.PublicPreviewAPI public final class Voices { + method @Deprecated public int getOrdinal(); + property @Deprecated public final int ordinal; + field @Deprecated public static final com.google.firebase.vertexai.type.Voices AOEDE; + field @Deprecated public static final com.google.firebase.vertexai.type.Voices CHARON; + field @Deprecated public static final com.google.firebase.vertexai.type.Voices.Companion Companion; + field @Deprecated public static final com.google.firebase.vertexai.type.Voices FENRIR; + field @Deprecated public static final com.google.firebase.vertexai.type.Voices KORE; + field @Deprecated public static final com.google.firebase.vertexai.type.Voices PUCK; + field @Deprecated public static final com.google.firebase.vertexai.type.Voices UNSPECIFIED; } - public static final class Voices.Companion { + @Deprecated public static final class Voices.Companion { } } diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt index e764cf18ce0..47620f731a9 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt @@ -23,7 +23,7 @@ import com.google.common.util.concurrent.ListenableFuture import com.google.firebase.vertexai.type.Content import com.google.firebase.vertexai.type.FunctionCallPart import com.google.firebase.vertexai.type.FunctionResponsePart -import com.google.firebase.vertexai.type.LiveContentResponse +import com.google.firebase.vertexai.type.LiveServerMessage import com.google.firebase.vertexai.type.LiveSession import com.google.firebase.vertexai.type.MediaData import com.google.firebase.vertexai.type.PublicPreviewAPI @@ -139,16 +139,16 @@ public abstract class LiveSessionFutures internal constructor() { * * Call [close] to stop receiving responses from the model. * - * @return A [Publisher] which will emit [LiveContentResponse] from the model. + * @return A [Publisher] which will emit [LiveServerMessage] from the model. * * @throws [SessionAlreadyReceivingException] when the session is already receiving. * @see stopReceiving */ - public abstract fun receive(): Publisher + public abstract fun receive(): Publisher private class FuturesImpl(private val session: LiveSession) : LiveSessionFutures() { - override fun receive(): Publisher = session.receive().asPublisher() + override fun receive(): Publisher = session.receive().asPublisher() override fun close(): ListenableFuture = SuspendToFutureAdapter.launchFuture { session.close() } diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt deleted file mode 100644 index 1bad31d2d38..00000000000 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveContentResponse.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2025 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.firebase.vertexai.type - -/** - * Represents the response from the model for live content updates. - * - * This class encapsulates the content data, the status of the response, and any function calls - * included in the response. - */ -@PublicPreviewAPI -@Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. -For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" -) -public class LiveContentResponse -internal constructor( - - /** The main content data of the response. This can be `null` if there is no content. */ - public val data: Content?, - - /** - * The model was interrupted while generating data. - * - * An interruption occurs when the client sends a message while the model is actively sending - * data. - */ - public val interrupted: Boolean?, - - /** - * The model has finished sending data in the current interaction. - * - * Can be set alongside content, signifying that the content is the last in the turn. - */ - public val turnComplete: Boolean?, - - /** - * A list of [FunctionCallPart] included in the response, if any. - * - * This list can be null or empty if no function calls are present. - */ - public val functionCalls: List? -) { - - /** - * Convenience field representing all the text parts in the response as a single string, if they - * exists. - */ - public val text: String? = - data?.parts?.filterIsInstance()?.joinToString(" ") { it.text } -} diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt new file mode 100644 index 00000000000..f4cff3a6cad --- /dev/null +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt @@ -0,0 +1,211 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.firebase.vertexai.type + +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.JsonContentPolymorphicSerializer +import kotlinx.serialization.json.JsonElement +import kotlinx.serialization.json.JsonNull +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.jsonObject + +/** + * Parent interface for responses from the model during live interactions. + * + * @see LiveServerContent + * @see LiveServerToolCall + * @see LiveServerToolCallCancellation + * @see LiveServerSetupComplete + */ +@PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) +public interface LiveServerMessage + +/** + * Incremental server update generated by the model in response to client messages. + * + * Content is generated as quickly as possible, and not in realtime. You may choose to buffer and + * play it out in realtime. + */ +@PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) +public class LiveServerContent( + /** + * The content that the model has generated as part of the current conversation with the user. + * + * This can be `null` if there is no content. + */ + public val content: Content?, + + /** + * The model was interrupted by the client while generating data. + * + * An interruption occurs when the client sends a message while the model is actively sending + * data. + */ + public val interrupted: Boolean, + + /** + * The model has finished sending data in the current turn. + * + * Generation will only start in response to additional client messages. + * + * Can be set alongside [content], indicating that the [content] is the last in the turn. + * + * @see generationComplete + */ + public val turnComplete: Boolean, + + /** + * The model has finished _generating_ data for the current turn. + * + * For realtime playback, there will be a delay between when the model finishes generating content + * and the client has finished playing back the generated content. [generationComplete] indicates + * that the model is done generating data, while [turnComplete] indicates the model is waiting for + * additional client messages. Sending a message during this delay may cause an [interrupted] + * message to be sent. + * + * Note that if the model was [interrupted], this will not be set. The model will go from + * [interrupted] -> [turnComplete]. + */ + public val generationComplete: Boolean, +) : LiveServerMessage { + @OptIn(ExperimentalSerializationApi::class) + @Serializable + internal data class Internal( + val modelTurn: Content.Internal? = null, + val interrupted: Boolean = false, + val turnComplete: Boolean = false, + val generationComplete: Boolean = false + ) + @Serializable + internal data class InternalWrapper(val serverContent: Internal) : InternalLiveServerMessage { + @OptIn(ExperimentalSerializationApi::class) + override fun toPublic() = + LiveServerContent( + serverContent.modelTurn?.toPublic(), + serverContent.interrupted, + serverContent.turnComplete, + serverContent.generationComplete + ) + } +} + +/** The model is ready to receive client messages. */ +@PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) +public class LiveServerSetupComplete : LiveServerMessage { + @Serializable + internal data class Internal(val setupComplete: JsonObject) : InternalLiveServerMessage { + override fun toPublic() = LiveServerSetupComplete() + } +} + +/** + * Request for the client to execute the provided [functionCalls]. + * + * The client should return matching [FunctionResponsePart], where the `id` fields correspond to + * individual [FunctionCallPart]s. + * + * @property functionCalls A list of [FunctionCallPart] to run and return responses for. + */ +@PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) +public class LiveServerToolCall(public val functionCalls: List) : + LiveServerMessage { + @Serializable + internal data class Internal( + val functionCalls: List = emptyList() + ) + @Serializable + internal data class InternalWrapper(val toolCall: Internal) : InternalLiveServerMessage { + override fun toPublic() = + LiveServerToolCall( + toolCall.functionCalls.map { functionCall -> + FunctionCallPart( + name = functionCall.name, + args = functionCall.args.orEmpty().mapValues { it.value ?: JsonNull } + ) + } + ) + } +} + +/** + * Notification for the client to cancel a previous function call from [LiveServerToolCall]. + * + * You do not need to send [FunctionResponsePart]s for the cancelled [FunctionCallPart]s. + * + * @property functionIds A list of `id`s matching the `id` provided in a previous + * [LiveServerToolCall], where only the provided `id`s should be cancelled. + */ +@PublicPreviewAPI +@Deprecated( + """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. +For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" +) +public class LiveServerToolCallCancellation(public val functionIds: List) : + LiveServerMessage { + @Serializable internal data class Internal(val functionIds: List = emptyList()) + @Serializable + internal data class InternalWrapper(val toolCallCancellation: Internal) : + InternalLiveServerMessage { + override fun toPublic() = LiveServerToolCallCancellation(toolCallCancellation.functionIds) + } +} + +@PublicPreviewAPI +@Serializable(LiveServerMessageSerializer::class) +internal sealed interface InternalLiveServerMessage { + fun toPublic(): LiveServerMessage +} + +@OptIn(PublicPreviewAPI::class) +internal object LiveServerMessageSerializer : + JsonContentPolymorphicSerializer(InternalLiveServerMessage::class) { + @OptIn(PublicPreviewAPI::class) + override fun selectDeserializer( + element: JsonElement + ): DeserializationStrategy { + val jsonObject = element.jsonObject + return when { + "serverContent" in jsonObject -> LiveServerContent.InternalWrapper.serializer() + "setupComplete" in jsonObject -> LiveServerSetupComplete.Internal.serializer() + "toolCall" in jsonObject -> LiveServerToolCall.InternalWrapper.serializer() + "toolCallCancellation" in jsonObject -> + LiveServerToolCallCancellation.InternalWrapper.serializer() + else -> + throw SerializationException( + "The given subclass of LiveServerMessage (${javaClass.simpleName}) is not supported in the serialization yet." + ) + } + } +} diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt index 996fe49f2f5..3d22fd1369e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt @@ -43,7 +43,6 @@ import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onCompletion import kotlinx.coroutines.flow.onEach -import kotlinx.coroutines.flow.transform import kotlinx.coroutines.isActive import kotlinx.coroutines.launch import kotlinx.coroutines.yield @@ -51,9 +50,6 @@ import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json -import kotlinx.serialization.json.JsonNull -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.decodeFromJsonElement /** Represents a live WebSocket session capable of streaming content to and from the server. */ @PublicPreviewAPI @@ -144,13 +140,13 @@ internal constructor( * * Call [close] to stop receiving responses from the model. * - * @return A [Flow] which will emit [LiveContentResponse] from the model. + * @return A [Flow] which will emit [LiveServerMessage] from the model. * * @throws [SessionAlreadyReceivingException] when the session is already receiving. * @see stopReceiving */ - public fun receive(): Flow { - return FirebaseVertexAIException.catch { + public fun receive(): Flow = + FirebaseVertexAIException.catch { if (startedReceiving.getAndSet(true)) { throw SessionAlreadyReceivingException() } @@ -161,8 +157,14 @@ internal constructor( val response = session.incoming.tryReceive() if (response.isClosed || !startedReceiving.get()) break - val frame = response.getOrNull() - frame?.let { frameToLiveContentResponse(it) }?.let { emit(it) } + response + .getOrNull() + ?.let { + JSON.decodeFromString( + it.readBytes().toString(Charsets.UTF_8) + ) + } + ?.let { emit(it.toPublic()) } yield() } @@ -171,14 +173,7 @@ internal constructor( .catch { throw FirebaseVertexAIException.from(it) } // TODO(b/410059569): Add back when fixed - // return session.incoming.receiveAsFlow().transform { frame -> - // val response = frameToLiveContentResponse(frame) - // response?.let { emit(it) } - // }.onCompletion { - // stopAudioConversation() - // }.catch { throw FirebaseVertexAIException.from(it) } } - } /** * Stops receiving from the model. @@ -313,30 +308,48 @@ internal constructor( functionCallHandler: ((FunctionCallPart) -> FunctionResponsePart)? ) { receive() - .transform { - if (it.interrupted == true) { - playBackQueue.clear() - } else { - emit(it) - } - } .onEach { - if (!it.functionCalls.isNullOrEmpty()) { - if (functionCallHandler != null) { - // It's fine to suspend here since you can't have a function call running concurrently - // with an audio response - sendFunctionResponse(it.functionCalls.map(functionCallHandler).toList()) - } else { + when (it) { + is LiveServerToolCall -> { + if (it.functionCalls.isEmpty()) { + Log.w( + TAG, + "The model sent a tool call request, but it was missing functions to call." + ) + } else if (functionCallHandler != null) { + // It's fine to suspend here since you can't have a function call running concurrently + // with an audio response + sendFunctionResponse(it.functionCalls.map(functionCallHandler).toList()) + } else { + Log.w( + TAG, + "Function calls were present in the response, but a functionCallHandler was not provided." + ) + } + } + is LiveServerToolCallCancellation -> { Log.w( TAG, - "Function calls were present in the response, but a functionCallHandler was not provided." + "The model sent a tool cancellation request, but tool cancellation is not supported when using startAudioConversation()." + ) + } + is LiveServerContent -> { + if (it.interrupted) { + playBackQueue.clear() + } else { + val audioParts = it.content?.parts?.filterIsInstance().orEmpty() + for (part in audioParts) { + playBackQueue.add(part.inlineData) + } + } + } + is LiveServerSetupComplete -> { + // we should only get this message when we initially `connect` in LiveGenerativeModel + Log.w( + TAG, + "The model sent LiveServerSetupComplete after the connection was established." ) } - } - - val audioParts = it.data?.parts?.filterIsInstance().orEmpty() - for (part in audioParts) { - playBackQueue.add(part.inlineData) } } .launchIn(scope) @@ -372,50 +385,6 @@ internal constructor( } } - /** - * Converts a [Frame] from the model to a valid [LiveContentResponse], if possible. - * - * @return The corresponding [LiveContentResponse] or null if it couldn't be converted. - */ - private fun frameToLiveContentResponse(frame: Frame): LiveContentResponse? { - val jsonMessage = Json.parseToJsonElement(frame.readBytes().toString(Charsets.UTF_8)) - - if (jsonMessage !is JsonObject) { - Log.w(TAG, "Server response was not a JsonObject: $jsonMessage") - return null - } - - return when { - "toolCall" in jsonMessage -> { - val functionContent = - JSON.decodeFromJsonElement(jsonMessage) - LiveContentResponse( - null, - null, - null, - functionContent.toolCall.functionCalls.map { - FunctionCallPart(it.name, it.args.orEmpty().mapValues { x -> x.value ?: JsonNull }) - } - ) - } - "serverContent" in jsonMessage -> { - val serverContent = - JSON.decodeFromJsonElement(jsonMessage) - .serverContent - LiveContentResponse( - serverContent.modelTurn?.toPublic(), - serverContent.interrupted, - serverContent.turnComplete, - null - ) - } - else -> { - Log.w(TAG, "Failed to decode the server response: $jsonMessage") - null - } - } - } - /** * Incremental update of the current conversation delivered from the client. * @@ -437,51 +406,7 @@ internal constructor( fun toInternal() = Internal(Internal.BidiGenerateContentClientContent(turns, turnComplete)) } - /** - * Incremental server update generated by the model in response to client messages. - * - * Effectively, a message from the model to the client. - */ - internal class BidiGenerateContentServerContentSetup( - val modelTurn: Content.Internal?, - val turnComplete: Boolean?, - val interrupted: Boolean? - ) { - @Serializable - internal class Internal(val serverContent: BidiGenerateContentServerContent) { - @Serializable - internal data class BidiGenerateContentServerContent( - val modelTurn: Content.Internal?, - val turnComplete: Boolean?, - val interrupted: Boolean? - ) - } - - fun toInternal() = - Internal(Internal.BidiGenerateContentServerContent(modelTurn, turnComplete, interrupted)) - } - - /** - * Request for the client to execute the provided function calls and return the responses with the - * matched `id`s. - */ - internal data class BidiGenerateContentToolCallSetup( - val functionCalls: List - ) { - @Serializable - internal class Internal(val toolCall: BidiGenerateContentToolCall) { - @Serializable - internal data class BidiGenerateContentToolCall( - val functionCalls: List - ) - } - - fun toInternal(): Internal { - return Internal(Internal.BidiGenerateContentToolCall(functionCalls)) - } - } - - /** Client generated responses to a [BidiGenerateContentToolCallSetup]. */ + /** Client generated responses to a [LiveServerToolCall]. */ internal class BidiGenerateContentToolResponseSetup( val functionResponses: List ) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt index ef2939a52fc..ddb53e79659 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt @@ -93,46 +93,65 @@ public class InlineDataPart(public val inlineData: ByteArray, public val mimeTyp * * @param name the name of the function to call * @param args the function parameters and values as a [Map] + * @param id Unique id of the function call. If present, the returned [FunctionResponsePart] should + * have a matching `id` field. */ -// TODO(b/410040441): Support id property @Deprecated( """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) -public class FunctionCallPart( +public class FunctionCallPart +@JvmOverloads +constructor( public val name: String, public val args: Map, + public val id: String? = null ) : Part { @Serializable internal data class Internal(val functionCall: FunctionCall) : InternalPart { @Serializable - internal data class FunctionCall(val name: String, val args: Map? = null) + internal data class FunctionCall( + val name: String, + val args: Map? = null, + val id: String? = null + ) } } /** * Represents function call output to be returned to the model when it requests a function call. * - * @param name the name of the called function - * @param response the response produced by the function as a [JSONObject] + * @param name The name of the called function. + * @param response The response produced by the function as a [JSONObject]. + * @param id Matching `id` for a [FunctionCallPart], if one was provided. */ -// TODO(b/410040441): Support id property @Deprecated( """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) -public class FunctionResponsePart(public val name: String, public val response: JsonObject) : Part { +public class FunctionResponsePart +@JvmOverloads +constructor( + public val name: String, + public val response: JsonObject, + public val id: String? = null +) : Part { @Serializable internal data class Internal(val functionResponse: FunctionResponse) : InternalPart { - @Serializable internal data class FunctionResponse(val name: String, val response: JsonObject) + @Serializable + internal data class FunctionResponse( + val name: String, + val response: JsonObject, + val id: String? = null + ) } internal fun toInternalFunctionCall(): Internal.FunctionResponse { - return Internal.FunctionResponse(this.name, this.response) + return Internal.FunctionResponse(name, response, id) } } @@ -209,9 +228,11 @@ internal fun Part.toInternal(): InternalPart { ) ) is FunctionCallPart -> - FunctionCallPart.Internal(FunctionCallPart.Internal.FunctionCall(name, args)) + FunctionCallPart.Internal(FunctionCallPart.Internal.FunctionCall(name, args, id)) is FunctionResponsePart -> - FunctionResponsePart.Internal(FunctionResponsePart.Internal.FunctionResponse(name, response)) + FunctionResponsePart.Internal( + FunctionResponsePart.Internal.FunctionResponse(name, response, id) + ) is FileDataPart -> FileDataPart.Internal(FileDataPart.Internal.FileData(mimeType = mimeType, fileUri = uri)) else -> @@ -242,13 +263,11 @@ internal fun InternalPart.toPublic(): Part { is FunctionCallPart.Internal -> FunctionCallPart( functionCall.name, - functionCall.args.orEmpty().mapValues { it.value ?: JsonNull } + functionCall.args.orEmpty().mapValues { it.value ?: JsonNull }, + functionCall.id ) is FunctionResponsePart.Internal -> - FunctionResponsePart( - functionResponse.name, - functionResponse.response, - ) + FunctionResponsePart(functionResponse.name, functionResponse.response, functionResponse.id) is FileDataPart.Internal -> FileDataPart(fileData.mimeType, fileData.fileUri) else -> throw com.google.firebase.vertexai.type.SerializationException( From 588c25cb1e1ed4284dcd8ed5c07a55e0afe0852a Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 7 May 2025 14:09:22 -0500 Subject: [PATCH 10/13] Fix typo --- firebase-vertexai/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-vertexai/CHANGELOG.md b/firebase-vertexai/CHANGELOG.md index 4405362f5b7..3f38d8620e2 100644 --- a/firebase-vertexai/CHANGELOG.md +++ b/firebase-vertexai/CHANGELOG.md @@ -1,6 +1,6 @@ # Unreleased * [changed] **Renamed / Replaced:** Vertex AI in Firebase (`FirebaseVertexAI`) has been renamed and - replaced by the new Firebase AI SDK: `FirebaseAI`. This is to accomodate the evolving set of + replaced by the new Firebase AI SDK: `FirebaseAI`. This is to accommodate the evolving set of supported features and services. Please migrate to the new `FirebaseAI` package. See details in the [migration guide](/docs/vertex-ai/migrate-to-latest-sdk). From d8c45224d8b19dc20d116659d48341e3d2e4be04 Mon Sep 17 00:00:00 2001 From: Daymon <17409137+daymxn@users.noreply.github.com> Date: Wed, 7 May 2025 14:25:51 -0500 Subject: [PATCH 11/13] Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt Co-authored-by: Rodrigo Lazo --- .../src/main/kotlin/com/google/firebase/vertexai/Chat.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt index 3a4f193d2d9..bcf0ff5d9c0 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt @@ -45,7 +45,7 @@ import kotlinx.coroutines.flow.onEach * discussion). */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Chat( From 7151fd03e5bebd9b57214d2b811b4fd42f5140b2 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 7 May 2025 14:33:36 -0500 Subject: [PATCH 12/13] Update SDK naming --- .../firebase/vertexai/FirebaseVertexAI.kt | 2 +- .../FirebaseVertexAIMultiResourceComponent.kt | 2 +- .../firebase/vertexai/GenerativeModel.kt | 2 +- .../google/firebase/vertexai/ImagenModel.kt | 2 +- .../firebase/vertexai/LiveGenerativeModel.kt | 2 +- .../firebase/vertexai/java/ChatFutures.kt | 2 +- .../vertexai/java/GenerativeModelFutures.kt | 2 +- .../vertexai/java/ImagenModelFutures.kt | 2 +- .../vertexai/java/LiveModelFutures.kt | 2 +- .../vertexai/java/LiveSessionFutures.kt | 2 +- .../firebase/vertexai/type/Candidate.kt | 10 +++--- .../google/firebase/vertexai/type/Content.kt | 4 +-- .../firebase/vertexai/type/ContentModality.kt | 2 +- .../vertexai/type/CountTokensResponse.kt | 2 +- .../firebase/vertexai/type/Exceptions.kt | 34 +++++++++---------- .../vertexai/type/FunctionCallingConfig.kt | 2 +- .../vertexai/type/FunctionDeclaration.kt | 2 +- .../vertexai/type/GenerateContentResponse.kt | 2 +- .../vertexai/type/GenerationConfig.kt | 4 +-- .../firebase/vertexai/type/HarmBlockMethod.kt | 2 +- .../vertexai/type/HarmBlockThreshold.kt | 2 +- .../firebase/vertexai/type/HarmCategory.kt | 2 +- .../firebase/vertexai/type/HarmProbability.kt | 2 +- .../firebase/vertexai/type/HarmSeverity.kt | 2 +- .../vertexai/type/ImagenAspectRatio.kt | 2 +- .../vertexai/type/ImagenGenerationConfig.kt | 4 +-- .../vertexai/type/ImagenGenerationResponse.kt | 2 +- .../vertexai/type/ImagenImageFormat.kt | 2 +- .../vertexai/type/ImagenInlineImage.kt | 2 +- .../vertexai/type/ImagenPersonFilterLevel.kt | 2 +- .../vertexai/type/ImagenSafetyFilterLevel.kt | 2 +- .../vertexai/type/ImagenSafetySettings.kt | 2 +- .../vertexai/type/LiveGenerationConfig.kt | 4 +-- .../vertexai/type/LiveServerMessage.kt | 10 +++--- .../firebase/vertexai/type/LiveSession.kt | 2 +- .../firebase/vertexai/type/MediaData.kt | 2 +- .../vertexai/type/ModalityTokenCount.kt | 2 +- .../com/google/firebase/vertexai/type/Part.kt | 14 ++++---- .../firebase/vertexai/type/PromptFeedback.kt | 4 +-- .../firebase/vertexai/type/RequestOptions.kt | 2 +- .../vertexai/type/ResponseModality.kt | 2 +- .../firebase/vertexai/type/SafetySetting.kt | 2 +- .../google/firebase/vertexai/type/Schema.kt | 6 ++-- .../firebase/vertexai/type/SpeechConfig.kt | 2 +- .../com/google/firebase/vertexai/type/Tool.kt | 2 +- .../firebase/vertexai/type/ToolConfig.kt | 2 +- .../firebase/vertexai/type/UsageMetadata.kt | 2 +- .../google/firebase/vertexai/type/Voices.kt | 2 +- 48 files changed, 85 insertions(+), 85 deletions(-) diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAI.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAI.kt index c36ec25d078..411c9c0c8b1 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAI.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAI.kt @@ -37,7 +37,7 @@ import com.google.firebase.vertexai.type.Tool import com.google.firebase.vertexai.type.ToolConfig import kotlin.coroutines.CoroutineContext -/** Entry point for all _Vertex AI for Firebase_ functionality. */ +/** Entry point for all _Vertex AI in Firebase_ functionality. */ public class FirebaseVertexAI internal constructor( private val firebaseApp: FirebaseApp, diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAIMultiResourceComponent.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAIMultiResourceComponent.kt index 526e1f87be8..02e962951f9 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAIMultiResourceComponent.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/FirebaseVertexAIMultiResourceComponent.kt @@ -25,7 +25,7 @@ import com.google.firebase.inject.Provider import kotlin.coroutines.CoroutineContext /** - * Multi-resource container for Firebase Vertex AI. + * Multi-resource container for Vertex AI in Firebase. * * @hide */ diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt index c46ac7761e2..3a04907cacc 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt @@ -48,7 +48,7 @@ import kotlinx.serialization.ExperimentalSerializationApi * types. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class GenerativeModel diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt index c687712ca7d..30868aeb214 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt @@ -37,7 +37,7 @@ import com.google.firebase.vertexai.type.RequestOptions */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenModel diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt index e513b40fd36..d384793eb68 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt @@ -47,7 +47,7 @@ import kotlinx.serialization.json.JsonObject */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveGenerativeModel diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt index ad39af15557..c653d1930ea 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt @@ -31,7 +31,7 @@ import org.reactivestreams.Publisher * @see [Chat] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class ChatFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt index bacb7fe63c5..635fa14cb48 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt @@ -33,7 +33,7 @@ import org.reactivestreams.Publisher * @see [GenerativeModel] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class GenerativeModelFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt index bf13659fb1d..e24898d57b8 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt @@ -30,7 +30,7 @@ import com.google.firebase.vertexai.type.PublicPreviewAPI */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class ImagenModelFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt index 6889a898878..ea30126c00a 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt @@ -29,7 +29,7 @@ import com.google.firebase.vertexai.type.ServiceConnectionHandshakeFailedExcepti */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class LiveModelFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt index 47620f731a9..7865ed8e7d9 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt @@ -39,7 +39,7 @@ import org.reactivestreams.Publisher */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class LiveSessionFutures internal constructor() { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt index 071438c7190..52dfd46239d 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt @@ -35,7 +35,7 @@ import kotlinx.serialization.json.JsonNames * @property finishReason The reason the model stopped generating content, if it exist. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Candidate @@ -111,7 +111,7 @@ internal constructor( * @property severityScore A numerical score representing the severity of harm. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SafetyRating @@ -164,7 +164,7 @@ internal constructor( * apply. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class CitationMetadata internal constructor(public val citations: List) { @@ -195,7 +195,7 @@ public class CitationMetadata internal constructor(public val citations: List) { /** Builder class to facilitate constructing complex [Content] objects. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt index 416b765b951..4f1566eae1a 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt @@ -23,7 +23,7 @@ import kotlinx.serialization.Serializable /** Content part modality. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ContentModality private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt index 40e36d11a32..2c3396c83b2 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt @@ -34,7 +34,7 @@ import kotlinx.serialization.Serializable * prompt. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class CountTokensResponse( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt index 797537ebcb2..8ea94ce2086 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Exceptions.kt @@ -22,7 +22,7 @@ import kotlinx.coroutines.TimeoutCancellationException /** Parent class for any errors that occur from the [FirebaseVertexAI] SDK. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class FirebaseVertexAIException @@ -108,7 +108,7 @@ internal constructor(message: String, cause: Throwable? = null) : RuntimeExcepti /** Something went wrong while trying to deserialize a response from the server. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SerializationException @@ -117,7 +117,7 @@ internal constructor(message: String, cause: Throwable? = null) : /** The server responded with a non 200 response code. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ServerException internal constructor(message: String, cause: Throwable? = null) : @@ -125,7 +125,7 @@ public class ServerException internal constructor(message: String, cause: Throwa /** The provided API Key is not valid. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InvalidAPIKeyException @@ -140,7 +140,7 @@ internal constructor(message: String, cause: Throwable? = null) : * @property response The full server response. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class PromptBlockedException @@ -157,7 +157,7 @@ internal constructor( } @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ContentBlockedException @@ -173,7 +173,7 @@ internal constructor(message: String, cause: Throwable? = null) : */ // TODO(rlazo): Add secondary constructor to pass through the message? @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class UnsupportedUserLocationException internal constructor(cause: Throwable? = null) : @@ -185,7 +185,7 @@ public class UnsupportedUserLocationException internal constructor(cause: Throwa * Usually indicative of consumer error. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InvalidStateException internal constructor(message: String, cause: Throwable? = null) : @@ -197,7 +197,7 @@ public class InvalidStateException internal constructor(message: String, cause: * @property response The full server response. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ResponseStoppedException @@ -213,7 +213,7 @@ internal constructor(public val response: GenerateContentResponse, cause: Throwa * Usually occurs due to a user specified [timeout][RequestOptions.timeout]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class RequestTimeoutException @@ -227,7 +227,7 @@ internal constructor(message: String, cause: Throwable? = null) : * [Vertex AI locations.](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations#available-regions) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InvalidLocationException @@ -240,7 +240,7 @@ internal constructor(location: String, cause: Throwable? = null) : * [Firebase documentation.](https://firebase.google.com/docs/vertex-ai/faq-and-troubleshooting#required-apis) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ServiceDisabledException @@ -252,7 +252,7 @@ internal constructor(message: String, cause: Throwable? = null) : * [Firebase documentation.](https://firebase.google.com/docs/vertex-ai/quotas) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class QuotaExceededException @@ -261,7 +261,7 @@ internal constructor(message: String, cause: Throwable? = null) : /** Streaming session already receiving. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SessionAlreadyReceivingException : @@ -271,7 +271,7 @@ public class SessionAlreadyReceivingException : /** Audio record initialization failures for audio streaming */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class AudioRecordInitializationFailedException(message: String) : @@ -279,7 +279,7 @@ public class AudioRecordInitializationFailedException(message: String) : /** Handshake failed with the server */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ServiceConnectionHandshakeFailedException(message: String, cause: Throwable? = null) : @@ -287,7 +287,7 @@ public class ServiceConnectionHandshakeFailedException(message: String, cause: T /** Catch all case for exceptions not explicitly expected. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class UnknownException internal constructor(message: String, cause: Throwable? = null) : diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt index 2a2f52c0257..4305064f37c 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionCallingConfig.kt @@ -25,7 +25,7 @@ import kotlinx.serialization.Serializable * See the static methods in the `companion object` for the list of available behaviors. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionCallingConfig diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt index 7407edccba3..af07dc40188 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/FunctionDeclaration.kt @@ -53,7 +53,7 @@ import kotlinx.serialization.Serializable * @see Schema */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionDeclaration( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt index d8ed9fa974e..afddffb8a15 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerateContentResponse.kt @@ -27,7 +27,7 @@ import kotlinx.serialization.Serializable * @property usageMetadata Information about the number of tokens in the prompt and in the response. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class GenerateContentResponse( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt index d50a0de3b6a..9dfcb822b2c 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/GenerationConfig.kt @@ -79,7 +79,7 @@ import kotlinx.serialization.Serializable * guide for more details. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class GenerationConfig @@ -128,7 +128,7 @@ private constructor( * @see [generationConfig] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt index 787c5e3c91e..ffe87023d4c 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockMethod.kt @@ -25,7 +25,7 @@ import kotlinx.serialization.Serializable * [HarmBlockThreshold] in [SafetySetting]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmBlockMethod private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt index 5ca67d60674..90fa451ad49 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmBlockThreshold.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Represents the threshold for a [HarmCategory] to be allowed by [SafetySetting]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmBlockThreshold private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt index 13576484c3f..1850282e757 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmCategory.kt @@ -24,7 +24,7 @@ import kotlinx.serialization.Serializable /** Category for a given harm rating. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmCategory private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt index ff9862dc1ef..78c679ef935 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmProbability.kt @@ -23,7 +23,7 @@ import kotlinx.serialization.Serializable /** Represents the probability that some [HarmCategory] is applicable in a [SafetyRating]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmProbability private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt index 691a0961920..c01db75ec8e 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/HarmSeverity.kt @@ -23,7 +23,7 @@ import kotlinx.serialization.Serializable /** Represents the severity of a [HarmCategory] being applicable in a [SafetyRating]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class HarmSeverity private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt index d65a16382b3..6243ce27770 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt @@ -19,7 +19,7 @@ package com.google.firebase.vertexai.type /** Represents the aspect ratio that the generated image should conform to. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenAspectRatio private constructor(internal val internalVal: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt index 6e5e70b3e5b..508f28e62d7 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt @@ -30,7 +30,7 @@ import kotlin.jvm.JvmField @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenGenerationConfig( @@ -47,7 +47,7 @@ public class ImagenGenerationConfig( * idiomatic experience. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt index f7f9129a12b..acc1b54b563 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt @@ -29,7 +29,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenGenerationResponse diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt index 4a2485e8b3a..afd309047cb 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenImageFormat diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt index 87ca82de5cf..9af3e779082 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt @@ -28,7 +28,7 @@ import android.graphics.BitmapFactory */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenInlineImage diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt index 1ba061e8366..8d4de743345 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenPersonFilterLevel.kt @@ -19,7 +19,7 @@ package com.google.firebase.vertexai.type /** A filter used to prevent images from containing depictions of children or people. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenPersonFilterLevel private constructor(internal val internalVal: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt index fa58e6b33a6..72a325737ba 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetyFilterLevel.kt @@ -19,7 +19,7 @@ package com.google.firebase.vertexai.type /** Used for safety filtering. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenSafetyFilterLevel private constructor(internal val internalVal: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt index 95de0ceea7d..f619c8985d3 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenSafetySettings.kt @@ -24,7 +24,7 @@ package com.google.firebase.vertexai.type */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagenSafetySettings( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt index 029ce5fe6d5..c3a51042641 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveGenerationConfig.kt @@ -66,7 +66,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveGenerationConfig @@ -107,7 +107,7 @@ private constructor( * @property speechConfig See [LiveGenerationConfig.speechConfig] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Builder { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt index f4cff3a6cad..c59624e0882 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveServerMessage.kt @@ -35,7 +35,7 @@ import kotlinx.serialization.json.jsonObject */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public interface LiveServerMessage @@ -48,7 +48,7 @@ public interface LiveServerMessage */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveServerContent( @@ -116,7 +116,7 @@ public class LiveServerContent( /** The model is ready to receive client messages. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveServerSetupComplete : LiveServerMessage { @@ -136,7 +136,7 @@ public class LiveServerSetupComplete : LiveServerMessage { */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveServerToolCall(public val functionCalls: List) : @@ -169,7 +169,7 @@ public class LiveServerToolCall(public val functionCalls: List */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveServerToolCallCancellation(public val functionIds: List) : diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt index 3d22fd1369e..072320674c7 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/LiveSession.kt @@ -55,7 +55,7 @@ import kotlinx.serialization.json.Json @PublicPreviewAPI @OptIn(ExperimentalSerializationApi::class) @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class LiveSession diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt index 7faee425dcb..3b3b38f89f3 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/MediaData.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.Serializable */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class MediaData(public val data: ByteArray, public val mimeType: String) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt index 5059a1bbb50..0bb6de78baf 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ModalityTokenCount.kt @@ -25,7 +25,7 @@ import kotlinx.serialization.Serializable * @property tokenCount The number of tokens counted. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ModalityTokenCount diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt index ddb53e79659..833065074e6 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Part.kt @@ -32,14 +32,14 @@ import org.json.JSONObject /** Interface representing data sent to and received from requests. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public interface Part {} /** Represents text or string based data sent to and received from requests. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class TextPart(public val text: String) : Part { @@ -54,7 +54,7 @@ public class TextPart(public val text: String) : Part { * @param image [Bitmap] to convert into a [Part] */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ImagePart(public val image: Bitmap) : Part { @@ -74,7 +74,7 @@ public class ImagePart(public val image: Bitmap) : Part { * [Vertex AI documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-multimodal-prompts#media_requirements) */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class InlineDataPart(public val inlineData: ByteArray, public val mimeType: String) : Part { @@ -97,7 +97,7 @@ public class InlineDataPart(public val inlineData: ByteArray, public val mimeTyp * have a matching `id` field. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionCallPart @@ -128,7 +128,7 @@ constructor( * @param id Matching `id` for a [FunctionCallPart], if one was provided. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FunctionResponsePart @@ -164,7 +164,7 @@ constructor( * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class FileDataPart(public val uri: String, public val mimeType: String) : Part { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt index aecd358c86a..c7a57628a64 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/PromptFeedback.kt @@ -29,7 +29,7 @@ import kotlinx.serialization.Serializable * @param blockReasonMessage A message describing the reason that content was blocked, if any. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class PromptFeedback( @@ -54,7 +54,7 @@ public class PromptFeedback( /** Describes why content was blocked. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class BlockReason private constructor(public val name: String, public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt index 9d17f225087..4d129d2acaf 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/RequestOptions.kt @@ -23,7 +23,7 @@ import kotlin.time.toDuration /** Configurable options unique to how requests to the backend are performed. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class RequestOptions diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt index a6dad4961b4..455dbb1d466 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ResponseModality.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Represents the type of content present in a response (e.g., text, image, audio). */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ResponseModality private constructor(public val ordinal: Int) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt index 57136578974..168b74b680c 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.Serializable * specified it will default to [HarmBlockMethod.PROBABILITY]. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SafetySetting( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt index 8e9a7c758f5..160a5841321 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Schema.kt @@ -19,12 +19,12 @@ package com.google.firebase.vertexai.type import kotlinx.serialization.Serializable @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public abstract class StringFormat private constructor(internal val value: String) { @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Custom(value: String) : StringFormat(value) @@ -41,7 +41,7 @@ For migration details, see the migration guide: https://firebase.google.com/docs * the results. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Schema diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt index 8980e14027e..a81a3c365fb 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SpeechConfig.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Speech configuration class for setting up the voice of the server's response. */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class SpeechConfig( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt index 86422be1ba1..caf3f229763 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Tool.kt @@ -26,7 +26,7 @@ import kotlinx.serialization.json.JsonObject * @param functionDeclarations The set of functions that this tool allows the model access to */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Tool diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt index b93cfb02704..631e6b98f46 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ToolConfig.kt @@ -26,7 +26,7 @@ import kotlinx.serialization.Serializable * @param functionCallingConfig The config for function calling */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class ToolConfig(internal val functionCallingConfig: FunctionCallingConfig?) { diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt index a6f38f77ffa..8ed4fcc4177 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/UsageMetadata.kt @@ -30,7 +30,7 @@ import kotlinx.serialization.Serializable * candidates. */ @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class UsageMetadata( diff --git a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt index 5eb2fe20c60..f4c6470fc41 100644 --- a/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt +++ b/firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Voices.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable /** Various voices supported by the server */ @PublicPreviewAPI @Deprecated( - """The Firebase VertexAI SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services. + """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. For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk""" ) public class Voices private constructor(public val ordinal: Int) { From 551809943503f8c8be305db85445d58f12bccba1 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 7 May 2025 15:13:43 -0500 Subject: [PATCH 13/13] Update JavaCompileTests.java --- .../firebase/vertexai/JavaCompileTests.java | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/firebase-vertexai/src/testUtil/java/com/google/firebase/vertexai/JavaCompileTests.java b/firebase-vertexai/src/testUtil/java/com/google/firebase/vertexai/JavaCompileTests.java index cf71db18798..8f2020d818f 100644 --- a/firebase-vertexai/src/testUtil/java/com/google/firebase/vertexai/JavaCompileTests.java +++ b/firebase-vertexai/src/testUtil/java/com/google/firebase/vertexai/JavaCompileTests.java @@ -44,8 +44,12 @@ import com.google.firebase.vertexai.type.HarmSeverity; import com.google.firebase.vertexai.type.ImagePart; import com.google.firebase.vertexai.type.InlineDataPart; -import com.google.firebase.vertexai.type.LiveContentResponse; import com.google.firebase.vertexai.type.LiveGenerationConfig; +import com.google.firebase.vertexai.type.LiveServerContent; +import com.google.firebase.vertexai.type.LiveServerMessage; +import com.google.firebase.vertexai.type.LiveServerSetupComplete; +import com.google.firebase.vertexai.type.LiveServerToolCall; +import com.google.firebase.vertexai.type.LiveServerToolCallCancellation; import com.google.firebase.vertexai.type.MediaData; import com.google.firebase.vertexai.type.ModalityTokenCount; import com.google.firebase.vertexai.type.Part; @@ -276,14 +280,14 @@ private void testLiveFutures(LiveModelFutures futures) throws Exception { session .receive() .subscribe( - new Subscriber() { + new Subscriber() { @Override public void onSubscribe(Subscription s) { s.request(Long.MAX_VALUE); } @Override - public void onNext(LiveContentResponse response) { + public void onNext(LiveServerMessage response) { validateLiveContentResponse(response); } @@ -315,17 +319,22 @@ public void onComplete() { session.close(); } - private void validateLiveContentResponse(LiveContentResponse response) { - // int status = response.getStatus(); - // Assert.assertEquals(status, LiveContentResponse.Status.Companion.getNORMAL()); - // Assert.assertNotEquals(status, LiveContentResponse.Status.Companion.getINTERRUPTED()); - // Assert.assertNotEquals(status, LiveContentResponse.Status.Companion.getTURN_COMPLETE()); - // TODO b/412743328 LiveContentResponse.Status inaccessible for Java users - Content data = response.getData(); - if (data != null) { - validateContent(data); + private void validateLiveContentResponse(LiveServerMessage message) { + if (message instanceof LiveServerContent) { + LiveServerContent content = (LiveServerContent) message; + validateContent(content.getContent()); + boolean complete = content.getGenerationComplete(); + boolean interrupted = content.getInterrupted(); + boolean turnComplete = content.getTurnComplete(); + } else if (message instanceof LiveServerSetupComplete) { + LiveServerSetupComplete setup = (LiveServerSetupComplete) message; + // No methods + } else if (message instanceof LiveServerToolCall) { + LiveServerToolCall call = (LiveServerToolCall) message; + validateFunctionCalls(call.getFunctionCalls()); + } else if (message instanceof LiveServerToolCallCancellation) { + LiveServerToolCallCancellation cancel = (LiveServerToolCallCancellation) message; + List functions = cancel.getFunctionIds(); } - String text = response.getText(); - validateFunctionCalls(response.getFunctionCalls()); } }