Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorModelParameter

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v3/classes.rb,
lib/google/apis/dialogflow_v3/representations.rb,
lib/google/apis/dialogflow_v3/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) ⇒ GoogleCloudDialogflowCxV3GeneratorModelParameter

Returns a new instance of GoogleCloudDialogflowCxV3GeneratorModelParameter.



4320
4321
4322
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4320

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)


4296
4297
4298
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4296

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)


4303
4304
4305
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4303

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)


4310
4311
4312
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4310

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)


4318
4319
4320
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4318

def top_p
  @top_p
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4325
4326
4327
4328
4329
4330
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4325

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