jinja2 support
This commit is contained in:
32
prompts/code_generator.md
Normal file
32
prompts/code_generator.md
Normal 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 %}
|
||||
Reference in New Issue
Block a user