chunkAndEmbedMessage
chunkAndEmbedMessage(
ctx:StorageOperationsContext,messageId:string,options:MemoryRetrievalEmbeddingOptions&ChunkingOptions):Promise<StoredMessage|null>
Defined in: src/lib/memoryRetrieval/embeddings.ts:269Â
Chunk and embed a single message, storing chunk embeddings in the database. For messages shorter than chunkSize, falls back to whole-message embedding.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
Storage operations context | |
|
|
|
Unique ID of the message to chunk and embed |
|
|
Embedding and chunking options |
Returns
Promise<StoredMessage | null>
The updated message, or null if message not found
Last updated on