Expand description
Prompt file parsing service.
Supports parsing prompt templates from multiple formats:
- Markdown with YAML front matter (
.md) - YAML files (
.yaml,.yml) - JSON files (
.json) - Plain text (
.txtor no extension)
§Format Examples
§Markdown
---
name: code-review
description: Review code for issues
tags: [code, review]
---
Please review the following code:
{{code}}§YAML
name: code-review
description: Review code for issues
content: |
Please review the following code:
{{code}}
tags:
- code
- review§JSON
{
"name": "code-review",
"description": "Review code for issues",
"content": "Please review {{code}}",
"tags": ["code", "review"]
}Structs§
- Prompt
Parser - Parser for prompt template files.
Enums§
- Prompt
Format - Supported prompt file formats.
Functions§
- merge_
variables 🔒 - Merges explicit variable definitions with extracted variables.
- parse_
variable_ 🔒def - Parses a variable definition from a JSON value.
- serialize_
variable_ 🔒to_ json - Serializes a
PromptVariableto a JSON value for markdown front matter.