Class: Google::Cloud::AIPlatform::V1::GenerationConfig

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/aiplatform/v1/content.rb

Overview

Generation config.

Defined Under Namespace

Classes: RoutingConfig, ThinkingConfig

Instance Attribute Summary collapse

Instance Attribute Details

#candidate_count::Integer

Returns Optional. Number of candidates to generate.

Returns:

  • (::Integer)

    Optional. Number of candidates to generate.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#frequency_penalty::Float

Returns Optional. Frequency penalties.

Returns:

  • (::Float)

    Optional. Frequency penalties.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#logprobs::Integer

Returns Optional. Logit probabilities.

Returns:

  • (::Integer)

    Optional. Logit probabilities.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#max_output_tokens::Integer

Returns Optional. The maximum number of output tokens to generate per message.

Returns:

  • (::Integer)

    Optional. The maximum number of output tokens to generate per message.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#presence_penalty::Float

Returns Optional. Positive penalties.

Returns:

  • (::Float)

    Optional. Positive penalties.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#response_json_schema::Google::Protobuf::Value

Returns 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
  • type
  • format
  • title
  • description
  • enum (for strings and numbers)
  • items
  • prefixItems
  • minItems
  • maxItems
  • minimum
  • maximum
  • anyOf
  • oneOf (interpreted the same as anyOf)
  • 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.

Returns:

  • (::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, 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
    • type
    • format
    • title
    • description
    • enum (for strings and numbers)
    • items
    • prefixItems
    • minItems
    • maxItems
    • minimum
    • maximum
    • anyOf
    • oneOf (interpreted the same as anyOf)
    • 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.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#response_logprobs::Boolean

Returns Optional. If true, export the logprobs results in response.

Returns:

  • (::Boolean)

    Optional. If true, export the logprobs results in response.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#response_mime_type::String

Returns 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.


248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#response_schema::Google::Cloud::AIPlatform::V1::Schema

Returns 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.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#routing_config::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig

Returns Optional. Routing configuration.

Returns:



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#seed::Integer

Returns Optional. Seed.

Returns:

  • (::Integer)

    Optional. Seed.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#stop_sequences::Array<::String>

Returns Optional. Stop sequences.

Returns:

  • (::Array<::String>)

    Optional. Stop sequences.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#temperature::Float

Returns Optional. Controls the randomness of predictions.

Returns:

  • (::Float)

    Optional. Controls the randomness of predictions.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#thinking_config::Google::Cloud::AIPlatform::V1::GenerationConfig::ThinkingConfig

Returns Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.

Returns:



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#top_k::Float

Returns Optional. If specified, top-k sampling will be used.

Returns:

  • (::Float)

    Optional. If specified, top-k sampling will be used.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#top_p::Float

Returns Optional. If specified, nucleus sampling will be used.

Returns:

  • (::Float)

    Optional. If specified, nucleus sampling will be used.



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'proto_docs/google/cloud/aiplatform/v1/content.rb', line 248

class GenerationConfig
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The configuration for routing the request to a specific model.
  # @!attribute [rw] auto_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode]
  #     Automated routing.
  #
  #     Note: The following fields are mutually exclusive: `auto_mode`, `manual_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] manual_mode
  #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::ManualRoutingMode]
  #     Manual routing.
  #
  #     Note: The following fields are mutually exclusive: `manual_mode`, `auto_mode`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class RoutingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # When automated routing is specified, the routing will be determined by
    # the pretrained routing model and customer provided model routing
    # preference.
    # @!attribute [rw] model_routing_preference
    #   @return [::Google::Cloud::AIPlatform::V1::GenerationConfig::RoutingConfig::AutoRoutingMode::ModelRoutingPreference]
    #     The model routing preference.
    class AutoRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # The model routing preference.
      module ModelRoutingPreference
        # Unspecified model routing preference.
        UNKNOWN = 0

        # Prefer higher quality over low cost.
        PRIORITIZE_QUALITY = 1

        # Balanced model routing preference.
        BALANCED = 2

        # Prefer lower cost over higher quality.
        PRIORITIZE_COST = 3
      end
    end

    # When manual routing is set, the specified model will be used directly.
    # @!attribute [rw] model_name
    #   @return [::String]
    #     The model name to use. Only the public LLM models are accepted. e.g.
    #     'gemini-1.5-pro-001'.
    class ManualRoutingMode
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Config for thinking features.
  # @!attribute [rw] include_thoughts
  #   @return [::Boolean]
  #     Indicates whether to include thoughts in the response.
  #     If true, thoughts are returned only when available.
  # @!attribute [rw] thinking_budget
  #   @return [::Integer]
  #     Optional. Indicates the thinking budget in tokens.
  #     This is only applied when enable_thinking is true.
  class ThinkingConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end