Class: Google::Apis::AiplatformV1::LearningGenaiRootScoredSimilarityTakedownPhrase

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

Overview

Proto containing the results from the Universal Sentence Encoder / Other models

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LearningGenaiRootScoredSimilarityTakedownPhrase

Returns a new instance of LearningGenaiRootScoredSimilarityTakedownPhrase.



32608
32609
32610
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32608

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

Instance Attribute Details

#phraseGoogle::Apis::AiplatformV1::LearningGenaiRootSimilarityTakedownPhrase

Each SimilarityTakedownPhrase treats a logical group of blocked and allowed phrases together along with a corresponding punt If the closest matching response is of the allowed type, we allow the response If the closest matching response is of the blocked type, we block the response. eg: Blocked phrase - " All lives matter" Corresponds to the JSON property phrase



32601
32602
32603
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32601

def phrase
  @phrase
end

#similarity_scoreFloat

Corresponds to the JSON property similarityScore

Returns:

  • (Float)


32606
32607
32608
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32606

def similarity_score
  @similarity_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



32613
32614
32615
32616
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32613

def update!(**args)
  @phrase = args[:phrase] if args.key?(:phrase)
  @similarity_score = args[:similarity_score] if args.key?(:similarity_score)
end