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.
47887 47888 47889 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47887 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
47879 47880 47881 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47879 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
47885 47886 47887 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47885 def regex_extract_expression @regex_extract_expression end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
47892 47893 47894 47895 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47892 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 |