Update metadata (general.languages, qwen35moe.rope.freq_base)

#2
by Oleg-On - opened

Updated metadata:

  • general.languages: [zh, en, ko, ru]
  • qwen35moe.rope.freq_base: 50000000
  • tokenizer.chat_template:
{%- if tools %}
{{- '<|im_start|>system\n' }}

{%- if messages[0].role == 'system' %}
{{- messages[0].content + '\n\n' }}
{%- endif %}

{{- "You are a coding assistant that PRIORITIZES TOOL USE.

## CRITICAL RULES (MUST FOLLOW)
1. For ANY task that can use a tool → CALL TOOL IMMEDIATELY
2. NO thinking aloud, NO explanations before tool calls
3. NO conversational filler (\"Let me...\", \"I'll...\", \"Sure...\")
4. Output ONLY the tool call, nothing else
5. After tool response → evaluate → call next tool directly
6. Only use natural language if NO tool exists for the task

## AVAILABLE TOOLS
<tools>" }}
{%- for tool in tools %}
{{- '\n' }}
{{- tool | tojson }}
{%- endfor %}

{{- "\n</tools>

## TOOL CALL FORMAT (NO extra text)
<tool_call>
{\"name\": \"tool_name\", \"arguments\": {...}}
</tool_call>

## EXAMPLES
User: Read src/main.py
Assistant:
<tool_call>
{\"name\": \"read_file\", \"arguments\": {\"path\": \"src/main.py\"}}
</tool_call>

User: Find all .py files in src/
Assistant:
<tool_call>
{\"name\": \"file_glob_search\", \"arguments\": {\"pattern\": \"src/**/*.py\"}}
</tool_call>

User: Search for 'TODO' in codebase
Assistant:
<tool_call>
{\"name\": \"grep_search\", \"arguments\": {\"pattern\": \"TODO\", \"path\": \".\"}}
</tool_call>

User: Run ls -la
Assistant:
<tool_call>
{\"name\": \"exec_shell_command\", \"arguments\": {\"command\": \"ls -la\"}}
</tool_call>

User: Write to config.json
Assistant:
<tool_call>
{\"name\": \"write_file\", \"arguments\": {\"path\": \"config.json\", \"content\": \"{}\"}}
</tool_call>

User: Edit line 15
Assistant:
<tool_call>
{\"name\": \"edit_file\", \"arguments\": {\"path\": \"file.txt\", \"line\": 15, \"new_content\": \"updated\"}}
</tool_call>

User: Apply git diff
Assistant:
<tool_call>
{\"name\": \"apply_diff\", \"arguments\": {\"diff\": \"--- a/file\\n+++ b/file\\n@@ -1 +1 @@\\n-old\\n+new\"}}
</tool_call>

User: What time is it?
Assistant:
<tool_call>
{\"name\": \"get_datetime\", \"arguments\": {}}
</tool_call>

<|im_end|>\n" }}

{%- else %}
{%- if messages[0].role == 'system' %}
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
{%- endif %}
{%- endif %}

{%- for message in messages %}
{%- if message.content is string %}
    {%- set content = message.content %}
{%- else %}
    {%- set content = '' %}
{%- endif %}

{%- if message.role == "user" %}
{{- '<|im_start|>user\n' + content + '<|im_end|>\n' }}

{%- elif message.role == "system" and not loop.first %}
{{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}

{%- elif message.role == "assistant" %}
{{- '<|im_start|>assistant\n' }}
{%- if message.tool_calls %}
    {%- for tool_call in message.tool_calls %}
        {%- if tool_call.function %}
            {%- set tool_call = tool_call.function %}
        {%- endif %}
        {%- if loop.first and content %}
            {{- content + '\n' }}
        {%- endif %}
<tool_call>
{"name": "{{ tool_call.name }}", "arguments": {{ tool_call.arguments | tojson if tool_call.arguments is mapping else tool_call.arguments }}}
</tool_call>
        {%- if not loop.last %}{{ '\n' }}{% endif %}
    {%- endfor %}
{%- else %}
    {{- content }}
{%- endif %}
{{- '<|im_end|>\n' }}

{%- elif message.role == "tool" %}
    {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
        {{- '<|im_start|>user' }}
    {%- endif %}
{{- '\n<tool_response>\n' }}
{{- content }}
{{- '\n</tool_response>' }}
    {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
        {{- '<|im_end|>\n' }}
    {%- endif %}
{%- endif %}
{%- endfor %}

{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- endif %}
brunopio changed pull request status to merged

Sign up or log in to comment