Table of Contents

Constructor ActiveEmbeddingSpace

Namespace
MailFathom.Application.Emails.Search
Assembly
MailFathom.Application.dll

ActiveEmbeddingSpace(IActiveEmbeddingProfileReader, IAiProviderHealthReader, TimeProvider, ITextEmbeddingGenerator?)

Initializes placement over whatever this deployment configured.

public ActiveEmbeddingSpace(IActiveEmbeddingProfileReader profileReader, IAiProviderHealthReader providerHealthReader, TimeProvider timeProvider, ITextEmbeddingGenerator? textEmbeddingGenerator)

Parameters

profileReader IActiveEmbeddingProfileReader

Answers which vector space this instance retrieves under, if any.

providerHealthReader IAiProviderHealthReader

Answers what the last call to the embedding provider established about it.

timeProvider TimeProvider

Measures how long ago that was, which is what keeps a recorded failure from latching.

textEmbeddingGenerator ITextEmbeddingGenerator

Places text in that space, or null when this deployment configured no embedding provider.

Remarks

The generator is the one optional dependency, and its absence is the deployment decision rather than a missing registration: the composition root registers an embedding adapter only for an instance that declared an endpoint chain, so resolving one here would make lexical-only deployments fail to start a search rather than serve it.

Exceptions

ArgumentNullException

Thrown when profileReader, providerHealthReader, or timeProvider is null.