Skip to content

extractor

diapason.memory.extractor

LLM-backed extraction of durable facts from a conversation turn.

The extractor takes a single (user, assistant) exchange and asks a small local model to distill any long-term, user-specific facts worth remembering. It is deliberately defensive: extraction runs on a background thread far from the request path, so any failure — a dropped Ollama connection, a timeout, a BrokenPipeError when the client went away, or simply unparseable output — must degrade to "no facts" rather than propagate.

FactExtractor

Extract memory-worthy facts from a conversation turn via an engine.

extract(user_text, assistant_text='')

Return durable facts from the exchange. Never raises.