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
Copy file name to clipboardExpand all lines: docs-devsite/vertexai.generativemodel.md
+9-6
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,9 @@ export declare class GenerativeModel extends VertexAIModel
40
40
41
41
| Method | Modifiers | Description |
42
42
| --- | --- | --- |
43
-
| [countTokens(request)](./vertexai.generativemodel.md#generativemodelcounttokens) | | Counts the tokens in the provided request. |
44
-
| [generateContent(request)](./vertexai.generativemodel.md#generativemodelgeneratecontent) | | Makes a single non-streaming call to the model and returns an object containing a single <code>[GenerateContentResponse](./vertexai.generatecontentresponse.md#generatecontentresponse_interface)</code>. |
45
-
| [generateContentStream(request)](./vertexai.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)](./vertexai.generativemodel.md#generativemodelcounttokens) | | Counts the tokens in the provided request. |
44
+
| [generateContent(request, singleRequestOptions)](./vertexai.generativemodel.md#generativemodelgeneratecontent) | | Makes a single non-streaming call to the model and returns an object containing a single <code>[GenerateContentResponse](./vertexai.generatecontentresponse.md#generatecontentresponse_interface)</code>. |
45
+
| [generateContentStream(request, singleRequestOptions)](./vertexai.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. |
46
46
| [startChat(startChatParams)](./vertexai.generativemodel.md#generativemodelstartchat) | | Gets a new <code>[ChatSession](./vertexai.chatsession.md#chatsession_class)</code> instance which can be used for multi-turn chats. |
47
47
48
48
## GenerativeModel.(constructor)
@@ -118,14 +118,15 @@ Counts the tokens in the provided request.
Copy file name to clipboardExpand all lines: docs-devsite/vertexai.imagenmodel.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ export declare class ImagenModel extends VertexAIModel
42
42
43
43
| Method | Modifiers | Description |
44
44
| --- | --- | --- |
45
-
| [generateImages(prompt)](./vertexai.imagenmodel.md#imagenmodelgenerateimages) | | <b><i>(Public Preview)</i></b> Generates images using the Imagen model and returns them as base64-encoded strings. |
45
+
| [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. |
46
46
47
47
## ImagenModel.(constructor)
48
48
@@ -118,14 +118,15 @@ If the prompt was not blocked, but one or more of the generated images were filt
Copy file name to clipboardExpand all lines: docs-devsite/vertexai.md
+1
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,7 @@ The Vertex AI in Firebase Web SDK.
111
111
|[SchemaRequest](./vertexai.schemarequest.md#schemarequest_interface)| Final format for <code>[Schema](./vertexai.schema.md#schema_class)</code> params passed to backend requests. |
112
112
|[SchemaShared](./vertexai.schemashared.md#schemashared_interface)| Basic <code>[Schema](./vertexai.schema.md#schema_class)</code> properties shared across several Schema-related types. |
|[SingleRequestOptions](./vertexai.singlerequestoptions.md#singlerequestoptions_interface)| Options that can be provided per-request. Extends the base [RequestOptions](./vertexai.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](./vertexai.requestoptions.md#requestoptions_interface) configured on a model (e.g. [GenerativeModel](./vertexai.generativemodel.md#generativemodel_class)<!---->). |
114
115
|[StartChatParams](./vertexai.startchatparams.md#startchatparams_interface)| Params for [GenerativeModel.startChat()](./vertexai.generativemodel.md#generativemodelstartchat)<!---->. |
115
116
|[TextPart](./vertexai.textpart.md#textpart_interface)| Content part interface if the part represents a text string. |
116
117
|[ToolConfig](./vertexai.toolconfig.md#toolconfig_interface)| Tool config. This config is shared for all tools provided in the request. |
This is generated by the JS SDK team, and any local changes will be
8
+
overwritten. Changes should be made in the source code at
9
+
https://github.com/firebase/firebase-js-sdk
10
+
{% endcomment %}
11
+
12
+
# 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`<!---->.
14
+
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)<!---->).
| [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. |
29
+
30
+
## SingleRequestOptions.signal
31
+
32
+
An `AbortSignal` instance that allows cancelling ongoing requests (like `generateContent` or `generateImages`<!-- -->).
33
+
34
+
If provided, calling `abort()` on the corresponding `AbortController` will attempt to cancel the underlying HTTP request. An `AbortError` will be thrown if cancellation is successful.
35
+
36
+
Note that this will not cancel the request in the backend, so billing will still be applied despite cancellation.
0 commit comments