Method AddDiscoveryRunAgents
- Namespace
- MailFathom.AI
- Assembly
- MailFathom.AI.dll
AddDiscoveryRunAgents(IServiceCollection)
Registers the two agents a Discover run reaches the model through: the derivation that reads one question into a plan, and the composition that turns what it found into a result.
public static IServiceCollection AddDiscoveryRunAgents(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection to add to.
Returns
- IServiceCollection
The same service collection, so registration reads as one expression.
Remarks
Registered beside the answering agent and behind the same declaration, because all of them share the one dependency a supported deployment may not have. An instance that declared no chat endpoint registers none of them, which is what lets the run report that it derives nothing rather than fail to resolve.
The two are registered together rather than separately because a run needs both: a deployment holding a plan it cannot compose an answer from would refuse in the middle of a question rather than before it.
Exceptions
- ArgumentNullException
Thrown when
servicesis null.