Skip to content

Commit 9529e08

Browse files
committed
docs fixes
1 parent c9f7113 commit 9529e08

File tree

9 files changed

+165
-17
lines changed

9 files changed

+165
-17
lines changed

docs-devsite/_toc.yaml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,155 @@
11
toc:
22
- title: firebase
33
path: /docs/reference/js/index
4+
- title: ai
5+
path: /docs/reference/js/ai.md
6+
section:
7+
- title: AI
8+
path: /docs/reference/js/ai.ai.md
9+
- title: AIError
10+
path: /docs/reference/js/ai.aierror.md
11+
- title: AIModel
12+
path: /docs/reference/js/ai.aimodel.md
13+
- title: AIOptions
14+
path: /docs/reference/js/ai.aioptions.md
15+
- title: ArraySchema
16+
path: /docs/reference/js/ai.arrayschema.md
17+
- title: Backend
18+
path: /docs/reference/js/ai.backend.md
19+
- title: BaseParams
20+
path: /docs/reference/js/ai.baseparams.md
21+
- title: BooleanSchema
22+
path: /docs/reference/js/ai.booleanschema.md
23+
- title: ChatSession
24+
path: /docs/reference/js/ai.chatsession.md
25+
- title: Citation
26+
path: /docs/reference/js/ai.citation.md
27+
- title: CitationMetadata
28+
path: /docs/reference/js/ai.citationmetadata.md
29+
- title: Content
30+
path: /docs/reference/js/ai.content.md
31+
- title: CountTokensRequest
32+
path: /docs/reference/js/ai.counttokensrequest.md
33+
- title: CountTokensResponse
34+
path: /docs/reference/js/ai.counttokensresponse.md
35+
- title: CustomErrorData
36+
path: /docs/reference/js/ai.customerrordata.md
37+
- title: Date_2
38+
path: /docs/reference/js/ai.date_2.md
39+
- title: EnhancedGenerateContentResponse
40+
path: /docs/reference/js/ai.enhancedgeneratecontentresponse.md
41+
- title: ErrorDetails
42+
path: /docs/reference/js/ai.errordetails.md
43+
- title: FileData
44+
path: /docs/reference/js/ai.filedata.md
45+
- title: FileDataPart
46+
path: /docs/reference/js/ai.filedatapart.md
47+
- title: FunctionCall
48+
path: /docs/reference/js/ai.functioncall.md
49+
- title: FunctionCallingConfig
50+
path: /docs/reference/js/ai.functioncallingconfig.md
51+
- title: FunctionCallPart
52+
path: /docs/reference/js/ai.functioncallpart.md
53+
- title: FunctionDeclaration
54+
path: /docs/reference/js/ai.functiondeclaration.md
55+
- title: FunctionDeclarationsTool
56+
path: /docs/reference/js/ai.functiondeclarationstool.md
57+
- title: FunctionResponse
58+
path: /docs/reference/js/ai.functionresponse.md
59+
- title: FunctionResponsePart
60+
path: /docs/reference/js/ai.functionresponsepart.md
61+
- title: GenerateContentCandidate
62+
path: /docs/reference/js/ai.generatecontentcandidate.md
63+
- title: GenerateContentRequest
64+
path: /docs/reference/js/ai.generatecontentrequest.md
65+
- title: GenerateContentResponse
66+
path: /docs/reference/js/ai.generatecontentresponse.md
67+
- title: GenerateContentResult
68+
path: /docs/reference/js/ai.generatecontentresult.md
69+
- title: GenerateContentStreamResult
70+
path: /docs/reference/js/ai.generatecontentstreamresult.md
71+
- title: GenerationConfig
72+
path: /docs/reference/js/ai.generationconfig.md
73+
- title: GenerativeContentBlob
74+
path: /docs/reference/js/ai.generativecontentblob.md
75+
- title: GenerativeModel
76+
path: /docs/reference/js/ai.generativemodel.md
77+
- title: GoogleAIBackend
78+
path: /docs/reference/js/ai.googleaibackend.md
79+
- title: GroundingAttribution
80+
path: /docs/reference/js/ai.groundingattribution.md
81+
- title: GroundingMetadata
82+
path: /docs/reference/js/ai.groundingmetadata.md
83+
- title: ImagenGCSImage
84+
path: /docs/reference/js/ai.imagengcsimage.md
85+
- title: ImagenGenerationConfig
86+
path: /docs/reference/js/ai.imagengenerationconfig.md
87+
- title: ImagenGenerationResponse
88+
path: /docs/reference/js/ai.imagengenerationresponse.md
89+
- title: ImagenImageFormat
90+
path: /docs/reference/js/ai.imagenimageformat.md
91+
- title: ImagenInlineImage
92+
path: /docs/reference/js/ai.imageninlineimage.md
93+
- title: ImagenModel
94+
path: /docs/reference/js/ai.imagenmodel.md
95+
- title: ImagenModelParams
96+
path: /docs/reference/js/ai.imagenmodelparams.md
97+
- title: ImagenSafetySettings
98+
path: /docs/reference/js/ai.imagensafetysettings.md
99+
- title: InlineDataPart
100+
path: /docs/reference/js/ai.inlinedatapart.md
101+
- title: IntegerSchema
102+
path: /docs/reference/js/ai.integerschema.md
103+
- title: ModalityTokenCount
104+
path: /docs/reference/js/ai.modalitytokencount.md
105+
- title: ModelParams
106+
path: /docs/reference/js/ai.modelparams.md
107+
- title: NumberSchema
108+
path: /docs/reference/js/ai.numberschema.md
109+
- title: ObjectSchema
110+
path: /docs/reference/js/ai.objectschema.md
111+
- title: ObjectSchemaInterface
112+
path: /docs/reference/js/ai.objectschemainterface.md
113+
- title: PromptFeedback
114+
path: /docs/reference/js/ai.promptfeedback.md
115+
- title: RequestOptions
116+
path: /docs/reference/js/ai.requestoptions.md
117+
- title: RetrievedContextAttribution
118+
path: /docs/reference/js/ai.retrievedcontextattribution.md
119+
- title: SafetyRating
120+
path: /docs/reference/js/ai.safetyrating.md
121+
- title: SafetySetting
122+
path: /docs/reference/js/ai.safetysetting.md
123+
- title: Schema
124+
path: /docs/reference/js/ai.schema.md
125+
- title: SchemaInterface
126+
path: /docs/reference/js/ai.schemainterface.md
127+
- title: SchemaParams
128+
path: /docs/reference/js/ai.schemaparams.md
129+
- title: SchemaRequest
130+
path: /docs/reference/js/ai.schemarequest.md
131+
- title: SchemaShared
132+
path: /docs/reference/js/ai.schemashared.md
133+
- title: Segment
134+
path: /docs/reference/js/ai.segment.md
135+
- title: StartChatParams
136+
path: /docs/reference/js/ai.startchatparams.md
137+
- title: StringSchema
138+
path: /docs/reference/js/ai.stringschema.md
139+
- title: TextPart
140+
path: /docs/reference/js/ai.textpart.md
141+
- title: ToolConfig
142+
path: /docs/reference/js/ai.toolconfig.md
143+
- title: UsageMetadata
144+
path: /docs/reference/js/ai.usagemetadata.md
145+
- title: VertexAIBackend
146+
path: /docs/reference/js/ai.vertexaibackend.md
147+
- title: VertexAIOptions
148+
path: /docs/reference/js/ai.vertexaioptions.md
149+
- title: VideoMetadata
150+
path: /docs/reference/js/ai.videometadata.md
151+
- title: WebAttribution
152+
path: /docs/reference/js/ai.webattribution.md
4153
- title: analytics
5154
path: /docs/reference/js/analytics.md
6155
section:

docs-devsite/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ https://github.com/firebase/firebase-js-sdk
1515

1616
| Package | Description |
1717
| --- | --- |
18+
| [@firebase/ai](./ai.md#ai_package) | The Firebase AI Web SDK. |
1819
| [@firebase/analytics](./analytics.md#analytics_package) | The Firebase Analytics Web SDK. This SDK does not work in a Node.js environment. |
1920
| [@firebase/app](./app.md#app_package) | Firebase App |
2021
| [@firebase/app-check](./app-check.md#app-check_package) | The Firebase App Check Web SDK. |

docs-devsite/vertexai.aimodel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ https://github.com/firebase/firebase-js-sdk
1212
# AIModel class
1313
Base class for Firebase AI model APIs.
1414

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.
15+
Instances of this class are associated with a specific Firebase AI [Backend](./vertexai.backend.md#backend_class) and provide methods for interacting with the configured generative model.
1616

1717
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.
1818

docs-devsite/vertexai.backend.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# Backend class
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.
13+
Abstract base class representing the configuration for an AI service backend. This class should not be instantiated directly. Use its subclasses; [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class) for the Gemini Developer API (via [Google AI](https://ai.google/)<!-- -->), and [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class) for the Vertex AI Gemini API.
1414

1515
<b>Signature:</b>
1616

@@ -44,7 +44,7 @@ protected constructor(type: BackendType);
4444

4545
| Parameter | Type | Description |
4646
| --- | --- | --- |
47-
| type | [BackendType](./vertexai.md#backendtype) | The specific backend type constant (e.g., BackendType.GOOGLE\_AI). |
47+
| type | [BackendType](./vertexai.md#backendtype) | The backend type. |
4848

4949
## Backend.backendType
5050

docs-devsite/vertexai.googleaibackend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
1010
{% endcomment %}
1111

1212
# GoogleAIBackend class
13-
Configuration class for the Gemini Developer API (using Google AI).
13+
Configuration class for the Gemini Developer API (using [Google AI](https://ai.google/)<!-- -->).
1414

1515
Use this with [AIOptions](./vertexai.aioptions.md#aioptions_interface) when initializing the AI service via [getAI()](./vertexai.md#getai_a94a413) to specify the Gemini Developer API as the backend.
1616

docs-devsite/vertexai.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ The Firebase AI Web SDK.
2828
| Class | Description |
2929
| --- | --- |
3030
| [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 Vertex AI Gemini API 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](./vertexai.backend.md#backend_class) and provide methods for interacting with the configured generative model. |
3232
| [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 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. |
33+
| [Backend](./vertexai.backend.md#backend_class) | Abstract base class representing the configuration for an AI service backend. This class should not be instantiated directly. Use its subclasses; [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class) for the Gemini Developer API (via [Google AI](https://ai.google/)<!-- -->), and [VertexAIBackend](./vertexai.vertexaibackend.md#vertexaibackend_class) for the Vertex AI Gemini API. |
3434
| [BooleanSchema](./vertexai.booleanschema.md#booleanschema_class) | Schema class for "boolean" types. |
3535
| [ChatSession](./vertexai.chatsession.md#chatsession_class) | ChatSession class that enables sending chat messages and stores history of sent and received messages so far. |
3636
| [GenerativeModel](./vertexai.generativemodel.md#generativemodel_class) | Class for generative model APIs. |
37-
| [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class) | Configuration class for the Gemini Developer API (using Google 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 Developer API as the backend. |
37+
| [GoogleAIBackend](./vertexai.googleaibackend.md#googleaibackend_class) | Configuration class for the Gemini Developer API (using [Google AI](https://ai.google/)<!-- -->).<!-- -->Use this with [AIOptions](./vertexai.aioptions.md#aioptions_interface) when initializing the AI service via [getAI()](./vertexai.md#getai_a94a413) to specify the Gemini Developer API as the backend. |
3838
| [ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class) | <b><i>(Public Preview)</i></b> Defines the image format for images generated by Imagen.<!-- -->Use this class to specify the desired format (JPEG or PNG) and compression quality for images generated by Imagen. This is typically included as part of [ImagenModelParams](./vertexai.imagenmodelparams.md#imagenmodelparams_interface)<!-- -->. |
3939
| [ImagenModel](./vertexai.imagenmodel.md#imagenmodel_class) | <b><i>(Public Preview)</i></b> Class for Imagen model APIs.<!-- -->This class provides methods for generating images using the Imagen model. |
4040
| [IntegerSchema](./vertexai.integerschema.md#integerschema_class) | Schema class for "integer" types. |

packages/vertexai/src/backend.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ import { DEFAULT_LOCATION } from './constants';
1919
import { BackendType } from './public-types';
2020

2121
/**
22-
* Abstract base class representing the configuration for an AI service backend,
23-
* determining whether to use the Gemini Developer API (via Google AI) or the Vertex AI Gemini API.
24-
* This class should not be instantiated directly. Use its subclasses:
25-
* - {@link GoogleAIBackend}: For the Gemini Developer API (via Google AI).
26-
* - {@link VertexAIBackend}: For the Vertex AI Gemini API.
22+
* Abstract base class representing the configuration for an AI service backend.
23+
* This class should not be instantiated directly. Use its subclasses; {@link GoogleAIBackend} for
24+
* the Gemini Developer API (via {@link https://ai.google/ | Google AI}), and
25+
* {@link VertexAIBackend} for the Vertex AI Gemini API.
2726
*
2827
* @public
2928
*/
@@ -35,15 +34,15 @@ export abstract class Backend {
3534

3635
/**
3736
* Protected constructor for use by subclasses.
38-
* @param type - The specific backend type constant (e.g., BackendType.GOOGLE_AI).
37+
* @param type - The backend type.
3938
*/
4039
protected constructor(type: BackendType) {
4140
this.backendType = type;
4241
}
4342
}
4443

4544
/**
46-
* Configuration class for the Gemini Developer API (using Google AI).
45+
* Configuration class for the Gemini Developer API (using {@link https://ai.google/ | Google AI}).
4746
*
4847
* Use this with {@link AIOptions} when initializing the AI service via
4948
* {@link getAI | getAI()} to specify the Gemini Developer API as the backend.

packages/vertexai/src/models/ai-model.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ import { _isFirebaseServerApp } from '@firebase/app';
2424
/**
2525
* Base class for Firebase AI model APIs.
2626
*
27-
* Instances of this class are associated with a specific Firebase AI backend
28-
* (either the Vertex AI Gemini API or the Gemini Developer API via Google AI)
27+
* Instances of this class are associated with a specific Firebase AI {@link Backend}
2928
* and provide methods for interacting with the configured generative model.
3029
*
3130
* @public

packages/vertexai/src/public-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const BackendType = {
8484
VERTEX_AI: 'VERTEX_AI',
8585

8686
/**
87-
* Identifies the backend service for the Gemini Developer API (via Google AI).
87+
* Identifies the backend service for the Gemini Developer API ({@link https://ai.google/ | Google AI}).
8888
* Use this constant when creating a {@link GoogleAIBackend} configuration.
8989
*/
9090
GOOGLE_AI: 'GOOGLE_AI'

0 commit comments

Comments
 (0)