Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RagContextsContext

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 context of the query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1RagContextsContext

Returns a new instance of GoogleCloudAiplatformV1beta1RagContextsContext.



22644
22645
22646
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22644

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

Instance Attribute Details

#distanceFloat

The distance between the query vector and the context text vector. Corresponds to the JSON property distance

Returns:

  • (Float)


22630
22631
22632
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22630

def distance
  @distance
end

#source_uriString

For vertex RagStore, if the file is imported from Cloud Storage or Google Drive, source_uri will be original file URI in Cloud Storage or Google Drive; if file is uploaded, source_uri will be file display name. Corresponds to the JSON property sourceUri

Returns:

  • (String)


22637
22638
22639
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22637

def source_uri
  @source_uri
end

#textString

The text chunk. Corresponds to the JSON property text

Returns:

  • (String)


22642
22643
22644
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22642

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



22649
22650
22651
22652
22653
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 22649

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