Table of Contents

Method SaveEmbeddingAsync

Namespace
MailFathom.Application.Agent.Search
Assembly
MailFathom.Application.dll

SaveEmbeddingAsync(AgentConversationId, UserId, long, RegisteredEmbeddingProfile, EmbeddingVector, CancellationToken)

Records where one written message sits in a space.

Task SaveEmbeddingAsync(AgentConversationId conversation, UserId user, long sequence, RegisteredEmbeddingProfile profile, EmbeddingVector vector, CancellationToken cancellationToken)

Parameters

conversation AgentConversationId

The conversation holding the message.

user UserId

The person whose conversation it has to be.

sequence long

The place of the entry the text was read from.

profile RegisteredEmbeddingProfile

The space the vector was placed in.

vector EmbeddingVector

Where the message sits in that space.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes once the vector is recorded, or once nothing was, where the entry is gone or is not this person's.

Remarks

The vector hangs off the entry it was read from, so it goes when the conversation does, by the same cascade every entry goes by. A conversation deleted while its answer was being embedded is a vector with nothing to hang off, which is not a fault; recording one already recorded writes nothing.

Exceptions

ArgumentNullException

Thrown when profile or vector is null.