chunkAndEmbedAllMessages
chunkAndEmbedAllMessages(
ctx:StorageOperationsContext,options:MemoryRetrievalEmbeddingOptions&ChunkingOptions,filter?:object):Promise<number>
Defined in: src/lib/memoryRetrieval/embeddings.ts:331Â
Chunk and embed all messages without embeddings/chunks in the database. Uses chunking for long messages, whole-message embedding for short ones.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
Storage operations context | |
|
|
Embedding and chunking options | |
|
|
|
Optional filter for which messages to embed |
|
|
|
Only embed messages from this conversation |
|
|
|
Minimum content length to embed (default: 30). Shorter messages are skipped. |
|
|
|
Re-chunk messages that have whole-message embeddings but no chunks |
|
|
( |
Only embed messages with these roles |
Returns
Promise<number>
Number of messages embedded