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
conversationAgentConversationIdThe conversation holding the message.
userUserIdThe person whose conversation it has to be.
sequencelongThe place of the entry the text was read from.
profileRegisteredEmbeddingProfileThe space the vector was placed in.
vectorEmbeddingVectorWhere the message sits in that space.
cancellationTokenCancellationTokenCancels 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
profileorvectoris null.