Skip to content

Commit cb745af

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

File tree

6 files changed

+54
-37
lines changed

6 files changed

+54
-37
lines changed

common/api-review/ai.api.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { FirebaseError } from '@firebase/util';
1313
export interface AI {
1414
app: FirebaseApp;
1515
backend: Backend;
16-
// @deprecated
16+
// @deprecated (undocumented)
1717
location: string;
1818
}
1919

@@ -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 (undocumented)
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 (undocumented)
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 (undocumented)
929929
export const VertexAIError: typeof AIError;
930930

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

934934
// @public

docs-devsite/ai.ai.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface AI
2626
| --- | --- | --- |
2727
| [app](./ai.ai.md#aiapp) | [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) | The [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) this [AI](./ai.ai.md#ai_interface) instance is associated with. |
2828
| [backend](./ai.ai.md#aibackend) | [Backend](./ai.backend.md#backend_class) | A [Backend](./ai.backend.md#backend_class) instance that specifies the configuration for the target backend, either the Gemini Developer API (using [GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)<!-- -->) or the Vertex AI Gemini API (using [VertexAIBackend](./ai.vertexaibackend.md#vertexaibackend_class)<!-- -->). |
29-
| [location](./ai.ai.md#ailocation) | string | The location configured for this AI service instance, relevant for Vertex AI backends. |
29+
| [location](./ai.ai.md#ailocation) | string | |
3030

3131
## AI.app
3232

@@ -54,8 +54,8 @@ backend: Backend;
5454
>
5555
> use `AI.backend.location` instead.
5656
>
57-
58-
The location configured for this AI service instance, relevant for Vertex AI backends.
57+
> The location configured for this AI service instance, relevant for Vertex AI backends.
58+
>
5959

6060
<b>Signature:</b>
6161

docs-devsite/ai.md

+28-16
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) | |
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) | |
136+
| [VertexAIModel](./ai.md#vertexaimodel) | |
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) | |
149149

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

@@ -200,9 +200,12 @@ 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)<!-- -->.
204-
205-
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.
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+
>
207+
> 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.
208+
>
206209
207210
<b>Signature:</b>
208211

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

320323
## VertexAIError
321324

322-
Error class for the Firebase AI SDK.
323-
324-
For more information, refer to the documentation for the new [AIError](./ai.aierror.md#aierror_class)<!-- -->.
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+
>
329+
> Error class for the Firebase AI SDK.
330+
>
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.
335-
336-
For more information, refer to the documentation for the new [AIModel](./ai.aimodel.md#aimodel_class)<!-- -->.
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+
>
344+
> Base class for Firebase AI model APIs.
345+
>
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.
410-
411-
For more information, refer to the documentation for the new [AI](./ai.ai.md#ai_interface) interface.
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+
>
422+
> An instance of the Firebase AI SDK.
423+
>
412424
413425
<b>Signature:</b>
414426

packages/ai/src/api.ts

+12-6
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,23 @@ export { Backend, VertexAIBackend, GoogleAIBackend } from './backend';
4141
export { AIErrorCode as VertexAIErrorCode };
4242

4343
/**
44+
* @deprecated Use the new {@link AIModel} instead. The Vertex AI in Firebase SDK has been
45+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
46+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
47+
*
4448
* Base class for Firebase AI model APIs.
4549
*
46-
* For more information, refer to the documentation for the new {@link AIModel}.
47-
*
4850
* @public
4951
*/
5052
export const VertexAIModel = AIModel;
5153

5254
/**
55+
* @deprecated Use the new {@link AIError} instead. The Vertex AI in Firebase SDK has been
56+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
57+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
58+
*
5359
* Error class for the Firebase AI SDK.
54-
*
55-
* For more information, refer to the documentation for the new {@link AIError}.
56-
*
60+
*
5761
* @public
5862
*/
5963
export const VertexAIError = AIError;
@@ -65,7 +69,9 @@ declare module '@firebase/component' {
6569
}
6670

6771
/**
68-
* It is recommended to use the new {@link getAI | getAI()}.
72+
* @deprecated Use the new {@link getAI | getAI()} instead. The Vertex AI in Firebase SDK has been
73+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
74+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
6975
*
7076
* Returns a {@link VertexAI} instance for the given app, configured to use the
7177
* Vertex AI Gemini API. This instance will be

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ import { Backend } from './backend';
2121
export * from './types';
2222

2323
/**
24-
* An instance of the Firebase AI SDK.
24+
* @deprecated Use the new {@link AI | AI} instead. The Vertex AI in Firebase SDK has been
25+
* replaced with the Firebase AI SDK to accommodate the evolving set of supported features and
26+
* services. For migration details, see the {@link https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk | migration guide}.
2527
*
26-
* For more information, refer to the documentation for the new {@link AI} interface.
28+
* An instance of the Firebase AI SDK.
2729
*
2830
* @public
2931
*/
@@ -57,9 +59,9 @@ export interface AI {
5759
*/
5860
backend: Backend;
5961
/**
60-
* The location configured for this AI service instance, relevant for Vertex AI backends.
61-
*
6262
* @deprecated use `AI.backend.location` instead.
63+
*
64+
* The location configured for this AI service instance, relevant for Vertex AI backends.
6365
*/
6466
location: string;
6567
}

0 commit comments

Comments
 (0)