File tree Expand file tree Collapse file tree 2 files changed +5007
-5727
lines changed
packages/vertexai/src/types Expand file tree Collapse file tree 2 files changed +5007
-5727
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
HarmBlockThreshold ,
24
24
HarmCategory
25
25
} from './enums' ;
26
- import { ObjectSchemaInterface } from './schema' ;
26
+ import { ObjectSchemaInterface , SchemaRequest } from './schema' ;
27
27
28
28
/**
29
29
* Base parameters for a number of methods.
@@ -86,11 +86,14 @@ export interface GenerationConfig {
86
86
*/
87
87
responseMimeType ?: string ;
88
88
/**
89
- * Output response schema of the generated candidate text.
89
+ * Output response schema of the generated candidate text. This
90
+ * value can be a class generated with a {@link Schema} static method
91
+ * like `Schema.string()` or `Schema.object()` or it can be a plain
92
+ * JS object matching the {@link SchemaRequest} interface.
90
93
* Note: This only applies when the specified `responseMIMEType` supports a schema; currently
91
94
* this is limited to `application/json`.
92
95
*/
93
- responseSchema ?: TypedSchema ;
96
+ responseSchema ?: TypedSchema | SchemaRequest ;
94
97
}
95
98
96
99
/**
You can’t perform that action at this time.
0 commit comments