Skip to main content

Module context_dedup

Module context_dedup 

Source
Expand description

Content deduplication for context delivered to language models.

Structs§

ContentFingerprint
Tracks the identity of content that was delivered to the LLM.
ContextDedup
Bounded content deduplication tracker. Remembers what was sent to the LLM to avoid resending unchanged content.

Enums§

DedupResult
Whether content needs to be sent or was already delivered.

Functions§

dedup_kernel_blocks
Replaces repeated Context Kernel blocks with compact reference stubs.
estimate_tokens
Estimates token usage using an average of four UTF-8 bytes per token.
format_unchanged_stub
Formats a compact reference to unchanged content already in context.