Skip to Content
SdkReactInternalFunctionsformatMemoriesForChat

formatMemoriesForChat

formatMemoriesForChat(memories: StoredMemory & object[], format: "compact" | "detailed"): string

Defined in: src/lib/memory/chat.ts:9 

Format memories into a context string that can be included in chat messages

Parameters

ParameterTypeDefault valueDescription

memories

StoredMemory & object[]

undefined

Array of memories with similarity scores

format

"compact" | "detailed"

"compact"

Format style: “compact” (key-value pairs) or “detailed” (includes evidence)

Returns

string

Formatted string ready to include in system/user message

Last updated on