Constructor StoredEmailEmbeddingGenerator
- Namespace
- MailFathom.Application.Emails.Embeddings.Generation
- Assembly
- MailFathom.Application.dll
StoredEmailEmbeddingGenerator(IEmailEmbeddingStore, ITextEmbeddingGenerator, OptimisticConcurrencyRetryPolicy, EmbeddingSpendGate, EmbeddingRequestPacer)
Initializes a new generator of one message's embeddings.
public StoredEmailEmbeddingGenerator(IEmailEmbeddingStore embeddingStore, ITextEmbeddingGenerator textEmbeddingGenerator, OptimisticConcurrencyRetryPolicy concurrencyRetryPolicy, EmbeddingSpendGate spendGate, EmbeddingRequestPacer requestPacer)
Parameters
embeddingStoreIEmailEmbeddingStoreReads which passages lack a vector, and writes the vectors that answer.
textEmbeddingGeneratorITextEmbeddingGeneratorTurns passages into points of that space.
concurrencyRetryPolicyOptimisticConcurrencyRetryPolicyCommits one call's vectors, retrying a conflict with a competing writer.
spendGateEmbeddingSpendGateSays whether the period still admits a request, and is charged for the ones it does.
requestPacerEmbeddingRequestPacerHolds a call back until this deployment is allowed to send its next one.
Exceptions
- ArgumentNullException
Thrown when any argument is null.