UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

35 lines (34 loc) • 1.03 kB
/** * HTML-aware Chunker * * Splits HTML documents based on tag structure while preserving semantics. * Best for web pages, email templates, and structured HTML content. */ import type { BaseChunkerConfig, Chunk, Chunker, ChunkerValidationResult, HTMLChunkerConfig } from "../../types/index.js"; /** * HTML-aware chunker implementation * Splits based on HTML structure (tags, elements) */ export declare class HTMLChunker implements Chunker { readonly strategy: "html"; private readonly defaultSplitTags; private readonly defaultPreserveTags; chunk(text: string, config?: HTMLChunkerConfig): Promise<Chunk[]>; /** * Split HTML by structural tags */ private splitByTags; /** * Parse HTML attributes from string */ private parseAttributes; /** * Extract plain text from HTML */ private extractText; /** * Split content that exceeds max size */ private splitContent; validateConfig(config: BaseChunkerConfig): ChunkerValidationResult; }