Generate Content Config
Optional model configuration parameters.
For more information, see Content generation parameters <https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>_.
Constructors
Properties
If enabled, audio timestamp will be included in the request to the model.
Resource name of a context cache that can be used in subsequent requests.
Number of response variations to return.
Enables enhanced civic answers. It may not be available for all models. This field is not supported in Gemini Enterprise Agent Platform.
Positive values penalize tokens that repeatedly appear in the generated text, increasing the probability of generating more diverse content.
Used to override HTTP request options.
The image generation configuration.
Maximum number of tokens that can be generated in the response.
If specified, the media resolution specified will be used.
Settings for prompt and response sanitization using the Model Armor service. If supplied, safety_settings must not be supplied.
Configuration for model selection.
Positive values penalize tokens that already appear in the generated text, increasing the probability of generating more diverse content.
Optional. Output schema of the generated response. This is an alternative to response_schema that accepts JSON Schema. If set, response_schema must be omitted, but response_mime_type is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - $id - $defs - $ref - $anchor
Whether to return the log probabilities of the tokens that were chosen by the model at each step.
Output response mimetype of the generated candidate text. Supported mimetype:
The requested modalities of the response. Represents the set of modalities that the model can return.
The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object. If set, a compatible response_mime_type must also be set. Compatible mimetypes: application/json: Schema for JSON response.
Configuration for model router requests.
Safety settings in the request to block unsafe content in the response.
The service tier to use for the request. For example, ServiceTier.FLEX.
If true, the raw HTTP response will be returned in the 'sdk_http_response' field.
The speech generation configuration.
List of strings that tells the model to stop generating text if one of the strings is encountered in the response.
Instructions for the model to steer it toward better performance. For example, "Answer as concisely as possible" or "Don't use technical terms in your response".
Value that controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.
The thinking features configuration.
Associates model output to a specific function call.
For each token selection step, the `top_k` tokens with the highest probabilities are sampled. Then tokens are further filtered based on `top_p` with the final token selected using temperature sampling. Use a lower number for less random responses and a higher number for more random responses.