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.
47280 47281 47282 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47280 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
47272 47273 47274 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47272 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
47278 47279 47280 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47278 def regex_extract_expression @regex_extract_expression end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
47285 47286 47287 47288 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47285 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 |