Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::GenerationConfig.
Generation config.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#audio_timestamp
def audio_timestamp() -> ::Boolean- (::Boolean) — Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
#audio_timestamp=
def audio_timestamp=(value) -> ::Boolean- value (::Boolean) — Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
- (::Boolean) — Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response.
#candidate_count
def candidate_count() -> ::Integer- (::Integer) — Optional. Number of candidates to generate.
#candidate_count=
def candidate_count=(value) -> ::Integer- value (::Integer) — Optional. Number of candidates to generate.
- (::Integer) — Optional. Number of candidates to generate.
#frequency_penalty
def frequency_penalty() -> ::Float- (::Float) — Optional. Frequency penalties.
#frequency_penalty=
def frequency_penalty=(value) -> ::Float- value (::Float) — Optional. Frequency penalties.
- (::Float) — Optional. Frequency penalties.
#image_config
def image_config() -> ::Google::Cloud::AIPlatform::V1::ImageConfig- (::Google::Cloud::AIPlatform::V1::ImageConfig) — Optional. Config for image generation features.
#image_config=
def image_config=(value) -> ::Google::Cloud::AIPlatform::V1::ImageConfig- value (::Google::Cloud::AIPlatform::V1::ImageConfig) — Optional. Config for image generation features.
- (::Google::Cloud::AIPlatform::V1::ImageConfig) — Optional. Config for image generation features.
#logprobs
def logprobs() -> ::Integer- (::Integer) — Optional. Logit probabilities.
#logprobs=
def logprobs=(value) -> ::Integer- value (::Integer) — Optional. Logit probabilities.
- (::Integer) — Optional. Logit probabilities.
#max_output_tokens
def max_output_tokens() -> ::Integer- (::Integer) — Optional. The maximum number of output tokens to generate per message.
#max_output_tokens=
def max_output_tokens=(value) -> ::Integer- value (::Integer) — Optional. The maximum number of output tokens to generate per message.
- (::Integer) — Optional. The maximum number of output tokens to generate per message.
#media_resolution
def media_resolution() -> ::Google::Cloud::AIPlatform::V1::GenerationConfig::MediaResolution- (::Google::Cloud::AIPlatform::V1::GenerationConfig::MediaResolution) — Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
#media_resolution=
def media_resolution=(value) -> ::Google::Cloud::AIPlatform::V1::GenerationConfig::MediaResolution- value (::Google::Cloud::AIPlatform::V1::GenerationConfig::MediaResolution) — Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
- (::Google::Cloud::AIPlatform::V1::GenerationConfig::MediaResolution) — Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model.
#presence_penalty
def presence_penalty() -> ::Float- (::Float) — Optional. Positive penalties.
#presence_penalty=
def presence_penalty=(value) -> ::Float- value (::Float) — Optional. Positive penalties.
- (::Float) — Optional. Positive penalties.
#response_json_schema
def response_json_schema() -> ::Google::Protobuf::Value-
(::Google::Protobuf::Value) — Optional. Output schema of the generated response. This is an alternative
to
response_schemathat accepts JSON Schema.If set,
response_schemamust be omitted, butresponse_mime_typeis required.While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
$id$defs$ref$anchortypeformattitledescriptionenum(for strings and numbers)itemsprefixItemsminItemsmaxItemsminimummaximumanyOfoneOf(interpreted the same asanyOf)propertiesadditionalPropertiesrequired
The non-standard
propertyOrderingproperty may also be set.Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If
$refis set on a sub-schema, no other properties, except for than those starting as a$, may be set.
#response_json_schema=
def response_json_schema=(value) -> ::Google::Protobuf::Value-
value (::Google::Protobuf::Value) — Optional. Output schema of the generated response. This is an alternative
to
response_schemathat accepts JSON Schema.If set,
response_schemamust be omitted, butresponse_mime_typeis required.While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
$id$defs$ref$anchortypeformattitledescriptionenum(for strings and numbers)itemsprefixItemsminItemsmaxItemsminimummaximumanyOfoneOf(interpreted the same asanyOf)propertiesadditionalPropertiesrequired
The non-standard
propertyOrderingproperty may also be set.Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If
$refis set on a sub-schema, no other properties, except for than those starting as a$, may be set.
-
(::Google::Protobuf::Value) — Optional. Output schema of the generated response. This is an alternative
to
response_schemathat accepts JSON Schema.If set,
response_schemamust be omitted, butresponse_mime_typeis required.While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
$id$defs$ref$anchortypeformattitledescriptionenum(for strings and numbers)itemsprefixItemsminItemsmaxItemsminimummaximumanyOfoneOf(interpreted the same asanyOf)propertiesadditionalPropertiesrequired
The non-standard
propertyOrderingproperty may also be set.Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If
$refis set on a sub-schema, no other properties, except for than those starting as a$, may be set.
#response_logprobs
def response_logprobs() -> ::Boolean- (::Boolean) — Optional. If true, export the logprobs results in response.
#response_logprobs=
def response_logprobs=(value) -> ::Boolean- value (::Boolean) — Optional. If true, export the logprobs results in response.
- (::Boolean) — Optional. If true, export the logprobs results in response.
#response_mime_type
def response_mime_type() -> ::String-
(::String) —
Optional. Output response mimetype of the generated candidate text. Supported mimetype:
text/plain: (default) Text output.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.
#response_mime_type=
def response_mime_type=(value) -> ::String-
value (::String) —
Optional. Output response mimetype of the generated candidate text. Supported mimetype:
text/plain: (default) Text output.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.
-
(::String) —
Optional. Output response mimetype of the generated candidate text. Supported mimetype:
text/plain: (default) Text output.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.
#response_modalities
def response_modalities() -> ::Array<::Google::Cloud::AIPlatform::V1::GenerationConfig::Modality>-
(::Array<::Google::Cloud::AIPlatform::V1::GenerationConfig::Modality>) — Optional. The modalities of the response. The model will generate a
response that includes all the specified modalities. For example, if this
is set to
[TEXT, IMAGE], the response will include both text and an image.
#response_modalities=
def response_modalities=(value) -> ::Array<::Google::Cloud::AIPlatform::V1::GenerationConfig::Modality>-
value (::Array<::Google::Cloud::AIPlatform::V1::GenerationConfig::Modality>) — Optional. The modalities of the response. The model will generate a
response that includes all the specified modalities. For example, if this
is set to
[TEXT, IMAGE], the response will include both text and an image.
-
(::Array<::Google::Cloud::AIPlatform::V1::GenerationConfig::Modality>) — Optional. The modalities of the response. The model will generate a
response that includes all the specified modalities. For example, if this
is set to
[TEXT, IMAGE], the response will include both text and an image.
#response_schema
def response_schema() -> ::Google::Cloud::AIPlatform::V1::Schema-
(::Google::Cloud::AIPlatform::V1::Schema) — Optional. The
Schemaobject 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.
#response_schema=
def response_schema=(value) -> ::Google::Cloud::AIPlatform::V1::Schema-
value (::Google::Cloud::AIPlatform::V1::Schema) — Optional. The
Schemaobject 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.
-
(::Google::Cloud::AIPlatform::V1::Schema) — Optional. The
Schemaobject 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.
#routing_config
def routing_config() -> ::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig- (::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig) — Optional. Routing configuration.
#routing_config=
def routing_config=(value) -> ::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig- value (::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig) — Optional. Routing configuration.
- (::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig) — Optional. Routing configuration.
#seed
def seed() -> ::Integer- (::Integer) — Optional. Seed.
#seed=
def seed=(value) -> ::Integer- value (::Integer) — Optional. Seed.
- (::Integer) — Optional. Seed.
#speech_config
def speech_config() -> ::Google::Cloud::AIPlatform::V1::SpeechConfig- (::Google::Cloud::AIPlatform::V1::SpeechConfig) — Optional. The speech generation config.
#speech_config=
def speech_config=(value) -> ::Google::Cloud::AIPlatform::V1::SpeechConfig- value (::Google::Cloud::AIPlatform::V1::SpeechConfig) — Optional. The speech generation config.
- (::Google::Cloud::AIPlatform::V1::SpeechConfig) — Optional. The speech generation config.
#stop_sequences
def stop_sequences() -> ::Array<::String>- (::Array<::String>) — Optional. Stop sequences.
#stop_sequences=
def stop_sequences=(value) -> ::Array<::String>- value (::Array<::String>) — Optional. Stop sequences.
- (::Array<::String>) — Optional. Stop sequences.
#temperature
def temperature() -> ::Float- (::Float) — Optional. Controls the randomness of predictions.
#temperature=
def temperature=(value) -> ::Float- value (::Float) — Optional. Controls the randomness of predictions.
- (::Float) — Optional. Controls the randomness of predictions.
#thinking_config
def thinking_config() -> ::Google::Cloud::AIPlatform::V1::GenerationConfig::ThinkingConfig- (::Google::Cloud::AIPlatform::V1::GenerationConfig::ThinkingConfig) — Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
#thinking_config=
def thinking_config=(value) -> ::Google::Cloud::AIPlatform::V1::GenerationConfig::ThinkingConfig- value (::Google::Cloud::AIPlatform::V1::GenerationConfig::ThinkingConfig) — Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
- (::Google::Cloud::AIPlatform::V1::GenerationConfig::ThinkingConfig) — Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
#top_k
def top_k() -> ::Float- (::Float) — Optional. If specified, top-k sampling will be used.
#top_k=
def top_k=(value) -> ::Float- value (::Float) — Optional. If specified, top-k sampling will be used.
- (::Float) — Optional. If specified, top-k sampling will be used.
#top_p
def top_p() -> ::Float- (::Float) — Optional. If specified, nucleus sampling will be used.
#top_p=
def top_p=(value) -> ::Float- value (::Float) — Optional. If specified, nucleus sampling will be used.
- (::Float) — Optional. If specified, nucleus sampling will be used.