mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-06-14 02:09:22 -04:00
20 lines
483 B
Django/Jinja
20 lines
483 B
Django/Jinja
{% set tcalls = filter_by_type(msg.content_blocks, "tool_use") %}
|
|
{
|
|
"role": "assistant",
|
|
"content": {% if msg.content != "" %}{{ tojson(msg.content) }}{% else %}null{% endif %}
|
|
{% 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 %}
|
|
},
|