Rag.Chunker.Chunk (rag v0.3.4)
View SourceRepresents a chunk of text with position information.
Fields
content- The text content of the chunkstart_byte- Byte offset where chunk begins in source textend_byte- Byte offset where chunk ends in source textindex- Sequential index (0-based) among sibling chunksmetadata- Additional information (chunker type, hierarchy level, etc.)
Summary
Functions
Extract the chunk's content from the original text using byte positions.
Create a new chunk from attributes.
Check if chunk positions correctly match the content.
Types
@type t() :: %Rag.Chunker.Chunk{ content: String.t(), end_byte: non_neg_integer(), index: non_neg_integer(), metadata: map(), start_byte: non_neg_integer() }
Functions
Extract the chunk's content from the original text using byte positions.
Create a new chunk from attributes.
Check if chunk positions correctly match the content.