Skip to main content

@okcashpro/okai v0.1.7-alpha.1 / knowledge

Variable: knowledge

knowledge: object

Type declaration

get()

get: (runtime, message) => Promise<KnowledgeItem[]>

Parameters

runtime: AgentRuntime

message: Memory

Returns

Promise<KnowledgeItem[]>

set()

set: (runtime, item, chunkSize, bleed) => Promise<void>

Parameters

runtime: AgentRuntime

item: KnowledgeItem

chunkSize: number = 512

bleed: number = 20

Returns

Promise<void>

preprocess()

preprocess: (content) => string

Parameters

content: string

Returns

string

Defined in

packages/core/src/knowledge.ts:150