mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-06-15 18:59:13 -04:00
refactor: Finalize agent template
This commit is contained in:
16
sources/agents/partials/ollama_messages.jinja
Normal file
16
sources/agents/partials/ollama_messages.jinja
Normal file
@@ -0,0 +1,16 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user