Class: Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1GeneratorModelParameter

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v3beta1/classes.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb

Overview

Parameters to be passed to the LLM. If not set, default values will be used.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1GeneratorModelParameter

Returns a new instance of GoogleCloudDialogflowCxV3beta1GeneratorModelParameter.



8442
8443
8444
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8442

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

Instance Attribute Details

#max_decode_stepsFixnum

The maximum number of tokens to generate. Corresponds to the JSON property maxDecodeSteps

Returns:

  • (Fixnum)


8418
8419
8420
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8418

def max_decode_steps
  @max_decode_steps
end

#temperatureFloat

The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random. Corresponds to the JSON property temperature

Returns:

  • (Float)


8425
8426
8427
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8425

def temperature
  @temperature
end

#top_kFixnum

If set, the sampling process in each step is limited to the top_k tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random. Corresponds to the JSON property topK

Returns:

  • (Fixnum)


8432
8433
8434
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8432

def top_k
  @top_k
end

#top_pFloat

If set, only the tokens comprising the top top_p probability mass are considered. If both top_p and top_k are set, top_p will be used for further refining candidates selected with top_k. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random. Corresponds to the JSON property topP

Returns:

  • (Float)


8440
8441
8442
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8440

def top_p
  @top_p
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8447
8448
8449
8450
8451
8452
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8447

def update!(**args)
  @max_decode_steps = args[:max_decode_steps] if args.key?(:max_decode_steps)
  @temperature = args[:temperature] if args.key?(:temperature)
  @top_k = args[:top_k] if args.key?(:top_k)
  @top_p = args[:top_p] if args.key?(:top_p)
end