Skip to content

Commit 89e515d

Browse files
committed
Add deprecation annotations
1 parent 4c4c7c9 commit 89e515d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+320
-0
lines changed

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/Chat.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ import kotlinx.coroutines.flow.onEach
4444
* from the model. This will be provided to the model for each message sent (as context for the
4545
* discussion).
4646
*/
47+
@Deprecated(
48+
"""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.
49+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
50+
)
4751
public class Chat(
4852
private val model: GenerativeModel,
4953
public val history: MutableList<Content> = ArrayList()

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/GenerativeModel.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ import kotlinx.serialization.ExperimentalSerializationApi
4747
* Represents a multimodal model (like Gemini), capable of generating content based on various input
4848
* types.
4949
*/
50+
@Deprecated(
51+
"""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.
52+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
53+
)
5054
public class GenerativeModel
5155
internal constructor(
5256
private val modelName: String,

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/ImagenModel.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ import com.google.firebase.vertexai.type.RequestOptions
3636
* types.
3737
*/
3838
@PublicPreviewAPI
39+
@Deprecated(
40+
"""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.
41+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
42+
)
3943
public class ImagenModel
4044
internal constructor(
4145
private val modelName: String,

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/LiveGenerativeModel.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ import kotlinx.serialization.json.JsonObject
4646
* various input types, supporting bidirectional streaming.
4747
*/
4848
@PublicPreviewAPI
49+
@Deprecated(
50+
"""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.
51+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
52+
)
4953
public class LiveGenerativeModel
5054
internal constructor(
5155
private val modelName: String,

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ChatFutures.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ import org.reactivestreams.Publisher
3030
*
3131
* @see [Chat]
3232
*/
33+
@Deprecated(
34+
"""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.
35+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
36+
)
3337
public abstract class ChatFutures internal constructor() {
3438

3539
/**

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/GenerativeModelFutures.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ import org.reactivestreams.Publisher
3232
*
3333
* @see [GenerativeModel]
3434
*/
35+
@Deprecated(
36+
"""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.
37+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
38+
)
3539
public abstract class GenerativeModelFutures internal constructor() {
3640

3741
/**

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/ImagenModelFutures.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ import com.google.firebase.vertexai.type.PublicPreviewAPI
2929
* @see [ImagenModel]
3030
*/
3131
@PublicPreviewAPI
32+
@Deprecated(
33+
"""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.
34+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
35+
)
3236
public abstract class ImagenModelFutures internal constructor() {
3337
/**
3438
* Generates an image, returning the result directly to the caller.

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveModelFutures.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ import com.google.firebase.vertexai.type.ServiceConnectionHandshakeFailedExcepti
2828
* @see [LiveGenerativeModel]
2929
*/
3030
@PublicPreviewAPI
31+
@Deprecated(
32+
"""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.
33+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
34+
)
3135
public abstract class LiveModelFutures internal constructor() {
3236

3337
/**

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/java/LiveSessionFutures.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ import org.reactivestreams.Publisher
3838
* @see [LiveSession]
3939
*/
4040
@PublicPreviewAPI
41+
@Deprecated(
42+
"""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.
43+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
44+
)
4145
public abstract class LiveSessionFutures internal constructor() {
4246

4347
/**

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Candidate.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ import kotlinx.serialization.json.JsonNames
3434
* @property citationMetadata Metadata about the sources used to generate this content.
3535
* @property finishReason The reason the model stopped generating content, if it exist.
3636
*/
37+
@Deprecated(
38+
"""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.
39+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
40+
)
3741
public class Candidate
3842
internal constructor(
3943
public val content: Content,
@@ -106,6 +110,10 @@ internal constructor(
106110
* @property severity The severity of the potential harm.
107111
* @property severityScore A numerical score representing the severity of harm.
108112
*/
113+
@Deprecated(
114+
"""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.
115+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
116+
)
109117
public class SafetyRating
110118
internal constructor(
111119
public val category: HarmCategory,
@@ -146,6 +154,10 @@ internal constructor(
146154
* @property citations A list of individual cited sources and the parts of the content to which they
147155
* apply.
148156
*/
157+
@Deprecated(
158+
"""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.
159+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
160+
)
149161
public class CitationMetadata internal constructor(public val citations: List<Citation>) {
150162

151163
@Serializable
@@ -173,6 +185,10 @@ public class CitationMetadata internal constructor(public val citations: List<Ci
173185
* @property license The license under which the cited content is distributed under, if available.
174186
* @property publicationDate The date of publication of the cited source, if available.
175187
*/
188+
@Deprecated(
189+
"""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.
190+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
191+
)
176192
public class Citation
177193
internal constructor(
178194
public val title: String? = null,
@@ -239,6 +255,10 @@ internal constructor(
239255
* @property name The name of the finish reason.
240256
* @property ordinal The ordinal value of the finish reason.
241257
*/
258+
@Deprecated(
259+
"""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.
260+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
261+
)
242262
public class FinishReason private constructor(public val name: String, public val ordinal: Int) {
243263

244264
@Serializable(Internal.Serializer::class)

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/Content.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ import kotlinx.serialization.Serializable
3131
* `"user"`.
3232
* @param parts An ordered list of [Part] that constitute this content.
3333
*/
34+
@Deprecated(
35+
"""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.
36+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
37+
)
3438
public class Content
3539
@JvmOverloads
3640
constructor(public val role: String? = "user", public val parts: List<Part>) {
@@ -41,6 +45,10 @@ constructor(public val role: String? = "user", public val parts: List<Part>) {
4145
}
4246

4347
/** Builder class to facilitate constructing complex [Content] objects. */
48+
@Deprecated(
49+
"""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.
50+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
51+
)
4452
public class Builder {
4553

4654
/** The producer of the content. Must be either 'user' or 'model'. By default, it's "user". */

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ContentModality.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ import kotlinx.serialization.SerialName
2222
import kotlinx.serialization.Serializable
2323

2424
/** Content part modality. */
25+
@Deprecated(
26+
"""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.
27+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
28+
)
2529
public class ContentModality private constructor(public val ordinal: Int) {
2630

2731
@Serializable(Internal.Serializer::class)

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/CountTokensResponse.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import kotlinx.serialization.Serializable
3333
* @property promptTokensDetails The breakdown, by modality, of how many tokens are consumed by the
3434
* prompt.
3535
*/
36+
@Deprecated(
37+
"""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.
38+
For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk"""
39+
)
3640
public class CountTokensResponse(
3741
public val totalTokens: Int,
3842
public val totalBillableCharacters: Int? = null,

0 commit comments

Comments
 (0)