EpisodicMemory
@daydreamsai/core / EpisodicMemory
Interface: EpisodicMemory
Defined in: packages/core/src/memory/episodic-memory.ts:52
Episodic Memory - manages conversational episodes and experiences
Methods
clearContext()
clearContext(
contextId):Promise<void>
Defined in: packages/core/src/memory/episodic-memory.ts:81
Clear all episodes for a context
Parameters
contextId
string
Returns
Promise<void>
createFromLogs()
createFromLogs(
contextId,logs,contextState,agent):Promise<Episode>
Defined in: packages/core/src/memory/episodic-memory.ts:70
Create episode from logs
Parameters
contextId
string
logs
AnyRef[]
contextState
agent
Returns
Promise<Episode>
delete()
delete(
episodeId):Promise<boolean>
Defined in: packages/core/src/memory/episodic-memory.ts:78
Delete episode
Parameters
episodeId
string
Returns
Promise<boolean>
findSimilar()
findSimilar(
contextId,query,limit?):Promise<Episode[]>
Defined in: packages/core/src/memory/episodic-memory.ts:57
Find episodes similar to a query
Parameters
contextId
string
query
string
limit?
number
Returns
Promise<Episode[]>
get()
get(
episodeId):Promise<null|Episode>
Defined in: packages/core/src/memory/episodic-memory.ts:64
Get episode by ID
Parameters
episodeId
string
Returns
Promise<null | Episode>
getByContext()
getByContext(
contextId,limit?):Promise<Episode[]>
Defined in: packages/core/src/memory/episodic-memory.ts:67
Get all episodes for a context
Parameters
contextId
string
limit?
number
Returns
Promise<Episode[]>
store()
store(
episode):Promise<string>
Defined in: packages/core/src/memory/episodic-memory.ts:54
Store an episode
Parameters
episode
Returns
Promise<string>