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
Adds new ResponseModality enum that allows users to specify which modalities should be included in a response.
Since we provide a text() accessor, a similar inlineDataParts() accessor was added to return all InlineDataPart[] in the first candidate.
| [inlineDataParts](./vertexai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponseinlinedataparts) | () => [InlineDataPart](./vertexai.inlinedatapart.md#inlinedatapart_interface)<!-- -->\[\]\| undefined | Aggregates and returns all [InlineDataPart](./vertexai.inlinedatapart.md#inlinedatapart_interface)<!-- -->s from the [GenerateContentResponse](./vertexai.generatecontentresponse.md#generatecontentresponse_interface)<!-- -->'s first candidate. |
27
28
| [text](./vertexai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponsetext) | () => string | Returns the text string from the response, if available. Throws if the prompt or candidate was blocked. |
Aggregates and returns all [InlineDataPart](./vertexai.inlinedatapart.md#inlinedatapart_interface)<!-- -->s from the [GenerateContentResponse](./vertexai.generatecontentresponse.md#generatecontentresponse_interface)<!-- -->'s first candidate.
- MultimodalresponsegenerationisonlysupportedbysomeGeminimodelsandversions; see [modelversions](https://firebase.google.com/docs/vertex-ai/models)<!-- -->. - Only image generation (`ResponseModality.IMAGE`<!-- -->) is supported.
87
+
88
+
<b>Signature:</b>
89
+
90
+
```typescript
91
+
responseModalities?: ResponseModality[];
92
+
```
93
+
78
94
## GenerationConfig.responseSchema
79
95
80
96
Outputresponseschemaofthegeneratedcandidatetext. Thisvaluecanbeaclassgeneratedwitha [Schema](./vertexai.schema.md#schema_class) staticmethodlike `Schema.string()` or `Schema.object()` oritcanbeaplainJSobjectmatchingthe [SchemaRequest](./vertexai.schemarequest.md#schemarequest_interface) interface. <br/>Note: Thisonlyapplieswhenthespecified `responseMIMEType` supportsaschema; currentlythisislimitedto `application/json` and `text/x.enum`<!-- -->.
0 commit comments