mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-06-14 10:19:16 -04:00
refactor: Finalize agent template
This commit is contained in:
19
sources/agents/partials/openai_assistant.jinja
Normal file
19
sources/agents/partials/openai_assistant.jinja
Normal file
@@ -0,0 +1,19 @@
|
||||
{% set tcalls = filter_by_type(msg.content_blocks, "tool_use") %}
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": {{ tojson(msg.content) }}
|
||||
{% if length(tcalls) > 0 %}
|
||||
, "tool_calls": [
|
||||
{% for b in tcalls %}
|
||||
{
|
||||
"id": {{ tojson(b.id) }},
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": {{ tojson(b.name) }},
|
||||
"arguments": {{ tojson(tojson(b.input)) }}
|
||||
}
|
||||
},
|
||||
{% endfor %}
|
||||
]
|
||||
{% endif %}
|
||||
},
|
||||
Reference in New Issue
Block a user