Module prompt

Module prompt 

Source
Expand description

P — Prompt composition.

Compose prompt sections additively with +.

Structs§

P
The P namespace — static factory methods for prompt sections.
PromptComposite
A composed prompt built from multiple sections.
PromptSection
A section of a prompt.

Enums§

PromptSectionKind
The semantic category of a prompt section.
PromptTransform
A declarative transform that can be applied to a PromptComposite.

Functions§

compress_text
Deterministically compress prompt text to reduce tokens without an LLM: trims each line, collapses internal whitespace runs to single spaces, drops blank lines, and removes consecutive duplicate lines.

Type Aliases§

AdapterFn
Adapter rewriting a rendered prompt section.