-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.jinja
More file actions
30 lines (27 loc) · 1002 Bytes
/
Copy pathexample.jinja
File metadata and controls
30 lines (27 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{# System prompt with dynamic content #}
You are {{ assistant_name | default("Assistant") }}, a {{ assistant_type | default("helpful") }} assistant.
{% if current_date %}Current date: {{ current_date }}{% endif %}
{% if tools %}Available tools: {{ tools | join(", ") }}{% endif %}
{# Chat history loop #}
{% for item in conversation_history %}
<div role="user">{{ item.user }}</div>
<div role="assistant">
{% if item.reasoning %}
<think>{{ item.reasoning }}</think>
{% endif %}
{{ item.assistant }}
{% if item.tool_needed %}
<tool_call tool_name="{{ item.tool_name }}" tool_call_id="call_{{ loop.index }}">
{{ item.tool_args | tojson }}
</tool_call>
{% endif %}
</div>
{# Tool response if there was a tool call #}
{% if item.tool_needed and item.tool_response %}
<div role="tool" tool_name="{{ item.tool_name }}" tool_call_id="call_{{ loop.index }}">
{{ item.tool_response }}
</div>
{% endif %}
{% endfor %}
{# Current user message #}
<div role="user">{{ current_question }}</div>