Note: This only applies when the specified responseMIMEType
supports a schema; currently this is limited to application/json
and text/x.enum
.
Signature:
candidateCount?:number;
Signature:
frequencyPenalty?:number;
Signature:
maxOutputTokens?:number;
Signature:
presencePenalty?:number;
Output response MIME type of the generated candidate text. Supported MIME types are text/plain
(default, text output), application/json
(JSON response in the candidates), and text/x.enum
.
Signature:
responseMimeType?:string;
Output response schema of the generated candidate text. This value can be a class generated with a Schema static method like Schema.string()
or Schema.object()
or it can be a plain JS object matching the SchemaRequest interface.
Note: This only applies when the specified responseMIMEType
supports a schema; currently this is limited to application/json
and text/x.enum
.
Signature:
responseSchema?:TypedSchema|SchemaRequest;
Signature:
stopSequences?:string[];
Signature:
temperature?:number;
Signature:
topK?:number;
Signature:
topP?:number;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-24 UTC.