Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1GenerationConfig
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1GenerationConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
Configuration parameters for model interactions.
Instance Attribute Summary collapse
-
#frequency_penalty ⇒ Float
Penalizes tokens based on their frequency in the generated text.
-
#image_config ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ImageConfig
The configuration for image interaction.
-
#max_output_tokens ⇒ Fixnum
The maximum number of tokens to include in the response.
-
#presence_penalty ⇒ Float
Penalizes tokens that have already appeared in the generated text.
-
#seed ⇒ Fixnum
Seed used in decoding for reproducibility.
-
#speech_config ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1SpeechConfig>
Configuration for speech interaction.
-
#stop_sequences ⇒ Array<String>
A list of character sequences that will stop output interaction.
-
#temperature ⇒ Float
Controls the randomness of the output.
-
#thinking_level ⇒ String
The level of thought tokens that the model should generate.
-
#thinking_summaries ⇒ String
Whether to include thought summaries in the response.
-
#tool_choice_config ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ToolChoiceConfig
The tool choice configuration containing allowed tools.
-
#tool_choice_mode ⇒ String
The mode of the tool choice.
-
#top_p ⇒ Float
The maximum cumulative probability of tokens to consider when sampling.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GenaiVertexV1beta1GenerationConfig
constructor
A new instance of GenaiVertexV1beta1GenerationConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GenaiVertexV1beta1GenerationConfig
Returns a new instance of GenaiVertexV1beta1GenerationConfig.
2470 2471 2472 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2470 def initialize(**args) update!(**args) end |
Instance Attribute Details
#frequency_penalty ⇒ Float
Penalizes tokens based on their frequency in the generated text. A positive
value helps to reduce the repetition of words and phrases. Valid values can
range from [-2.0, 2.0].
Corresponds to the JSON property frequency_penalty
2406 2407 2408 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2406 def frequency_penalty @frequency_penalty end |
#image_config ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ImageConfig
The configuration for image interaction.
Corresponds to the JSON property imageConfig
2411 2412 2413 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2411 def image_config @image_config end |
#max_output_tokens ⇒ Fixnum
The maximum number of tokens to include in the response.
Corresponds to the JSON property maxOutputTokens
2416 2417 2418 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2416 def max_output_tokens @max_output_tokens end |
#presence_penalty ⇒ Float
Penalizes tokens that have already appeared in the generated text. A positive
value encourages the model to generate more diverse and less repetitive text.
Valid values can range from [-2.0, 2.0].
Corresponds to the JSON property presence_penalty
2423 2424 2425 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2423 def presence_penalty @presence_penalty end |
#seed ⇒ Fixnum
Seed used in decoding for reproducibility.
Corresponds to the JSON property seed
2428 2429 2430 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2428 def seed @seed end |
#speech_config ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1SpeechConfig>
Configuration for speech interaction.
Corresponds to the JSON property speechConfig
2433 2434 2435 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2433 def speech_config @speech_config end |
#stop_sequences ⇒ Array<String>
A list of character sequences that will stop output interaction.
Corresponds to the JSON property stopSequences
2438 2439 2440 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2438 def stop_sequences @stop_sequences end |
#temperature ⇒ Float
Controls the randomness of the output.
Corresponds to the JSON property temperature
2443 2444 2445 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2443 def temperature @temperature end |
#thinking_level ⇒ String
The level of thought tokens that the model should generate.
Corresponds to the JSON property thinkingLevel
2448 2449 2450 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2448 def thinking_level @thinking_level end |
#thinking_summaries ⇒ String
Whether to include thought summaries in the response.
Corresponds to the JSON property thinkingSummaries
2453 2454 2455 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2453 def thinking_summaries @thinking_summaries end |
#tool_choice_config ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ToolChoiceConfig
The tool choice configuration containing allowed tools.
Corresponds to the JSON property toolChoiceConfig
2458 2459 2460 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2458 def tool_choice_config @tool_choice_config end |
#tool_choice_mode ⇒ String
The mode of the tool choice.
Corresponds to the JSON property toolChoiceMode
2463 2464 2465 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2463 def tool_choice_mode @tool_choice_mode end |
#top_p ⇒ Float
The maximum cumulative probability of tokens to consider when sampling.
Corresponds to the JSON property topP
2468 2469 2470 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2468 def top_p @top_p end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2475 def update!(**args) @frequency_penalty = args[:frequency_penalty] if args.key?(:frequency_penalty) @image_config = args[:image_config] if args.key?(:image_config) @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens) @presence_penalty = args[:presence_penalty] if args.key?(:presence_penalty) @seed = args[:seed] if args.key?(:seed) @speech_config = args[:speech_config] if args.key?(:speech_config) @stop_sequences = args[:stop_sequences] if args.key?(:stop_sequences) @temperature = args[:temperature] if args.key?(:temperature) @thinking_level = args[:thinking_level] if args.key?(:thinking_level) @thinking_summaries = args[:thinking_summaries] if args.key?(:thinking_summaries) @tool_choice_config = args[:tool_choice_config] if args.key?(:tool_choice_config) @tool_choice_mode = args[:tool_choice_mode] if args.key?(:tool_choice_mode) @top_p = args[:top_p] if args.key?(:top_p) end |