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.



30533
30534
30535
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30533

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



30526
30527
30528
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30526

def page_span
  @page_span
end

#textString

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

Returns:

  • (String)


30531
30532
30533
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30531

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



30538
30539
30540
30541
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30538

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