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.



23530
23531
23532
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 23530

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



23523
23524
23525
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 23523

def page_span
  @page_span
end

#textString

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

Returns:

  • (String)


23528
23529
23530
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 23528

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



23535
23536
23537
23538
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 23535

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