Skip to Content
Anuma SDKReactInternalFunctionsextractEntitiesForMemories

extractEntitiesForMemories

extractEntitiesForMemories(memories: readonly TopicExtractionInput[], options: TopicExtractOptions, signal?: AbortSignal): Promise<Map<string, ExtractedEntity[]>>

Defined in: src/lib/memory/topicExtract.ts:121 

Ask the extraction LLM for the named entities of each memory, in batches of TOPIC_EXTRACTION_BATCH_SIZE. Pure LLM step — no persistence.

Returns memoryId → entities. A memory PRESENT with an empty array is a successful, explicit “no named entities” answer; a memory ABSENT from the map is UNANSWERED — its batch failed after retries, returned an unusable shape, or the model omitted its id. Callers must retry absent ids in a later sweep, never stamp them.

Parameters

ParameterType

memories

readonly TopicExtractionInput[]

options

TopicExtractOptions

signal?

AbortSignal

Returns

Promise<Map<string, ExtractedEntity[]>>

Last updated on