orxtra v0.13.0 /scheduler.src.orxtra.scheduler._prompt_templates
On this page

Loads scheduler prompt text from .md files packaged under prompts/ and renders them via the compose engine's strict variable substitution; render_template_lenient exists only for migration.

#scheduler.src.orxtra.scheduler._prompt_templates

#scheduler.src.orxtra.scheduler._prompt_templates

Packaged .md template loader for scheduler prompt strings.

All hard-coded prompt text in the scheduler lives in the prompts/ subdirectory as .md files. This module provides a thin loader with strict variable substitution via the compose engine.

#load_template

python
def load_template(name: str) -> str

Load a .md template by name (without extension).

Returns the raw template text with trailing newline stripped. Caches the result for subsequent calls.

#render_template

python
def render_template(name: str, variables: dict[str, str]) -> str

Load a .md template and apply strict variable substitution.

Every {placeholder} in the template must have a matching variable, and every variable must be used. Raises ValueError on mismatch.

#render_template_lenient

python
def render_template_lenient(name: str, variables: dict[str, Any]) -> str

Load a .md template and apply lenient variable substitution.

This exists ONLY for backward compatibility during migration. Prefer render_template (strict) for all new code.

Search