Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::GenerationConfig (v0.55.0)

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
Returns
  • (::Integer) — Optional. Number of candidates to generate.

#candidate_count=

def candidate_count=(value) -> ::Integer
Parameter
  • value (::Integer) — Optional. Number of candidates to generate.
Returns
  • (::Integer) — Optional. Number of candidates to generate.

#frequency_penalty

def frequency_penalty() -> ::Float
Returns
  • (::Float) — Optional. Frequency penalties.

#frequency_penalty=

def frequency_penalty=(value) -> ::Float
Parameter
  • value (::Float) — Optional. Frequency penalties.
Returns
  • (::Float) — Optional. Frequency penalties.

#logprobs

def logprobs() -> ::Integer
Returns
  • (::Integer) — Optional. Logit probabilities.

#logprobs=

def logprobs=(value) -> ::Integer
Parameter
  • value (::Integer) — Optional. Logit probabilities.
Returns
  • (::Integer) — Optional. Logit probabilities.

#max_output_tokens

def max_output_tokens() -> ::Integer
Returns
  • (::Integer) — Optional. The maximum number of output tokens to generate per message.

#max_output_tokens=

def max_output_tokens=(value) -> ::Integer
Parameter
  • value (::Integer) — Optional. The maximum number of output tokens to generate per message.
Returns
  • (::Integer) — Optional. The maximum number of output tokens to generate per message.

#presence_penalty

def presence_penalty() -> ::Float
Returns
  • (::Float) — Optional. Positive penalties.

#presence_penalty=

def presence_penalty=(value) -> ::Float
Parameter
  • value (::Float) — Optional. Positive penalties.
Returns
  • (::Float) — Optional. Positive penalties.

#response_logprobs

def response_logprobs() -> ::Boolean
Returns
  • (::Boolean) — Optional. If true, export the logprobs results in response.

#response_logprobs=

def response_logprobs=(value) -> ::Boolean
Parameter
  • value (::Boolean) — Optional. If true, export the logprobs results in response.
Returns
  • (::Boolean) — Optional. If true, export the logprobs results in response.

#response_mime_type

def response_mime_type() -> ::String
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns

#routing_config=

def routing_config=(value) -> ::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig
Parameter
Returns

#seed

def seed() -> ::Integer
Returns
  • (::Integer) — Optional. Seed.

#seed=

def seed=(value) -> ::Integer
Parameter
  • value (::Integer) — Optional. Seed.
Returns
  • (::Integer) — Optional. Seed.

#stop_sequences

def stop_sequences() -> ::Array<::String>
Returns
  • (::Array<::String>) — Optional. Stop sequences.

#stop_sequences=

def stop_sequences=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Optional. Stop sequences.
Returns
  • (::Array<::String>) — Optional. Stop sequences.

#temperature

def temperature() -> ::Float
Returns
  • (::Float) — Optional. Controls the randomness of predictions.

#temperature=

def temperature=(value) -> ::Float
Parameter
  • value (::Float) — Optional. Controls the randomness of predictions.
Returns
  • (::Float) — Optional. Controls the randomness of predictions.

#top_k

def top_k() -> ::Float
Returns
  • (::Float) — Optional. If specified, top-k sampling will be used.

#top_k=

def top_k=(value) -> ::Float
Parameter
  • value (::Float) — Optional. If specified, top-k sampling will be used.
Returns
  • (::Float) — Optional. If specified, top-k sampling will be used.

#top_p

def top_p() -> ::Float
Returns
  • (::Float) — Optional. If specified, nucleus sampling will be used.

#top_p=

def top_p=(value) -> ::Float
Parameter
  • value (::Float) — Optional. If specified, nucleus sampling will be used.
Returns
  • (::Float) — Optional. If specified, nucleus sampling will be used.