Skip to Content

embedMessage

embedMessage(ctx: StorageOperationsContext, messageId: string, options: MemoryRetrievalEmbeddingOptions): Promise<StoredMessage | null>

Defined in: src/lib/memoryRetrieval/embeddings.ts:153 

Embed a single message and store the embedding in the database

Parameters

ParameterTypeDescription

ctx

StorageOperationsContext

Storage operations context

messageId

string

Unique ID of the message to embed

options

MemoryRetrievalEmbeddingOptions

Embedding options

Returns

Promise<StoredMessage | null>

The updated message with embedding, or null if message not found

Last updated on