Skip to content

bodhi-realtime-agent / processKnowledgeBase

Function: processKnowledgeBase() ​

processKnowledgeBase(config, context?): ProcessedKnowledgeBase

Defined in: src/knowledge/knowledge-base-processor.ts:274

Process a KnowledgeBaseConfig into prompt injection text and an optional search tool.

The processor:

  1. Loads all documents.
  2. Applies the auto-mode threshold to decide prompt vs tool routing.
  3. Builds prompt text for prompt-routed docs.
  4. Chunks and indexes tool-routed docs, generating an inline search tool.

Parameters ​

config ​

KnowledgeBaseConfig

context? ​

KnowledgeBaseProcessContext

Returns ​

ProcessedKnowledgeBase

Built with VitePress