diff --git a/common/api-review/vertexai-preview.api.md b/common/api-review/vertexai-preview.api.md
index 96d8ec70050..b3ae09e8dc7 100644
--- a/common/api-review/vertexai-preview.api.md
+++ b/common/api-review/vertexai-preview.api.md
@@ -311,6 +311,7 @@ export interface GenerationConfig {
maxOutputTokens?: number;
// (undocumented)
presencePenalty?: number;
+ responseMimeType?: string;
// (undocumented)
stopSequences?: string[];
// (undocumented)
diff --git a/docs-devsite/vertexai-preview.generationconfig.md b/docs-devsite/vertexai-preview.generationconfig.md
index 0aa8e5567f7..3b00214d88b 100644
--- a/docs-devsite/vertexai-preview.generationconfig.md
+++ b/docs-devsite/vertexai-preview.generationconfig.md
@@ -26,6 +26,7 @@ export interface GenerationConfig
| [frequencyPenalty](./vertexai-preview.generationconfig.md#generationconfigfrequencypenalty) | number | |
| [maxOutputTokens](./vertexai-preview.generationconfig.md#generationconfigmaxoutputtokens) | number | |
| [presencePenalty](./vertexai-preview.generationconfig.md#generationconfigpresencepenalty) | number | |
+| [responseMimeType](./vertexai-preview.generationconfig.md#generationconfigresponsemimetype) | string | Output response mimetype of the generated candidate text. Supported mimetype: text/plain
: (default) Text output. application/json
: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. |
| [stopSequences](./vertexai-preview.generationconfig.md#generationconfigstopsequences) | string\[\] | |
| [temperature](./vertexai-preview.generationconfig.md#generationconfigtemperature) | number | |
| [topK](./vertexai-preview.generationconfig.md#generationconfigtopk) | number | |
@@ -63,6 +64,16 @@ maxOutputTokens?: number;
presencePenalty?: number;
```
+## GenerationConfig.responseMimeType
+
+Output response mimetype of the generated candidate text. Supported mimetype: `text/plain`: (default) Text output. `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
+
+Signature:
+
+```typescript
+responseMimeType?: string;
+```
+
## GenerationConfig.stopSequences
Signature:
diff --git a/packages/vertexai/src/types/requests.ts b/packages/vertexai/src/types/requests.ts
index 748f6ee140a..5da8f05b6bb 100644
--- a/packages/vertexai/src/types/requests.ts
+++ b/packages/vertexai/src/types/requests.ts
@@ -77,6 +77,16 @@ export interface GenerationConfig {
topK?: number;
presencePenalty?: number;
frequencyPenalty?: number;
+ /**
+ * Output response mimetype of the generated candidate text.
+ * Supported mimetype:
+ * `text/plain`: (default) Text output.
+ * `application/json`: JSON response in the candidates.
+ * The model needs to be prompted to output the appropriate response type,
+ * otherwise the behavior is undefined.
+ * This is a preview feature.
+ */
+ responseMimeType?: string;
}
/**