Class MailAnsweringCapability
- Namespace
- MailFathom.Application.Retrieval.AskMail
- Assembly
- MailFathom.Application.dll
Decides whether this deployment can answer a question about the mailbox, without calling a provider.
public sealed class MailAnsweringCapability
- Inheritance
-
MailAnsweringCapability
- Inherited Members
Remarks
Answering needs both halves of the AI configuration at once: an embedding profile a question can be retrieved against, and a chat endpoint the run is conducted through. Either one absent makes answering something this deployment does not do, and either one failing makes it something it currently cannot do. Both readings are made here, in one place, because two callers deciding it separately is how a tool comes to be advertised by the surface that lists it and refused by the one that runs it.
It is deliberately cheap and deliberately free: one committed read of local state and one read of process-local health. A capability that spent a provider call to be reported would put an operator's money behind every listing of the tools this server offers.
The chat half carries a recheck window and the embedding half does not, and the asymmetry is the point rather than an omission. Health is observed from real calls, and the embedding provider is called by the synchronization workers and by every search that is let through, so its record renews itself on an instance nobody is asking questions of. The chat endpoint has no such traffic: with the second retrieval pass off, answering a question is the only thing that calls it. A deployment that hid the tool for as long as the last failure was on record would therefore hide it forever, because nothing left would ever establish that the credential had been rotated.
Constructors
- MailAnsweringCapability(SemanticEmailSearch, IAiProviderHealthReader, TimeProvider, IMailQuestionAnswerer?)
Initializes the capability over whatever this deployment configured.
Methods
- ReadAsync(CancellationToken)
Reads what this deployment can do with a question right now.