Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
f8daddcc
Unverified
Commit
f8daddcc
authored
Aug 22, 2025
by
jerryzhuang
Committed by
GitHub
Aug 21, 2025
Browse files
[Bugfix] set system_message in phi4mini chat template (#23309)
Signed-off-by:
zhuangqh
<
zhuangqhc@gmail.com
>
parent
c8e33c72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
examples/tool_chat_template_phi4_mini.jinja
examples/tool_chat_template_phi4_mini.jinja
+8
-6
No files found.
examples/tool_chat_template_phi4_mini.jinja
View file @
f8daddcc
{%- if messages and messages[0]['role'] == 'system' %}
{%- set system_message = messages[0]['content']|trim %}
{%- set messages = messages[1:] %}
{%- else %}
{%- set system_message = "You are a helpful assistant." %}
{%- endif %}
{%- if messages %}
{%- if messages %}
{%- if system_message or tools %}
<|system|>
<|system|>
{%- if system_message %}
{{ system_message }}
{{ system_message }}
{%-
endif
%}
{%-
if tools
%}
In addition to plain text responses, you can chose to call one or more of the provided functions.
In addition to plain text responses, you can chose to call one or more of the provided functions.
Use the following rule to decide when to call a function:
Use the following rule to decide when to call a function:
...
@@ -19,13 +23,11 @@ If you decide to call functions:
...
@@ -19,13 +23,11 @@ If you decide to call functions:
* make sure you pick the right functions that match the user intent
* make sure you pick the right functions that match the user intent
{%- if tools %}
{%- for t in tools %}
{%- for t in tools %}
{{- t | tojson(indent=4) }}
{{- t | tojson(indent=4) }}
{{- "\n\n" }}
{{- "\n\n" }}
{%- endfor %}
{%- endfor %}
{%- endif %}<|end|>
{%- endif %}<|end|>
{%- endif %}
{%- for message in messages %}
{%- for message in messages %}
{%- if message.role != "system" %}
{%- if message.role != "system" %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment