mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-06-13 17:59:15 -04:00
17 lines
384 B
Django/Jinja
17 lines
384 B
Django/Jinja
{% if existsIn(ctx, "system_prompt") %}
|
|
{ "role": "system", "content": {{ tojson(ctx.system_prompt) }} },
|
|
{% endif %}
|
|
{% for msg in ctx.history %}
|
|
{
|
|
"role": {{ tojson(msg.role) }},
|
|
"content": {{ tojson(msg.content) }}
|
|
{% if existsIn(msg, "images") %}
|
|
, "images": [
|
|
{% for img in msg.images %}
|
|
{{ tojson(img.data) }},
|
|
{% endfor %}
|
|
]
|
|
{% endif %}
|
|
},
|
|
{% endfor %}
|