Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1RagChunk

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

A RagChunk includes the content of a chunk of a RagFile, and associated metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1RagChunk

Returns a new instance of GoogleCloudAiplatformV1RagChunk.



32014
32015
32016
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32014

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

Instance Attribute Details

#page_spanGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1RagChunkPageSpan

Represents where the chunk starts and ends in the document. Corresponds to the JSON property pageSpan



32007
32008
32009
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32007

def page_span
  @page_span
end

#textString

The content of the chunk. Corresponds to the JSON property text

Returns:

  • (String)


32012
32013
32014
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32012

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



32019
32020
32021
32022
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32019

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