Config options for content-related requests
Signature:
export interface GenerationConfig
Properties
Property | Type | Description |
---|---|---|
candidateCount | number | |
frequencyPenalty | number | |
maxOutputTokens | number | |
presencePenalty | number | |
responseMimeType | string | Output response mimetype of the generated candidate text. Supported mimetypes are text/plain (default, text output) and 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 | string[] | |
temperature | number | |
topK | number | |
topP | number |
GenerationConfig.candidateCount
Signature:
candidateCount?: number;
GenerationConfig.frequencyPenalty
Signature:
frequencyPenalty?: number;
GenerationConfig.maxOutputTokens
Signature:
maxOutputTokens?: number;
GenerationConfig.presencePenalty
Signature:
presencePenalty?: number;
GenerationConfig.responseMimeType
Output response mimetype of the generated candidate text. Supported mimetypes are text/plain
(default, text output) and 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:
responseMimeType?: string;
GenerationConfig.stopSequences
Signature:
stopSequences?: string[];
GenerationConfig.temperature
Signature:
temperature?: number;
GenerationConfig.topK
Signature:
topK?: number;
GenerationConfig.topP
Signature:
topP?: number;