-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a responseMimeType to generationConfig (#133)
Provide Apps with an ability to configure the responseMimeType. This enables applications to request that VertexAI returns the response in a JSON format instead of a normal textual format.
- Loading branch information
1 parent
c39015c
commit 58ab777
Showing
4 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@google/generative-ai": minor | ||
--- | ||
|
||
Added responseMimeType to GenerationConfig to allow for JSON formatted responses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.generationconfig.responsemimetype.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [GenerationConfig](./generative-ai.generationconfig.md) > [responseMimeType](./generative-ai.generationconfig.responsemimetype.md) | ||
|
||
## GenerationConfig.responseMimeType property | ||
|
||
Output response mimetype of the generated candidate text. Supported mimetype: `text/plain`<!-- -->: (default) Text output. `application/json`<!-- -->: JSON response in the candidates. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
responseMimeType?: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters