You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instances of this class are associated with a specific Firebase AI backend (either the Gemini API in Vertex AI or the Gemini Developer API via Google AI) and provide methods for interacting with the configured generative model.
15
+
Instances of this class are associated with a specific Firebase AI backend (either the Vertex AI Gemini API or the Gemini Developer API via Google AI) and provide methods for interacting with the configured generative model.
16
16
17
17
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `AIModel` class.
Options for initializing the AI service using [getAI()](./vertexai.md#getai_a94a413)<!---->. This allows specifying which backend to use (Gemini API in Vertex AI or Gemini Developer API) and configuring its specific options (like location for Vertex AI).
13
+
Options for initializing the AI service using [getAI()](./vertexai.md#getai_a94a413)<!---->. This allows specifying which backend to use (Vertex AI Gemini API or Gemini Developer API) and configuring its specific options (like location for Vertex AI).
Abstract base class representing the configuration for an AI service backend, determining whether to use the Gemini Developer API (via Google AI) or the Gemini API in Vertex AI. This class should not be instantiated directly. Use its subclasses: - [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class)<!---->: For the Gemini Developer API (via Google AI). - [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)<!---->: For the Gemini API in Vertex AI.
13
+
Abstract base class representing the configuration for an AI service backend, determining whether to use the Gemini Developer API (via Google AI) or the Vertex AI Gemini API. This class should not be instantiated directly. Use its subclasses: - [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class)<!---->: For the Gemini Developer API (via Google AI). - [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)<!---->: For the Vertex AI Gemini API.
Copy file name to clipboardExpand all lines: docs-devsite/vertexai.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ The Firebase AI Web SDK.
18
18
| --- | --- |
19
19
| <b>function(app, ...)</b> |
20
20
|[getAI(app, options)](./vertexai.md#getai_a94a413)| Returns the default [AI](./vertexai.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)](./vertexai.md#getvertexai_04094cf)| It is recommended to use the new [getAI()](./vertexai.md#getai_a94a413)<!---->.<!---->Returns a [VertexAI](./vertexai.md#vertexai) instance for the given app, configured to use the Gemini API in Vertex AI. This instance will be configured to use the Gemini API in Vertex AI. |
21
+
|[getVertexAI(app, options)](./vertexai.md#getvertexai_04094cf)| It is recommended to use the new [getAI()](./vertexai.md#getai_a94a413)<!---->.<!---->Returns a [VertexAI](./vertexai.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. |
22
22
| <b>function(ai, ...)</b> |
23
23
|[getGenerativeModel(ai, modelParams, requestOptions)](./vertexai.md#getgenerativemodel_80bd839)| Returns a [GenerativeModel](./vertexai.generativemodel.md#generativemodel_class) class with methods for inference and other functionality. |
24
24
|[getImagenModel(ai, modelParams, requestOptions)](./vertexai.md#getimagenmodel_e1f6645)| <b><i>(Public Preview)</i></b> Returns an [ImagenModel](./vertexai.imagenmodel.md#imagenmodel_class) class with methods for using Imagen.<!---->Only Imagen 3 models (named <code>imagen-3.0-*</code>) are supported. |
@@ -28,9 +28,9 @@ The Firebase AI Web SDK.
28
28
| Class | Description |
29
29
| --- | --- |
30
30
|[AIError](./vertexai.aierror.md#aierror_class)| Error class for the Firebase AI SDK. |
31
-
|[AIModel](./vertexai.aimodel.md#aimodel_class)| Base class for Firebase AI model APIs.<!---->Instances of this class are associated with a specific Firebase AI backend (either the Gemini API in Vertex AI or the Gemini Developer API via Google AI) and provide methods for interacting with the configured generative model. |
31
+
|[AIModel](./vertexai.aimodel.md#aimodel_class)| Base class for Firebase AI model APIs.<!---->Instances of this class are associated with a specific Firebase AI backend (either the Vertex AI Gemini API or the Gemini Developer API via Google AI) and provide methods for interacting with the configured generative model. |
32
32
|[ArraySchema](./vertexai.arrayschema.md#arrayschema_class)| Schema class for "array" types. The <code>items</code> param should refer to the type of item that can be a member of the array. |
33
-
|[Backend](./vertexai.backend.md#backend_class)| Abstract base class representing the configuration for an AI service backend, determining whether to use the Gemini Developer API (via Google AI) or the Gemini API in Vertex AI. This class should not be instantiated directly. Use its subclasses: - [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class)<!---->: For the Gemini Developer API (via Google AI). - [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)<!---->: For the Gemini API in Vertex AI. |
33
+
|[Backend](./vertexai.backend.md#backend_class)| Abstract base class representing the configuration for an AI service backend, determining whether to use the Gemini Developer API (via Google AI) or the Vertex AI Gemini API. This class should not be instantiated directly. Use its subclasses: - [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class)<!---->: For the Gemini Developer API (via Google AI). - [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)<!---->: For the Vertex AI Gemini API. |
34
34
|[BooleanSchema](./vertexai.booleanschema.md#booleanschema_class)| Schema class for "boolean" types. |
35
35
|[ChatSession](./vertexai.chatsession.md#chatsession_class)| ChatSession class that enables sending chat messages and stores history of sent and received messages so far. |
36
36
|[GenerativeModel](./vertexai.generativemodel.md#generativemodel_class)| Class for generative model APIs. |
@@ -42,7 +42,7 @@ The Firebase AI Web SDK.
42
42
|[ObjectSchema](./vertexai.objectschema.md#objectschema_class)| Schema class for "object" types. The <code>properties</code> param must be a map of <code>Schema</code> objects. |
43
43
|[Schema](./vertexai.schema.md#schema_class)| Parent class encompassing all Schema types, with static methods that allow building specific Schema types. This class can be converted with <code>JSON.stringify()</code> into a JSON string accepted by Vertex AI REST endpoints. (This string conversion is automatically done when calling SDK methods.) |
44
44
|[StringSchema](./vertexai.stringschema.md#stringschema_class)| Schema class for "string" types. Can be used with or without enum values. |
45
-
|[VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)| Configuration class for the Gemini API in Vertex AI.<!---->Use this with [AIOptions](./vertexai.aioptions.md#aioptions_interface) when initializing the AI service via [getAI()](./vertexai.md#getai_a94a413) to specify the Gemini API in Vertex AI as the backend. |
45
+
|[VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)| Configuration class for the Vertex AI Gemini API.<!---->Use this with [AIOptions](./vertexai.aioptions.md#aioptions_interface) when initializing the AI service via [getAI()](./vertexai.md#getai_a94a413) to specify the Vertex AI Gemini API as the backend. |
46
46
47
47
## Enumerations
48
48
@@ -68,7 +68,7 @@ The Firebase AI Web SDK.
68
68
| Interface | Description |
69
69
| --- | --- |
70
70
|[AI](./vertexai.ai.md#ai_interface)| An instance of the Firebase AI SDK.<!---->Do not create this instance directly. Instead, use [getAI()](./vertexai.md#getai_a94a413)<!---->. |
71
-
|[AIOptions](./vertexai.aioptions.md#aioptions_interface)| Options for initializing the AI service using [getAI()](./vertexai.md#getai_a94a413)<!---->. This allows specifying which backend to use (Gemini API in Vertex AI or Gemini Developer API) and configuring its specific options (like location for Vertex AI). |
71
+
|[AIOptions](./vertexai.aioptions.md#aioptions_interface)| Options for initializing the AI service using [getAI()](./vertexai.md#getai_a94a413)<!---->. This allows specifying which backend to use (Vertex AI Gemini API or Gemini Developer API) and configuring its specific options (like location for Vertex AI). |
72
72
|[BaseParams](./vertexai.baseparams.md#baseparams_interface)| Base parameters for a number of methods. |
73
73
|[Citation](./vertexai.citation.md#citation_interface)| A single citation. |
74
74
|[CitationMetadata](./vertexai.citationmetadata.md#citationmetadata_interface)| Citation metadata that may be found on a [GenerateContentCandidate](./vertexai.generatecontentcandidate.md#generatecontentcandidate_interface)<!---->. |
@@ -129,7 +129,7 @@ The Firebase AI Web SDK.
129
129
130
130
| Variable | Description |
131
131
| --- | --- |
132
-
|[BackendType](./vertexai.md#backendtype)| An enum-like object containing constants that represent the supported backends for the Firebase AI SDK. This determines which backend service (Gemini API in Vertex AI 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](./vertexai.googleaibackend.md#googleaibackend_class) or [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)<!---->) to identify which service to target. |
132
+
|[BackendType](./vertexai.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](./vertexai.googleaibackend.md#googleaibackend_class) or [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)<!---->) to identify which service to target. |
133
133
|[POSSIBLE\_ROLES](./vertexai.md#possible_roles)| Possible roles. |
134
134
|[VertexAIError](./vertexai.md#vertexaierror)| Error class for the Firebase AI SDK.<!---->For more information, refer to the documentation for the new [AIError](./vertexai.aierror.md#aierror_class)<!---->. |
135
135
|[VertexAIModel](./vertexai.md#vertexaimodel)| Base class for Firebase AI model APIs.<!---->For more information, refer to the documentation for the new [AIModel](./vertexai.aimodel.md#aimodel_class)<!---->. |
@@ -191,7 +191,7 @@ const ai = getAI(app, { backend: new GoogleAIBackend() });
191
191
192
192
193
193
```javascript
194
-
// Get an AI instance configured to use the Gemini API in Vertex AI.
194
+
// Get an AI instance configured to use the Vertex AI Gemini API.
@@ -200,7 +200,7 @@ const ai = getAI(app, { backend: new VertexAIBackend() });
200
200
201
201
It is recommended to use the new [getAI()](./vertexai.md#getai_a94a413)<!---->.
202
202
203
-
Returns a [VertexAI](./vertexai.md#vertexai) instance for the given app, configured to use the Gemini API in Vertex AI. This instance will be configured to use the Gemini API in Vertex AI.
203
+
Returns a [VertexAI](./vertexai.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.
204
204
205
205
<b>Signature:</b>
206
206
@@ -276,7 +276,7 @@ If the `apiKey` or `projectId` fields are missing in your Firebase config.
276
276
277
277
## BackendType
278
278
279
-
An enum-like object containing constants that represent the supported backends for the Firebase AI SDK. This determines which backend service (Gemini API in Vertex AI or Gemini Developer API) the SDK will communicate with.
279
+
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.
280
280
281
281
These values are assigned to the `backendType` property within the specific backend configuration objects ([GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class) or [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class)<!---->) to identify which service to target.
0 commit comments