Skip to main content

AI_MAX_EMBED_BYTES

Constant AI_MAX_EMBED_BYTES 

Source
pub const AI_MAX_EMBED_BYTES: usize = 1_048_576;
Expand description

Maximum bytes of text content to embed via chunking. Content beyond this point is truncated before split_recursive() to bound ORT embedding cost while still allowing large files to be indexed. 1 MiB of UTF-8 text produces ~4K chunks at 256 chars each.