Class: Langchain::Chunk

Inherits:
Object
  • Object
show all
Defined in:
lib/langchain/chunk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text:) ⇒ Langchain::Chunk

Initialize a new chunk

Parameters:

  • text (String)


12
13
14
# File 'lib/langchain/chunk.rb', line 12

def initialize(text:)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

The chunking process is the process of splitting a document into smaller chunks and creating instances of Langchain::Chunk



7
8
9
# File 'lib/langchain/chunk.rb', line 7

def text
  @text
end