Method RunAsync
- Namespace
- MailFathom.Application.Discovery.Runs
- Assembly
- MailFathom.Application.dll
RunAsync(MailQuestion, Func<DiscoveryRetrievalProgress, Task>?, CancellationToken)
Reads the question into a plan, retrieves what that plan asks for, and composes what it found into a result.
public Task<DiscoveryRunResult> RunAsync(MailQuestion question, Func<DiscoveryRetrievalProgress, Task>? progress, CancellationToken cancellationToken)
Parameters
questionMailQuestionThe question and the scope bounding what may be read to answer it.
progressFunc<DiscoveryRetrievalProgress, Task>Told how far the retrieval has got as each lookup settles, or null where nobody is watching.
cancellationTokenCancellationTokenCancels the derivation and the retrieval.
Returns
- Task<DiscoveryRunResult>
What the run decided, what it found, and what it composed out of it.
Remarks
The two refusals are distinguishable on purpose and carry the availability that produced them. A deployment that configured no chat provider, or no embedding profile for the question to be placed beside mail with, answers nothing and will go on answering nothing until an operator changes that; one whose provider is refusing right now answers nothing about this request and says so. Neither is a silent degradation into a run answered from less.
The two ceilings are distinguishable for the same reason, and by the scope the refusal carries: a period that is spent turns over, so the same question asked later is answered, while a question that grew past what one question may cost reaches the same ceiling however often it is asked again.
Exceptions
- MailAnsweringUnavailableException
This deployment answers no questions about mail, or currently cannot.
- MailAnsweringBudgetExhaustedException
The current period has no allowance left for another question, or the run reached what one question may spend.
- PrincipalNotAuthorizedException
The caller does not hold both AssistantUse and MailRead.