Skip to content

Commit a82a809

Browse files
committed
Fix docs
1 parent b4ae062 commit a82a809

File tree

8 files changed

+22
-968
lines changed

8 files changed

+22
-968
lines changed

docs-devsite/_toc.yaml

Lines changed: 2 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ toc:
132132
path: /docs/reference/js/ai.schemashared.md
133133
- title: Segment
134134
path: /docs/reference/js/ai.segment.md
135+
- title: SingleRequestOptions
136+
path: /docs/reference/js/ai.singlerequestoptions.md
135137
- title: StartChatParams
136138
path: /docs/reference/js/ai.startchatparams.md
137139
- title: StringSchema
@@ -618,149 +620,3 @@ toc:
618620
path: /docs/reference/js/storage.uploadtask.md
619621
- title: UploadTaskSnapshot
620622
path: /docs/reference/js/storage.uploadtasksnapshot.md
621-
<<<<<<< HEAD
622-
- title: vertexai
623-
path: /docs/reference/js/vertexai.md
624-
section:
625-
- title: ArraySchema
626-
path: /docs/reference/js/vertexai.arrayschema.md
627-
- title: BaseParams
628-
path: /docs/reference/js/vertexai.baseparams.md
629-
- title: BooleanSchema
630-
path: /docs/reference/js/vertexai.booleanschema.md
631-
- title: ChatSession
632-
path: /docs/reference/js/vertexai.chatsession.md
633-
- title: Citation
634-
path: /docs/reference/js/vertexai.citation.md
635-
- title: CitationMetadata
636-
path: /docs/reference/js/vertexai.citationmetadata.md
637-
- title: Content
638-
path: /docs/reference/js/vertexai.content.md
639-
- title: CountTokensRequest
640-
path: /docs/reference/js/vertexai.counttokensrequest.md
641-
- title: CountTokensResponse
642-
path: /docs/reference/js/vertexai.counttokensresponse.md
643-
- title: CustomErrorData
644-
path: /docs/reference/js/vertexai.customerrordata.md
645-
- title: Date_2
646-
path: /docs/reference/js/vertexai.date_2.md
647-
- title: EnhancedGenerateContentResponse
648-
path: /docs/reference/js/vertexai.enhancedgeneratecontentresponse.md
649-
- title: ErrorDetails
650-
path: /docs/reference/js/vertexai.errordetails.md
651-
- title: FileData
652-
path: /docs/reference/js/vertexai.filedata.md
653-
- title: FileDataPart
654-
path: /docs/reference/js/vertexai.filedatapart.md
655-
- title: FunctionCall
656-
path: /docs/reference/js/vertexai.functioncall.md
657-
- title: FunctionCallingConfig
658-
path: /docs/reference/js/vertexai.functioncallingconfig.md
659-
- title: FunctionCallPart
660-
path: /docs/reference/js/vertexai.functioncallpart.md
661-
- title: FunctionDeclaration
662-
path: /docs/reference/js/vertexai.functiondeclaration.md
663-
- title: FunctionDeclarationsTool
664-
path: /docs/reference/js/vertexai.functiondeclarationstool.md
665-
- title: FunctionResponse
666-
path: /docs/reference/js/vertexai.functionresponse.md
667-
- title: FunctionResponsePart
668-
path: /docs/reference/js/vertexai.functionresponsepart.md
669-
- title: GenerateContentCandidate
670-
path: /docs/reference/js/vertexai.generatecontentcandidate.md
671-
- title: GenerateContentRequest
672-
path: /docs/reference/js/vertexai.generatecontentrequest.md
673-
- title: GenerateContentResponse
674-
path: /docs/reference/js/vertexai.generatecontentresponse.md
675-
- title: GenerateContentResult
676-
path: /docs/reference/js/vertexai.generatecontentresult.md
677-
- title: GenerateContentStreamResult
678-
path: /docs/reference/js/vertexai.generatecontentstreamresult.md
679-
- title: GenerationConfig
680-
path: /docs/reference/js/vertexai.generationconfig.md
681-
- title: GenerativeContentBlob
682-
path: /docs/reference/js/vertexai.generativecontentblob.md
683-
- title: GenerativeModel
684-
path: /docs/reference/js/vertexai.generativemodel.md
685-
- title: GroundingAttribution
686-
path: /docs/reference/js/vertexai.groundingattribution.md
687-
- title: GroundingMetadata
688-
path: /docs/reference/js/vertexai.groundingmetadata.md
689-
- title: ImagenGCSImage
690-
path: /docs/reference/js/vertexai.imagengcsimage.md
691-
- title: ImagenGenerationConfig
692-
path: /docs/reference/js/vertexai.imagengenerationconfig.md
693-
- title: ImagenGenerationResponse
694-
path: /docs/reference/js/vertexai.imagengenerationresponse.md
695-
- title: ImagenImageFormat
696-
path: /docs/reference/js/vertexai.imagenimageformat.md
697-
- title: ImagenInlineImage
698-
path: /docs/reference/js/vertexai.imageninlineimage.md
699-
- title: ImagenModel
700-
path: /docs/reference/js/vertexai.imagenmodel.md
701-
- title: ImagenModelParams
702-
path: /docs/reference/js/vertexai.imagenmodelparams.md
703-
- title: ImagenSafetySettings
704-
path: /docs/reference/js/vertexai.imagensafetysettings.md
705-
- title: InlineDataPart
706-
path: /docs/reference/js/vertexai.inlinedatapart.md
707-
- title: IntegerSchema
708-
path: /docs/reference/js/vertexai.integerschema.md
709-
- title: ModalityTokenCount
710-
path: /docs/reference/js/vertexai.modalitytokencount.md
711-
- title: ModelParams
712-
path: /docs/reference/js/vertexai.modelparams.md
713-
- title: NumberSchema
714-
path: /docs/reference/js/vertexai.numberschema.md
715-
- title: ObjectSchema
716-
path: /docs/reference/js/vertexai.objectschema.md
717-
- title: ObjectSchemaInterface
718-
path: /docs/reference/js/vertexai.objectschemainterface.md
719-
- title: PromptFeedback
720-
path: /docs/reference/js/vertexai.promptfeedback.md
721-
- title: RequestOptions
722-
path: /docs/reference/js/vertexai.requestoptions.md
723-
- title: RetrievedContextAttribution
724-
path: /docs/reference/js/vertexai.retrievedcontextattribution.md
725-
- title: SafetyRating
726-
path: /docs/reference/js/vertexai.safetyrating.md
727-
- title: SafetySetting
728-
path: /docs/reference/js/vertexai.safetysetting.md
729-
- title: Schema
730-
path: /docs/reference/js/vertexai.schema.md
731-
- title: SchemaInterface
732-
path: /docs/reference/js/vertexai.schemainterface.md
733-
- title: SchemaParams
734-
path: /docs/reference/js/vertexai.schemaparams.md
735-
- title: SchemaRequest
736-
path: /docs/reference/js/vertexai.schemarequest.md
737-
- title: SchemaShared
738-
path: /docs/reference/js/vertexai.schemashared.md
739-
- title: Segment
740-
path: /docs/reference/js/vertexai.segment.md
741-
- title: SingleRequestOptions
742-
path: /docs/reference/js/vertexai.singlerequestoptions.md
743-
- title: StartChatParams
744-
path: /docs/reference/js/vertexai.startchatparams.md
745-
- title: StringSchema
746-
path: /docs/reference/js/vertexai.stringschema.md
747-
- title: TextPart
748-
path: /docs/reference/js/vertexai.textpart.md
749-
- title: ToolConfig
750-
path: /docs/reference/js/vertexai.toolconfig.md
751-
- title: UsageMetadata
752-
path: /docs/reference/js/vertexai.usagemetadata.md
753-
- title: VertexAI
754-
path: /docs/reference/js/vertexai.vertexai.md
755-
- title: VertexAIError
756-
path: /docs/reference/js/vertexai.vertexaierror.md
757-
- title: VertexAIModel
758-
path: /docs/reference/js/vertexai.vertexaimodel.md
759-
- title: VertexAIOptions
760-
path: /docs/reference/js/vertexai.vertexaioptions.md
761-
- title: VideoMetadata
762-
path: /docs/reference/js/vertexai.videometadata.md
763-
- title: WebAttribution
764-
path: /docs/reference/js/vertexai.webattribution.md
765-
=======
766-
>>>>>>> main

docs-devsite/ai.chatsession.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,9 @@ export declare class ChatSession
3636

3737
| Method | Modifiers | Description |
3838
| --- | --- | --- |
39-
<<<<<<< HEAD:docs-devsite/vertexai.chatsession.md
40-
| [getHistory()](./vertexai.chatsession.md#chatsessiongethistory) | | Gets the chat history so far. Blocked prompts are not added to history. Neither blocked candidates nor the prompts that generated them are added to history. |
41-
| [sendMessage(request, singleRequestOptions)](./vertexai.chatsession.md#chatsessionsendmessage) | | Sends a chat message and receives a non-streaming [GenerateContentResult](./vertexai.generatecontentresult.md#generatecontentresult_interface) |
42-
| [sendMessageStream(request, singleRequestOptions)](./vertexai.chatsession.md#chatsessionsendmessagestream) | | Sends a chat message and receives the response as a [GenerateContentStreamResult](./vertexai.generatecontentstreamresult.md#generatecontentstreamresult_interface) containing an iterable stream and a response promise. |
43-
=======
4439
| [getHistory()](./ai.chatsession.md#chatsessiongethistory) | | Gets the chat history so far. Blocked prompts are not added to history. Neither blocked candidates nor the prompts that generated them are added to history. |
45-
| [sendMessage(request)](./ai.chatsession.md#chatsessionsendmessage) | | Sends a chat message and receives a non-streaming [GenerateContentResult](./ai.generatecontentresult.md#generatecontentresult_interface) |
46-
| [sendMessageStream(request)](./ai.chatsession.md#chatsessionsendmessagestream) | | Sends a chat message and receives the response as a [GenerateContentStreamResult](./ai.generatecontentstreamresult.md#generatecontentstreamresult_interface) containing an iterable stream and a response promise. |
47-
>>>>>>> main:docs-devsite/ai.chatsession.md
40+
| [sendMessage(request, singleRequestOptions)](./ai.chatsession.md#chatsessionsendmessage) | | Sends a chat message and receives a non-streaming [GenerateContentResult](./ai.generatecontentresult.md#generatecontentresult_interface) |
41+
| [sendMessageStream(request, singleRequestOptions)](./ai.chatsession.md#chatsessionsendmessagestream) | | Sends a chat message and receives the response as a [GenerateContentStreamResult](./ai.generatecontentstreamresult.md#generatecontentstreamresult_interface) containing an iterable stream and a response promise. |
4842

4943
## ChatSession.(constructor)
5044

@@ -116,12 +110,8 @@ sendMessage(request: string | Array<string | Part>, singleRequestOptions?: Singl
116110

117111
| Parameter | Type | Description |
118112
| --- | --- | --- |
119-
<<<<<<< HEAD:docs-devsite/vertexai.chatsession.md
120-
| request | string \| Array&lt;string \| [Part](./vertexai.md#part)<!-- -->&gt; | |
121-
| singleRequestOptions | [SingleRequestOptions](./vertexai.singlerequestoptions.md#singlerequestoptions_interface) | |
122-
=======
123113
| request | string \| Array&lt;string \| [Part](./ai.md#part)<!-- -->&gt; | |
124-
>>>>>>> main:docs-devsite/ai.chatsession.md
114+
| singleRequestOptions | [SingleRequestOptions](./ai.singlerequestoptions.md#singlerequestoptions_interface) | |
125115

126116
<b>Returns:</b>
127117

@@ -141,12 +131,8 @@ sendMessageStream(request: string | Array<string | Part>, singleRequestOptions?:
141131

142132
| Parameter | Type | Description |
143133
| --- | --- | --- |
144-
<<<<<<< HEAD:docs-devsite/vertexai.chatsession.md
145-
| request | string \| Array&lt;string \| [Part](./vertexai.md#part)<!-- -->&gt; | |
146-
| singleRequestOptions | [SingleRequestOptions](./vertexai.singlerequestoptions.md#singlerequestoptions_interface) | |
147-
=======
148134
| request | string \| Array&lt;string \| [Part](./ai.md#part)<!-- -->&gt; | |
149-
>>>>>>> main:docs-devsite/ai.chatsession.md
135+
| singleRequestOptions | [SingleRequestOptions](./ai.singlerequestoptions.md#singlerequestoptions_interface) | |
150136

151137
<b>Returns:</b>
152138

docs-devsite/ai.generativemodel.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export declare class GenerativeModel extends AIModel
4040
4141
| Method | Modifiers | Description |
4242
| --- | --- | --- |
43-
| [countTokens(request)](./ai.generativemodel.md#generativemodelcounttokens) | | Counts the tokens in the provided request. |
44-
| [generateContent(request)](./ai.generativemodel.md#generativemodelgeneratecontent) | | Makes a single non-streaming call to the model and returns an object containing a single [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface)<!-- -->. |
45-
| [generateContentStream(request)](./ai.generativemodel.md#generativemodelgeneratecontentstream) | | Makes a single streaming call to the model and returns an object containing an iterable stream that iterates over all chunks in the streaming response as well as a promise that returns the final aggregated response. |
43+
| [countTokens(request, singleRequestOptions)](./ai.generativemodel.md#generativemodelcounttokens) | | Counts the tokens in the provided request. |
44+
| [generateContent(request, singleRequestOptions)](./ai.generativemodel.md#generativemodelgeneratecontent) | | Makes a single non-streaming call to the model and returns an object containing a single [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface)<!-- -->. |
45+
| [generateContentStream(request, singleRequestOptions)](./ai.generativemodel.md#generativemodelgeneratecontentstream) | | Makes a single streaming call to the model and returns an object containing an iterable stream that iterates over all chunks in the streaming response as well as a promise that returns the final aggregated response. |
4646
| [startChat(startChatParams)](./ai.generativemodel.md#generativemodelstartchat) | | Gets a new [ChatSession](./ai.chatsession.md#chatsession_class) instance which can be used for multi-turn chats. |
4747
4848
## GenerativeModel.(constructor)
@@ -118,14 +118,15 @@ Counts the tokens in the provided request.
118118
<b>Signature:</b>
119119
120120
```typescript
121-
countTokens(request: CountTokensRequest | string | Array<string | Part>): Promise<CountTokensResponse>;
121+
countTokens(request: CountTokensRequest | string | Array<string | Part>, singleRequestOptions?: SingleRequestOptions): Promise<CountTokensResponse>;
122122
```
123123
124124
#### Parameters
125125
126126
| Parameter | Type | Description |
127127
| --- | --- | --- |
128128
| request | [CountTokensRequest](./ai.counttokensrequest.md#counttokensrequest_interface) \| string \| Array&lt;string \| [Part](./ai.md#part)<!-- -->&gt; | |
129+
| singleRequestOptions | [SingleRequestOptions](./ai.singlerequestoptions.md#singlerequestoptions_interface) | |
129130
130131
<b>Returns:</b>
131132
@@ -138,14 +139,15 @@ Makes a single non-streaming call to the model and returns an object containing
138139
<b>Signature:</b>
139140
140141
```typescript
141-
generateContent(request: GenerateContentRequest | string | Array<string | Part>): Promise<GenerateContentResult>;
142+
generateContent(request: GenerateContentRequest | string | Array<string | Part>, singleRequestOptions?: SingleRequestOptions): Promise<GenerateContentResult>;
142143
```
143144
144145
#### Parameters
145146
146147
| Parameter | Type | Description |
147148
| --- | --- | --- |
148149
| request | [GenerateContentRequest](./ai.generatecontentrequest.md#generatecontentrequest_interface) \| string \| Array&lt;string \| [Part](./ai.md#part)<!-- -->&gt; | |
150+
| singleRequestOptions | [SingleRequestOptions](./ai.singlerequestoptions.md#singlerequestoptions_interface) | |
149151
150152
<b>Returns:</b>
151153
@@ -158,14 +160,15 @@ Makes a single streaming call to the model and returns an object containing an i
158160
<b>Signature:</b>
159161
160162
```typescript
161-
generateContentStream(request: GenerateContentRequest | string | Array<string | Part>): Promise<GenerateContentStreamResult>;
163+
generateContentStream(request: GenerateContentRequest | string | Array<string | Part>, singleRequestOptions?: SingleRequestOptions): Promise<GenerateContentStreamResult>;
162164
```
163165
164166
#### Parameters
165167
166168
| Parameter | Type | Description |
167169
| --- | --- | --- |
168170
| request | [GenerateContentRequest](./ai.generatecontentrequest.md#generatecontentrequest_interface) \| string \| Array&lt;string \| [Part](./ai.md#part)<!-- -->&gt; | |
171+
| singleRequestOptions | [SingleRequestOptions](./ai.singlerequestoptions.md#singlerequestoptions_interface) | |
169172
170173
<b>Returns:</b>
171174

docs-devsite/ai.imagenmodel.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ export declare class ImagenModel extends AIModel
4242
4343
| Method | Modifiers | Description |
4444
| --- | --- | --- |
45-
<<<<<<< HEAD:docs-devsite/vertexai.imagenmodel.md
46-
| [generateImages(prompt, singleRequestOptions)](./vertexai.imagenmodel.md#imagenmodelgenerateimages) | | <b><i>(Public Preview)</i></b> Generates images using the Imagen model and returns them as base64-encoded strings. |
47-
=======
48-
| [generateImages(prompt)](./ai.imagenmodel.md#imagenmodelgenerateimages) | | <b><i>(Public Preview)</i></b> Generates images using the Imagen model and returns them as base64-encoded strings. |
49-
>>>>>>> main:docs-devsite/ai.imagenmodel.md
45+
| [generateImages(prompt, singleRequestOptions)](./ai.imagenmodel.md#imagenmodelgenerateimages) | | <b><i>(Public Preview)</i></b> Generates images using the Imagen model and returns them as base64-encoded strings. |
5046
5147
## ImagenModel.(constructor)
5248
@@ -130,7 +126,7 @@ generateImages(prompt: string, singleRequestOptions?: SingleRequestOptions): Pro
130126
| Parameter | Type | Description |
131127
| --- | --- | --- |
132128
| prompt | string | A text prompt describing the image(s) to generate. |
133-
| singleRequestOptions | [SingleRequestOptions](./vertexai.singlerequestoptions.md#singlerequestoptions_interface) | |
129+
| singleRequestOptions | [SingleRequestOptions](./ai.singlerequestoptions.md#singlerequestoptions_interface) | |
134130
135131
<b>Returns:</b>
136132

docs-devsite/ai.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ The Firebase AI Web SDK.
117117
| [SchemaRequest](./ai.schemarequest.md#schemarequest_interface) | Final format for [Schema](./ai.schema.md#schema_class) params passed to backend requests. |
118118
| [SchemaShared](./ai.schemashared.md#schemashared_interface) | Basic [Schema](./ai.schema.md#schema_class) properties shared across several Schema-related types. |
119119
| [Segment](./ai.segment.md#segment_interface) | |
120+
| [SingleRequestOptions](./ai.singlerequestoptions.md#singlerequestoptions_interface) | Options that can be provided per-request. Extends the base [RequestOptions](./ai.requestoptions.md#requestoptions_interface) (like <code>timeout</code> and <code>baseUrl</code>) with request-specific controls like cancellation via <code>AbortSignal</code>.<!-- -->Options specified here will override any default [RequestOptions](./ai.requestoptions.md#requestoptions_interface) configured on a model (e.g. [GenerativeModel](./ai.generativemodel.md#generativemodel_class)<!-- -->). |
120121
| [StartChatParams](./ai.startchatparams.md#startchatparams_interface) | Params for [GenerativeModel.startChat()](./ai.generativemodel.md#generativemodelstartchat)<!-- -->. |
121122
| [TextPart](./ai.textpart.md#textpart_interface) | Content part interface if the part represents a text string. |
122123
| [ToolConfig](./ai.toolconfig.md#toolconfig_interface) | Tool config. This config is shared for all tools provided in the request. |

docs-devsite/vertexai.singlerequestoptions.md renamed to docs-devsite/ai.singlerequestoptions.md

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

1212
# SingleRequestOptions interface
13-
Options that can be provided per-request. Extends the base [RequestOptions](./vertexai.requestoptions.md#requestoptions_interface) (like `timeout` and `baseUrl`<!-- -->) with request-specific controls like cancellation via `AbortSignal`<!-- -->.
13+
Options that can be provided per-request. Extends the base [RequestOptions](./ai.requestoptions.md#requestoptions_interface) (like `timeout` and `baseUrl`<!-- -->) with request-specific controls like cancellation via `AbortSignal`<!-- -->.
1414

15-
Options specified here will override any default [RequestOptions](./vertexai.requestoptions.md#requestoptions_interface) configured on a model (e.g. [GenerativeModel](./vertexai.generativemodel.md#generativemodel_class)<!-- -->).
15+
Options specified here will override any default [RequestOptions](./ai.requestoptions.md#requestoptions_interface) configured on a model (e.g. [GenerativeModel](./ai.generativemodel.md#generativemodel_class)<!-- -->).
1616

1717
<b>Signature:</b>
1818

1919
```typescript
2020
export interface SingleRequestOptions extends RequestOptions
2121
```
22-
<b>Extends:</b> [RequestOptions](./vertexai.requestoptions.md#requestoptions_interface)
22+
<b>Extends:</b> [RequestOptions](./ai.requestoptions.md#requestoptions_interface)
2323
2424
## Properties
2525
2626
| Property | Type | Description |
2727
| --- | --- | --- |
28-
| [signal](./vertexai.singlerequestoptions.md#singlerequestoptionssignal) | AbortSignal | An <code>AbortSignal</code> instance that allows cancelling ongoing requests (like <code>generateContent</code> or <code>generateImages</code>).<!-- -->If provided, calling <code>abort()</code> on the corresponding <code>AbortController</code> will attempt to cancel the underlying HTTP request. An <code>AbortError</code> will be thrown if cancellation is successful.<!-- -->Note that this will not cancel the request in the backend, so billing will still be applied despite cancellation. |
28+
| [signal](./ai.singlerequestoptions.md#singlerequestoptionssignal) | AbortSignal | An <code>AbortSignal</code> instance that allows cancelling ongoing requests (like <code>generateContent</code> or <code>generateImages</code>).<!-- -->If provided, calling <code>abort()</code> on the corresponding <code>AbortController</code> will attempt to cancel the underlying HTTP request. An <code>AbortError</code> will be thrown if cancellation is successful.<!-- -->Note that this will not cancel the request in the backend, so billing will still be applied despite cancellation. |
2929
3030
## SingleRequestOptions.signal
3131

0 commit comments

Comments
 (0)