Skip to content

uni-flow 公开 API(中文注解)


uni-flow 公开 API(中文注解) / InMemoryLongTermMemoryStore

Class: InMemoryLongTermMemoryStore

Defined in: layer4/long-term-memory.ts:23

进程内长期记忆;需要落盘可用 createFileLongTermMemoryStore

Implements

Constructors

Constructor

new InMemoryLongTermMemoryStore(): InMemoryLongTermMemoryStore

Returns

InMemoryLongTermMemoryStore

Methods

delete()

delete(id): Promise<void>

Defined in: layer4/long-term-memory.ts:52

Parameters

id

string

Returns

Promise<void>

Implementation of

LongTermMemoryStore.delete


get()

get(id): Promise<LongTermMemoryEntry | null>

Defined in: layer4/long-term-memory.ts:41

Parameters

id

string

Returns

Promise<LongTermMemoryEntry | null>

Implementation of

LongTermMemoryStore.get


listAll()

listAll(): Promise<LongTermMemoryEntry[]>

Defined in: layer4/long-term-memory.ts:56

Returns

Promise<LongTermMemoryEntry[]>

Implementation of

LongTermMemoryStore.listAll


put()

put(entry): Promise<void>

Defined in: layer4/long-term-memory.ts:26

Parameters

entry

Omit<LongTermMemoryEntry, "createdAt" | "updatedAt"> & object

Returns

Promise<void>

Implementation of

LongTermMemoryStore.put


query()

query(scope, limit?): Promise<LongTermMemoryEntry[]>

Defined in: layer4/long-term-memory.ts:45

Parameters

scope

string

limit?

number = 50

Returns

Promise<LongTermMemoryEntry[]>

Implementation of

LongTermMemoryStore.query

MIT Licensed