Skip to content

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


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

Class: InMemoryContextManager

Defined in: layer4/context-manager.ts:17

进程内上下文管理器:工作记忆、会话摘要与简易向量检索。

Implements

Constructors

Constructor

new InMemoryContextManager(): InMemoryContextManager

Returns

InMemoryContextManager

Methods

addVectorEntry()

addVectorEntry(entry): void

Defined in: layer4/context-manager.ts:107

Parameters

entry

MemoryEntry

Returns

void


assemble()

assemble(unitId, policy, runId): Promise<AssembledContext>

Defined in: layer4/context-manager.ts:22

Parameters

unitId

string

policy

ContextPolicy

runId

string

Returns

Promise<AssembledContext>

Implementation of

ContextManager.assemble


compact()

compact(unitId, strategy): Promise<void>

Defined in: layer4/context-manager.ts:93

Parameters

unitId

string

strategy

CompactionStrategy

Returns

Promise<void>

Implementation of

ContextManager.compact


record()

record(unitId, input, output, runId): Promise<void>

Defined in: layer4/context-manager.ts:64

Parameters

unitId

string

input

AgentInput

output

AgentOutput

runId

string

Returns

Promise<void>

Implementation of

ContextManager.record


search(query, options): Promise<MemoryEntry[]>

Defined in: layer4/context-manager.ts:77

Parameters

query

string

options

SearchOptions

Returns

Promise<MemoryEntry[]>

Implementation of

ContextManager.search

MIT Licensed