Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorModelParameter
- Inherits:
-
Object
- Object
- Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorModelParameter
- 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
-
#max_decode_steps ⇒ Fixnum
The maximum number of tokens to generate.
-
#temperature ⇒ Float
The temperature used for sampling.
-
#top_k ⇒ Fixnum
If set, the sampling process in each step is limited to the top_k tokens with highest probabilities.
-
#top_p ⇒ Float
If set, only the tokens comprising the top top_p probability mass are considered.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3GeneratorModelParameter
constructor
A new instance of GoogleCloudDialogflowCxV3GeneratorModelParameter.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3GeneratorModelParameter
Returns a new instance of GoogleCloudDialogflowCxV3GeneratorModelParameter.
3945 3946 3947 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3945 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_decode_steps ⇒ Fixnum
The maximum number of tokens to generate.
Corresponds to the JSON property maxDecodeSteps
3921 3922 3923 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3921 def max_decode_steps @max_decode_steps end |
#temperature ⇒ Float
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
3928 3929 3930 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3928 def temperature @temperature end |
#top_k ⇒ Fixnum
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
3935 3936 3937 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3935 def top_k @top_k end |
#top_p ⇒ Float
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
3943 3944 3945 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3943 def top_p @top_p end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3950 3951 3952 3953 3954 3955 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3950 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 |