mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-07-14 15:21:15 -04:00
refactor: Finalize agent template
This commit is contained in:
9
sources/agents/partials/openai_messages.jinja
Normal file
9
sources/agents/partials/openai_messages.jinja
Normal file
@@ -0,0 +1,9 @@
|
||||
{% if existsIn(ctx, "system_prompt") %}
|
||||
{ "role": "system", "content": {{ tojson(ctx.system_prompt) }} },
|
||||
{% endif %}
|
||||
{% for msg in ctx.history %}
|
||||
{% if msg.role == "assistant" %}{% include "partials/openai_assistant.jinja" %}
|
||||
{% else if length(filter_by_type(msg.content_blocks, "tool_result")) > 0 %}{% include "partials/openai_tool_results.jinja" %}
|
||||
{% else %}{% include "partials/openai_user.jinja" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user