Skip to content

Instantly share code, notes, and snippets.

@Ragnar-D
Ragnar-D / arcee-ai_Homunculus.jinja
Created June 5, 2025 03:23
arcee-ai/Homunculus-GGUF jinja template
{# `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' }}
@Ragnar-D
Ragnar-D / nemotron_15b_thinker_chat.jinja
Created May 12, 2025 15:14
LM Studio Jinja prompt template for ServiceNow-AI/Nemotron-15B-Thinker-GGUF
{%- 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 -%}