Method AddEmbeddingProviderAdapter
- Namespace
- MailFathom.AI
- Assembly
- MailFathom.AI.dll
AddEmbeddingProviderAdapter(IServiceCollection)
Registers the adapter that produces vectors by calling a provider, and the transport it sends over.
public static IServiceCollection AddEmbeddingProviderAdapter(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection to add to.
Returns
- IServiceCollection
The same service collection, so registration reads as one expression.
Remarks
The caller registers the EmbeddingGenerationPlan and the IEmbeddingCredentialSource itself, because binding configuration and resolving a secret reference both belong to the composition root. Nothing here reads configuration or knows what a secret reference is.
Registered separately from AddLocalTextDerivations(IServiceCollection) and never called by a deployment that declared no chain, so an instance with no embedding provider resolves no generator at all rather than one that fails on first use. Serving lexical search alone is a supported state.
Exceptions
- ArgumentNullException
Thrown when
servicesis null.