Skip to main content

create_enriched_chunks

Function create_enriched_chunks 

Source
pub fn create_enriched_chunks(
    content: &str,
    doc_path: &str,
    chunk_size: usize,
    overlap: usize,
    config: &ContextPrefixConfig,
) -> Vec<EnrichedChunk>
Expand description

Create enriched chunks with context prefix injection

§Arguments

  • content - The text content to chunk
  • doc_path - Path to the source document
  • chunk_size - Target chunk size in characters
  • overlap - Overlap between chunks
  • config - Context prefix configuration

§Returns

Vector of enriched chunks with context prefixes