Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig
- 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
Defines how to parse sample response config for reinforcement tuning. The
parsed response (i.e., substring) will be passed to the reward functions. For
example, the input prompt might be: > "Perform step-by-step thoughts first to
problem A, finally output answer in the ` "parseType": "REGEX_EXTRACT"
, "regexExtractExpression": ".*(.*?)" ` The resulting parsed response
would be "Yes" and will be passed to the reward functions for evaluating
rewards.
Instance Attribute Summary collapse
-
#parse_type ⇒ String
Defines the type for parsing sample response.
-
#regex_extract_expression ⇒ String
Defines the regex for extracting the important part of sample response.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig
constructor
A new instance of GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig
Returns a new instance of GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig.
49615 49616 49617 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49615 def initialize(**args) update!(**args) end |
Instance Attribute Details
#parse_type ⇒ String
Defines the type for parsing sample response.
Corresponds to the JSON property parseType
49607 49608 49609 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49607 def parse_type @parse_type end |
#regex_extract_expression ⇒ String
Defines the regex for extracting the important part of sample response. This
field is only used when parse_type is ResponseParseType.REGEX_EXTRACT.
Corresponds to the JSON property regexExtractExpression
49613 49614 49615 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49613 def regex_extract_expression @regex_extract_expression end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
49620 49621 49622 49623 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49620 def update!(**args) @parse_type = args[:parse_type] if args.key?(:parse_type) @regex_extract_expression = args[:regex_extract_expression] if args.key?(:regex_extract_expression) end |