Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RagChunk

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 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) ⇒ GoogleCloudAiplatformV1beta1RagChunk

Returns a new instance of GoogleCloudAiplatformV1beta1RagChunk.



36619
36620
36621
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36619

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

Instance Attribute Details

#chunk_idString

The ID of the chunk. Corresponds to the JSON property chunkId

Returns:

  • (String)


36602
36603
36604
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36602

def chunk_id
  @chunk_id
end

#file_idString

The ID of the file that the chunk belongs to. Corresponds to the JSON property fileId

Returns:

  • (String)


36607
36608
36609
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36607

def file_id
  @file_id
end

#page_spanGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RagChunkPageSpan

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



36612
36613
36614
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36612

def page_span
  @page_span
end

#textString

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

Returns:

  • (String)


36617
36618
36619
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36617

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



36624
36625
36626
36627
36628
36629
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 36624

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