Generate Content Config
Optional model configuration parameters.
For more information, see `Content generation parameters `_.
Types
Properties
Functions
Link copied to clipboard
If enabled, audio timestamp will be included in the request to the model.
Link copied to clipboard
The configuration for automatic function calling.
Link copied to clipboard
Instantiates a builder for GenerateContentConfig.
Link copied to clipboard
Resource name of a context cache that can be used in subsequent requests.
Link copied to clipboard
Number of response variations to return.
Link copied to clipboard
Enables enhanced civic answers.
Link copied to clipboard
Positive values penalize tokens that repeatedly appear in the generated text, increasing the probability of generating more diverse content.
Link copied to clipboard
Deserializes a JSON string to a GenerateContentConfig object.
Link copied to clipboard
@InternalApi()
Deserializes a JsonNode to an object of the given type.
Link copied to clipboard
@InternalApi()
Deserializes a Json string to an object of the given type.
Link copied to clipboard
Used to override HTTP request options.
Link copied to clipboard
The image generation configuration.
Link copied to clipboard
Maximum number of tokens that can be generated in the response.
Link copied to clipboard
If specified, the media resolution specified will be used.
Link copied to clipboard
Settings for prompt and response sanitization using the Model Armor service.
Link copied to clipboard
Configuration for model selection.
Link copied to clipboard
Link copied to clipboard
Positive values penalize tokens that already appear in the generated text, increasing the probability of generating more diverse content.
Link copied to clipboard
Optional.
Link copied to clipboard
Whether to return the log probabilities of the tokens that were chosen by the model at each step.
Link copied to clipboard
Output response mimetype of the generated candidate text.
Link copied to clipboard
The requested modalities of the response.
Link copied to clipboard
The `Schema` object allows the definition of input and output data types.
Link copied to clipboard
Configuration for model router requests.
Link copied to clipboard
Safety settings in the request to block unsafe content in the response.
Link copied to clipboard
The service tier to use for the request.
Link copied to clipboard
Overrides the default maximum JSON string length (20MB) for the JSON parser.
Link copied to clipboard
If true, the raw HTTP response will be returned in the 'sdk_http_response' field.
Link copied to clipboard
The speech generation configuration.
Link copied to clipboard
List of strings that tells the model to stop generating text if one of the strings is encountered in the response.
Link copied to clipboard
Converts a Json string to a JsonNode.
Link copied to clipboard
Instructions for the model to steer it toward better performance.
Link copied to clipboard
Value that controls the degree of randomness in token selection.
Link copied to clipboard
The thinking features configuration.
Link copied to clipboard
Creates a builder with the same values as this instance.
Link copied to clipboard
Serializes an object to a JsonNode.
Link copied to clipboard
Serializes an object to a Json string.
Link copied to clipboard
Associates model output to a specific function call.