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
#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.
#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.
#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_schema
that accepts JSON Schema.If set,
response_schema
must be omitted, butresponse_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
type
format
title
description
enum
(for strings and numbers)items
prefixItems
minItems
maxItems
minimum
maximum
anyOf
oneOf
(interpreted the same asanyOf
)properties
additionalProperties
required
The non-standard
propertyOrdering
property 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
$ref
is 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_schema
that accepts JSON Schema.If set,
response_schema
must be omitted, butresponse_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
type
format
title
description
enum
(for strings and numbers)items
prefixItems
minItems
maxItems
minimum
maximum
anyOf
oneOf
(interpreted the same asanyOf
)properties
additionalProperties
required
The non-standard
propertyOrdering
property 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
$ref
is 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_schema
that accepts JSON Schema.If set,
response_schema
must be omitted, butresponse_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
type
format
title
description
enum
(for strings and numbers)items
prefixItems
minItems
maxItems
minimum
maximum
anyOf
oneOf
(interpreted the same asanyOf
)properties
additionalProperties
required
The non-standard
propertyOrdering
property 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
$ref
is 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_schema
def response_schema() -> ::Google::Cloud::AIPlatform::V1::Schema
-
(::Google::Cloud::AIPlatform::V1::Schema) — Optional. 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.
#response_schema=
def response_schema=(value) -> ::Google::Cloud::AIPlatform::V1::Schema
-
value (::Google::Cloud::AIPlatform::V1::Schema) — Optional. 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.
-
(::Google::Cloud::AIPlatform::V1::Schema) — Optional. 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.
#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.
#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.