Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/server / / MemoryApi
Interface: MemoryApi
Defined in: packages/server/src/routes/memory.ts:58
Stable
Methods
deleteBlock()
ts
deleteBlock(scope, label): Promise<boolean>;Defined in: packages/server/src/routes/memory.ts:63
Parameters
| Parameter | Type |
|---|---|
scope | { userId: string; } |
scope.userId | string |
label | string |
Returns
Promise<boolean>
forget()
ts
forget(scope, factId): Promise<boolean>;Defined in: packages/server/src/routes/memory.ts:61
Parameters
| Parameter | Type |
|---|---|
scope | { userId: string; } |
scope.userId | string |
factId | string |
Returns
Promise<boolean>
remember()
ts
remember(input): Promise<{
factId: string;
}>;Defined in: packages/server/src/routes/memory.ts:60
Parameters
| Parameter | Type |
|---|---|
input | { metadata?: Record<string, unknown>; scope: { agentId?: string; sessionId?: string; userId: string; }; sensitivity?: "public" | "internal" | "secret"; text: string; } |
input.metadata? | Record<string, unknown> |
input.scope | { agentId?: string; sessionId?: string; userId: string; } |
input.scope.agentId? | string |
input.scope.sessionId? | string |
input.scope.userId | string |
input.sensitivity? | "public" | "internal" | "secret" |
input.text | string |
Returns
Promise<{ factId: string; }>
search()
ts
search(input): Promise<readonly unknown[]>;Defined in: packages/server/src/routes/memory.ts:59
Parameters
| Parameter | Type |
|---|---|
input | { query: string; scope: { agentId?: string; sessionId?: string; userId: string; }; topK?: number; } |
input.query | string |
input.scope | { agentId?: string; sessionId?: string; userId: string; } |
input.scope.agentId? | string |
input.scope.sessionId? | string |
input.scope.userId | string |
input.topK? | number |
Returns
Promise<readonly unknown[]>
upsertBlock()
ts
upsertBlock(input): Promise<{
label: string;
}>;Defined in: packages/server/src/routes/memory.ts:62
Parameters
| Parameter | Type |
|---|---|
input | { body: string; label: string; scope: { agentId?: string; sessionId?: string; userId: string; }; } |
input.body | string |
input.label | string |
input.scope | { agentId?: string; sessionId?: string; userId: string; } |
input.scope.agentId? | string |
input.scope.sessionId? | string |
input.scope.userId | string |
Returns
Promise<{ label: string; }>