Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1GenerationConfig

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenaiVertexV1beta1GenerationConfig

Returns a new instance of GenaiVertexV1beta1GenerationConfig.



2645
2646
2647
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2645

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#frequency_penaltyFloat

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

Returns:

  • (Float)


2581
2582
2583
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2581

def frequency_penalty
  @frequency_penalty
end

#image_configGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ImageConfig

The configuration for image interaction. Corresponds to the JSON property imageConfig



2586
2587
2588
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2586

def image_config
  @image_config
end

#max_output_tokensFixnum

The maximum number of tokens to include in the response. Corresponds to the JSON property maxOutputTokens

Returns:

  • (Fixnum)


2591
2592
2593
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2591

def max_output_tokens
  @max_output_tokens
end

#presence_penaltyFloat

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

Returns:

  • (Float)


2598
2599
2600
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2598

def presence_penalty
  @presence_penalty
end

#seedFixnum

Seed used in decoding for reproducibility. Corresponds to the JSON property seed

Returns:

  • (Fixnum)


2603
2604
2605
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2603

def seed
  @seed
end

#speech_configArray<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1SpeechConfig>

Configuration for speech interaction. Corresponds to the JSON property speechConfig



2608
2609
2610
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2608

def speech_config
  @speech_config
end

#stop_sequencesArray<String>

A list of character sequences that will stop output interaction. Corresponds to the JSON property stopSequences

Returns:

  • (Array<String>)


2613
2614
2615
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2613

def stop_sequences
  @stop_sequences
end

#temperatureFloat

Controls the randomness of the output. Corresponds to the JSON property temperature

Returns:

  • (Float)


2618
2619
2620
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2618

def temperature
  @temperature
end

#thinking_levelString

The level of thought tokens that the model should generate. Corresponds to the JSON property thinkingLevel

Returns:

  • (String)


2623
2624
2625
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2623

def thinking_level
  @thinking_level
end

#thinking_summariesString

Whether to include thought summaries in the response. Corresponds to the JSON property thinkingSummaries

Returns:

  • (String)


2628
2629
2630
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2628

def thinking_summaries
  @thinking_summaries
end

#tool_choice_configGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ToolChoiceConfig

The tool choice configuration containing allowed tools. Corresponds to the JSON property toolChoiceConfig



2633
2634
2635
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2633

def tool_choice_config
  @tool_choice_config
end

#tool_choice_modeString

The mode of the tool choice. Corresponds to the JSON property toolChoiceMode

Returns:

  • (String)


2638
2639
2640
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2638

def tool_choice_mode
  @tool_choice_mode
end

#top_pFloat

The maximum cumulative probability of tokens to consider when sampling. Corresponds to the JSON property topP

Returns:

  • (Float)


2643
2644
2645
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2643

def top_p
  @top_p
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 2650

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