Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec

Returns a new instance of GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec.



14961
14962
14963
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14961

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

Instance Attribute Details

#attribute_typeString

Optional. The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). Corresponds to the JSON property attributeType

Returns:

  • (String)


14940
14941
14942
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14940

def attribute_type
  @attribute_type
end

#control_pointsArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint>

Optional. The control points used to define the curve. The monotonic function ( defined through the interpolation_type above) passes through the control points listed here. Corresponds to the JSON property controlPoints



14947
14948
14949
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14947

def control_points
  @control_points
end

#field_nameString

Optional. The name of the field whose value will be used to determine the boost amount. Corresponds to the JSON property fieldName

Returns:

  • (String)


14953
14954
14955
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14953

def field_name
  @field_name
end

#interpolation_typeString

Optional. The interpolation type to be applied to connect the control points listed below. Corresponds to the JSON property interpolationType

Returns:

  • (String)


14959
14960
14961
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14959

def interpolation_type
  @interpolation_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



14966
14967
14968
14969
14970
14971
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 14966

def update!(**args)
  @attribute_type = args[:attribute_type] if args.key?(:attribute_type)
  @control_points = args[:control_points] if args.key?(:control_points)
  @field_name = args[:field_name] if args.key?(:field_name)
  @interpolation_type = args[:interpolation_type] if args.key?(:interpolation_type)
end