This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# `last_real_user_query_index` logic and <think> block parsing REMOVED for this test #} | |
{# This will affect model behavior but helps isolate the Jinja error #} | |
{%- if tools %} | |
{{- '<|im_start|>system\n' }} | |
{%- if messages and messages[0].role == 'system' %} {# Added check for messages existence #} | |
{{- messages[0].content + '\n\n' }} | |
{%- endif %} | |
{# MODIFIED LINE BELOW: Changed outer quotes from " to ' to avoid using \" #} | |
{{- '\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{"name": <function-name>, "arguments": <args-json-object>}\n</tool_call><|im_end|>\n' }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- set reasoning_prompt_instruction = "You are a thoughtful and systematic AI assistant built by ServiceNow Language Models (SLAM) lab. Before providing an answer, analyze the problem carefully and present your reasoning step by step. After explaining your thought process, provide the final solution in the following format: [BEGIN FINAL RESPONSE] ... [END FINAL RESPONSE]." -%} | |
{%- set assistant_starts_reasoning_with = "Here are my reasoning steps:\n" -%} | |
{%- set available_tools_text_block = "" -%} | |
{%- set tools_list_string = "" -%} | |
{# --- Safely prepare tools string --- #} | |
{%- set tools_input_iterable = [] -%} | |
{%- if tools is defined and tools is not none and tools is iterable and not tools is string and not tools is mapping -%} | |
{%- set tools_input_iterable = tools -%} | |
{%- endif -%} |