@okcashpro/okai v0.1.7-alpha.1 / IMemoryManager
Interface: IMemoryManager
Properties
runtime
runtime:
IAgentRuntime
Defined in
packages/core/src/types.ts:953
tableName
tableName:
string
Defined in
packages/core/src/types.ts:954
constructor
constructor:
Function
Defined in
packages/core/src/types.ts:955
Methods
addEmbeddingToMemory()
addEmbeddingToMemory(
memory
):Promise
<Memory
>
Parameters
• memory: Memory
Returns
Promise
<Memory
>
Defined in
packages/core/src/types.ts:957
getMemories()
getMemories(
opts
):Promise
<Memory
[]>
Parameters
• opts
• opts.roomId: `${string}-${string}-${string}-${string}-${string}`
• opts.count?: number
• opts.unique?: boolean
• opts.start?: number
• opts.end?: number
Returns
Promise
<Memory
[]>
Defined in
packages/core/src/types.ts:959
getCachedEmbeddings()
getCachedEmbeddings(
content
):Promise
<object
[]>
Parameters
• content: string
Returns
Promise
<object
[]>
Defined in
packages/core/src/types.ts:967
getMemoryById()
getMemoryById(
id
):Promise
<Memory
>
Parameters
• id: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Memory
>
Defined in
packages/core/src/types.ts:971
getMemoriesByRoomIds()
getMemoriesByRoomIds(
params
):Promise
<Memory
[]>
Parameters
• params
• params.roomIds: `${string}-${string}-${string}-${string}-${string}`[]
Returns
Promise
<Memory
[]>
Defined in
packages/core/src/types.ts:972
searchMemoriesByEmbedding()
searchMemoriesByEmbedding(
embedding
,opts
):Promise
<Memory
[]>
Parameters
• embedding: number
[]
• opts
• opts.match_threshold?: number
• opts.count?: number
• opts.roomId: `${string}-${string}-${string}-${string}-${string}`
• opts.unique?: boolean
Returns
Promise
<Memory
[]>
Defined in
packages/core/src/types.ts:973
createMemory()
createMemory(
memory
,unique
?):Promise
<void
>
Parameters
• memory: Memory
• unique?: boolean
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:983
removeMemory()
removeMemory(
memoryId
):Promise
<void
>
Parameters
• memoryId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:985
removeAllMemories()
removeAllMemories(
roomId
):Promise
<void
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:987
countMemories()
countMemories(
roomId
,unique
?):Promise
<number
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
• unique?: boolean
Returns
Promise
<number
>