jinja2 support

This commit is contained in:
2025-09-16 16:05:01 +02:00
parent 2000370544
commit 5ce72ffb25
8 changed files with 647 additions and 36 deletions

32
prompts/code_generator.md Normal file
View File

@@ -0,0 +1,32 @@
Generate a Python class with the following specifications:
Class Name: {{ class_name }}
{% if parent_class %}
Inherits from: {{ parent_class }}
{% endif %}
## Attributes:
{% for attr in attributes %}
- {{ attr.name }}: {{ attr.type }}{% if attr.default %} = {{ attr.default }}{% endif %}
{% endfor %}
## Methods:
{% for method in methods %}
### {{ method.name }}({{ method.params | join(', ') }})
{{ method.description }}
Returns: {{ method.returns }}
{% endfor %}
## Example Usage:
```python
{% for example in examples %}
{{ example }}
{% endfor %}
```
{% if additional_notes %}
## Notes:
{% for note in additional_notes %}
- {{ note }}
{% endfor %}
{% endif %}