symfonic.memory.prompts¶
prompts ¶
Prompt template loader for bundled prompts.
Loads prompt templates from the package's prompts/ directory using importlib.resources, with optional override from a custom path.
load_prompt ¶
Load a prompt template by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Template name without extension (e.g., 'system', 'router', 'compaction'). |
required |
overrides
|
Path | None
|
Optional directory path. If provided and contains a file
named |
None
|
Returns:
| Type | Description |
|---|---|
str
|
The prompt template as a string. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the prompt template is not found in either the overrides directory or the bundled package. |