Skip to main content
Version: 0.25.0

Function: createPromptLoader()

function createPromptLoader(rootDir): (relativePath, vars?) => string;

Defined in: core/promptTemplate.ts:9

Builds a loadPrompt(relativePath, vars) bound to rootDir — so each agent built on this kit supplies its own prompts directory (its own domain content) and gets the same {{key}} substitution/fail-loudly behavior for free.

Parameters​

ParameterType
rootDirstring

Returns​

(relativePath, vars?) => string