buildPrompt
buildPrompt(
request,options?,logger?):PromptResult
Defined in: packages/planner-llm/src/lib/prompt/prompt-builder.ts:74
Build the full prompt (system + user halves) for a chart request.
Thin composition over buildSystemPrompt and buildUserPrompt.
The returned sections array exposes the post-override section list, useful
for telemetry or diffing customizer effects.
Parameters
Section titled “Parameters”request
Section titled “request”ChartRequest
options?
Section titled “options?”logger?
Section titled “logger?”Logger
Returns
Section titled “Returns”Throws
Section titled “Throws”If a section customizer is invalid (function targeting a
non-default key) or itself throws. Messages have the form
Prompt section customizer for "<key>" ... so consumers can extract the
failing section key from the quoted prefix.
Example
Section titled “Example”const { systemPrompt, userPrompt } = buildPrompt(request, { vars: { assistantName: 'Aria' }, system: { rules: (defaults) => `${defaults}\n\nAlways respond in Spanish.` }, user: { vessels: 'Custom vessel definitions here.' },});