Expand description
Automatic LLM-assisted debugging for failed search requests.
When a search/ask/body command fails (transport error, JSON parse error,
API error), the bot records what happened and asks the local Ollama
instance (same host as FicHub, thinkcentre) to diagnose the root cause.
The diagnosis is logged at warn! level and echoed to the user as a
short hint so they know the failure is being looked at.
Config (all optional):
FANFIC_ARCHIVIST_OLLAMA_URLdefaulthttp://localhost:11434FANFIC_ARCHIVIST_LLM_MODELdefaultornith:9bFANFIC_ARCHIVIST_LLM_DEBUGset0to disable entirely
Structs§
- Debug
Context - Input describing a failed API call.
Functions§
- diagnose_
with_ llm - Ask the local Ollama to diagnose a failed search. Best-effort: any failure
returns
Ok(None)so the caller can continue without the diagnosis. - short_
hint - Build a short user-facing hint from a diagnosis (keep it under embed limits).