Skip to content

Commit 98d78e4

Browse files
committed
add deprecation notices in docs
1 parent 9f81d48 commit 98d78e4

File tree

5 files changed

+40
-23
lines changed

5 files changed

+40
-23
lines changed

common/api-review/ai.api.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ export function getGenerativeModel(ai: AI, modelParams: ModelParams, requestOpti
423423
// @beta
424424
export function getImagenModel(ai: AI, modelParams: ImagenModelParams, requestOptions?: RequestOptions): ImagenModel;
425425

426-
// @public
426+
// @public @deprecated
427427
export function getVertexAI(app?: FirebaseApp, options?: VertexAIOptions): VertexAI;
428428

429429
// @public
@@ -916,7 +916,7 @@ export interface UsageMetadata {
916916
totalTokenCount: number;
917917
}
918918

919-
// @public
919+
// @public @deprecated
920920
export type VertexAI = AI;
921921

922922
// @public
@@ -925,10 +925,10 @@ export class VertexAIBackend extends Backend {
925925
readonly location: string;
926926
}
927927

928-
// @public
928+
// @public @deprecated
929929
export const VertexAIError: typeof AIError;
930930

931-
// @public
931+
// @public @deprecated
932932
export const VertexAIModel: typeof AIModel;
933933

934934
// @public

docs-devsite/ai.md

+23-11
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Firebase AI Web SDK.
1818
| --- | --- |
1919
| <b>function(app, ...)</b> |
2020
| [getAI(app, options)](./ai.md#getai_a94a413) | Returns the default [AI](./ai.ai.md#ai_interface) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with the default settings. |
21-
| [getVertexAI(app, options)](./ai.md#getvertexai_04094cf) | It is recommended to use the new [getAI()](./ai.md#getai_a94a413)<!-- -->.<!-- -->Returns a [VertexAI](./ai.md#vertexai) instance for the given app, configured to use the Vertex AI Gemini API. This instance will be configured to use the Vertex AI Gemini API. |
21+
| [getVertexAI(app, options)](./ai.md#getvertexai_04094cf) | Returns a [VertexAI](./ai.md#vertexai) instance for the given app, configured to use the Vertex AI Gemini API. This instance will be configured to use the Vertex AI Gemini API. |
2222
| <b>function(ai, ...)</b> |
2323
| [getGenerativeModel(ai, modelParams, requestOptions)](./ai.md#getgenerativemodel_80bd839) | Returns a [GenerativeModel](./ai.generativemodel.md#generativemodel_class) class with methods for inference and other functionality. |
2424
| [getImagenModel(ai, modelParams, requestOptions)](./ai.md#getimagenmodel_e1f6645) | <b><i>(Public Preview)</i></b> Returns an [ImagenModel](./ai.imagenmodel.md#imagenmodel_class) class with methods for using Imagen.<!-- -->Only Imagen 3 models (named <code>imagen-3.0-*</code>) are supported. |
@@ -132,8 +132,8 @@ The Firebase AI Web SDK.
132132
| [BackendType](./ai.md#backendtype) | An enum-like object containing constants that represent the supported backends for the Firebase AI SDK. This determines which backend service (Vertex AI Gemini API or Gemini Developer API) the SDK will communicate with.<!-- -->These values are assigned to the <code>backendType</code> property within the specific backend configuration objects ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class) or [VertexAIBackend](./ai.vertexaibackend.md#vertexaibackend_class)<!-- -->) to identify which service to target. |
133133
| [POSSIBLE\_ROLES](./ai.md#possible_roles) | Possible roles. |
134134
| [ResponseModality](./ai.md#responsemodality) | <b><i>(Public Preview)</i></b> Generation modalities to be returned in generation responses. |
135-
| [VertexAIError](./ai.md#vertexaierror) | Error class for the Firebase AI SDK.<!-- -->For more information, refer to the documentation for the new [AIError](./ai.aierror.md#aierror_class)<!-- -->. |
136-
| [VertexAIModel](./ai.md#vertexaimodel) | Base class for Firebase AI model APIs.<!-- -->For more information, refer to the documentation for the new [AIModel](./ai.aimodel.md#aimodel_class)<!-- -->. |
135+
| [VertexAIError](./ai.md#vertexaierror) | Error class for the Firebase AI SDK. |
136+
| [VertexAIModel](./ai.md#vertexaimodel) | Base class for Firebase AI model APIs. |
137137

138138
## Type Aliases
139139

@@ -145,7 +145,7 @@ The Firebase AI Web SDK.
145145
| [Role](./ai.md#role) | Role is the producer of the content. |
146146
| [Tool](./ai.md#tool) | Defines a tool that model can call to access external knowledge. |
147147
| [TypedSchema](./ai.md#typedschema) | A type that includes all specific Schema types. |
148-
| [VertexAI](./ai.md#vertexai) | An instance of the Firebase AI SDK.<!-- -->For more information, refer to the documentation for the new [AI](./ai.ai.md#ai_interface) interface. |
148+
| [VertexAI](./ai.md#vertexai) | An instance of the Firebase AI SDK. |
149149

150150
## function(app, ...)
151151

@@ -200,7 +200,10 @@ const ai = getAI(app, { backend: new VertexAIBackend() });
200200

201201
### getVertexAI(app, options) {:#getvertexai_04094cf}
202202

203-
It is recommended to use the new [getAI()](./ai.md#getai_a94a413)<!-- -->.
203+
> Warning: This API is now obsolete.
204+
>
205+
> Use the new [getAI()](./ai.md#getai_a94a413) instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK 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)<!-- -->.
206+
>
204207
205208
Returns a [VertexAI](./ai.md#vertexai) instance for the given app, configured to use the Vertex AI Gemini API. This instance will be configured to use the Vertex AI Gemini API.
206209

@@ -319,9 +322,12 @@ ResponseModality: {
319322

320323
## VertexAIError
321324

322-
Error class for the Firebase AI SDK.
325+
> Warning: This API is now obsolete.
326+
>
327+
> Use the new [AIError](./ai.aierror.md#aierror_class) instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK 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)<!-- -->.
328+
>
323329
324-
For more information, refer to the documentation for the new [AIError](./ai.aierror.md#aierror_class)<!-- -->.
330+
Error class for the Firebase AI SDK.
325331

326332
<b>Signature:</b>
327333

@@ -331,9 +337,12 @@ VertexAIError: typeof AIError
331337

332338
## VertexAIModel
333339

334-
Base class for Firebase AI model APIs.
340+
> Warning: This API is now obsolete.
341+
>
342+
> Use the new [AIModel](./ai.aimodel.md#aimodel_class) instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK 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)<!-- -->.
343+
>
335344
336-
For more information, refer to the documentation for the new [AIModel](./ai.aimodel.md#aimodel_class)<!-- -->.
345+
Base class for Firebase AI model APIs.
337346

338347
<b>Signature:</b>
339348

@@ -406,9 +415,12 @@ export type TypedSchema = IntegerSchema | NumberSchema | StringSchema | BooleanS
406415

407416
## VertexAI
408417

409-
An instance of the Firebase AI SDK.
418+
> Warning: This API is now obsolete.
419+
>
420+
> Use the new [AI](./ai.ai.md#ai_interface) instead. The Vertex AI in Firebase SDK has been replaced with the Firebase AI SDK 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)<!-- -->.
421+
>
410422
411-
For more information, refer to the documentation for the new [AI](./ai.ai.md#ai_interface) interface.
423+
An instance of the Firebase AI SDK.
412424

413425
<b>Signature:</b>
414426

packages/ai/src/api.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export { AIErrorCode as VertexAIErrorCode };
4343
/**
4444
* Base class for Firebase AI model APIs.
4545
*
46-
* For more information, refer to the documentation for the new {@link AIModel}.
46+
* @deprecated Use the new {@link AIModel} instead. The Vertex AI in Firebase SDK has been
47+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
48+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
4749
*
4850
* @public
4951
*/
@@ -52,7 +54,9 @@ export const VertexAIModel = AIModel;
5254
/**
5355
* Error class for the Firebase AI SDK.
5456
*
55-
* For more information, refer to the documentation for the new {@link AIError}.
57+
* @deprecated Use the new {@link AIError} instead. The Vertex AI in Firebase SDK has been
58+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
59+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
5660
*
5761
* @public
5862
*/
@@ -65,12 +69,14 @@ declare module '@firebase/component' {
6569
}
6670

6771
/**
68-
* It is recommended to use the new {@link getAI | getAI()}.
69-
*
7072
* Returns a {@link VertexAI} instance for the given app, configured to use the
7173
* Vertex AI Gemini API. This instance will be
7274
* configured to use the Vertex AI Gemini API.
7375
*
76+
* @deprecated Use the new {@link getAI | getAI()} instead. The Vertex AI in Firebase SDK has been
77+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
78+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
79+
*
7480
* @param app - The {@link @firebase/app#FirebaseApp} to use.
7581
* @param options - Options to configure the Vertex AI instance, including the location.
7682
*

packages/ai/src/constants.ts

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717

1818
import { version } from '../package.json';
1919

20-
// TODO (v12): Remove this
21-
export const VERTEX_TYPE = 'vertexAI';
22-
2320
export const AI_TYPE = 'AI';
2421

2522
export const DEFAULT_LOCATION = 'us-central1';

packages/ai/src/public-types.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export * from './types';
2323
/**
2424
* An instance of the Firebase AI SDK.
2525
*
26-
* For more information, refer to the documentation for the new {@link AI} interface.
26+
* @deprecated Use the new {@link AI | AI} instead. The Vertex AI in Firebase SDK has been
27+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
28+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
2729
*
2830
* @public
2931
*/

0 commit comments

Comments
 (0)