Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RagQuery

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

A query to retrieve relevant contexts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1RagQuery

Returns a new instance of GoogleCloudAiplatformV1beta1RagQuery.



22446
22447
22448
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22446

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

Instance Attribute Details

#similarity_top_kFixnum

Optional. The number of contexts to retrieve. Corresponds to the JSON property similarityTopK

Returns:

  • (Fixnum)


22434
22435
22436
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22434

def similarity_top_k
  @similarity_top_k
end

#textString

Optional. The query in text format to get relevant contexts. Corresponds to the JSON property text

Returns:

  • (String)


22439
22440
22441
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22439

def text
  @text
end

#vector_distance_thresholdFloat

Optional. Only return contexts with vector distance smaller than the threshold. Corresponds to the JSON property vectorDistanceThreshold

Returns:

  • (Float)


22444
22445
22446
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22444

def vector_distance_threshold
  @vector_distance_threshold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



22451
22452
22453
22454
22455
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22451

def update!(**args)
  @similarity_top_k = args[:similarity_top_k] if args.key?(:similarity_top_k)
  @text = args[:text] if args.key?(:text)
  @vector_distance_threshold = args[:vector_distance_threshold] if args.key?(:vector_distance_threshold)
end