Class: Deepsearch::Engine::Steps::Rag::Values::Chunk
- Inherits:
-
Object
- Object
- Deepsearch::Engine::Steps::Rag::Values::Chunk
- Defined in:
- lib/deepsearch/engine/steps/rag/values/chunk.rb
Overview
Represents a chunk of text from a document, along with its embedding and source URL. This is the fundamental unit of data used in the RAG process.
Instance Attribute Summary collapse
-
#document_url ⇒ Object
Returns the value of attribute document_url.
-
#embedding ⇒ Object
Returns the value of attribute embedding.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text:, embedding: nil, document_url: nil) ⇒ Chunk
constructor
A new instance of Chunk.
Constructor Details
#initialize(text:, embedding: nil, document_url: nil) ⇒ Chunk
Returns a new instance of Chunk.
13 14 15 16 17 |
# File 'lib/deepsearch/engine/steps/rag/values/chunk.rb', line 13 def initialize(text:, embedding: nil, document_url: nil) @text = text = @document_url = document_url end |
Instance Attribute Details
#document_url ⇒ Object
Returns the value of attribute document_url.
11 12 13 |
# File 'lib/deepsearch/engine/steps/rag/values/chunk.rb', line 11 def document_url @document_url end |
#embedding ⇒ Object
Returns the value of attribute embedding.
11 12 13 |
# File 'lib/deepsearch/engine/steps/rag/values/chunk.rb', line 11 def end |
#text ⇒ Object
Returns the value of attribute text.
11 12 13 |
# File 'lib/deepsearch/engine/steps/rag/values/chunk.rb', line 11 def text @text end |