Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig

Inherits:
Object
  • Object
show all
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. For example, the input prompt might be: "Perform step by step thoughts first to problem A, finally output answer in block." And the sample response might look like: "blahblah". Here, user can define the following parse config: parse_type: REGEX_EXTRACT regex_extract_expression: ".*(.*?)" And we would have returned "blahblah" to reward scoring function.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig

Returns a new instance of GoogleCloudAiplatformV1beta1ReinforcementTuningParseResponseConfig.



45760
45761
45762
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 45760

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#parse_typeString

Defines how to parse sample response. Corresponds to the JSON property parseType

Returns:

  • (String)


45752
45753
45754
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 45752

def parse_type
  @parse_type
end

#regex_extract_expressionString

Defines the regex to extract the important part of sample response. This field is only used when parse_type is REGEX_EXTRACT. Corresponds to the JSON property regexExtractExpression

Returns:

  • (String)


45758
45759
45760
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 45758

def regex_extract_expression
  @regex_extract_expression
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



45765
45766
45767
45768
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 45765

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