Graphorin API reference v0.12.1
Graphorin API reference / @graphorin/memory / / buildSummarizerPrompt
Function: buildSummarizerPrompt()
ts
function buildSummarizerPrompt(input): string;Defined in: packages/memory/src/context-engine/compaction/templates/summary-9-section.ts:79
Build the prompt the summarizer LLM receives. The prompt contains:
- The locale-resolved preamble.
- The verbatim section list (1-9, with a note that section 8 is filled by the harness).
- A delimited dump of the older messages the harness is about to drop.
The summarizer produces every section except the last two; those (recent turns + metadata) are stitched in by the harness before the result is committed to the in-flight buffer.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | { maxDumpChars?: number; olderMessages: readonly Message[]; template: RenderedTemplate; } | - |
input.maxDumpChars? | number | Character budget for the message dump (context-engine-07). When the rendered dump exceeds it, the OLDEST lines are elided (newest kept) and a marker notes how many were dropped. undefined ⇒ default DEFAULT_SUMMARIZER_DUMP_CHAR_BUDGET; 0 disables the cap. |
input.olderMessages | readonly Message[] | - |
input.template | RenderedTemplate | - |
Returns
string