UIGEN-T1 is a fine-tuned Qwen2.5-Coder-14B-Instruct model. designed for reasoning-based UI generation. available in [F16, q8_0, q6_K, q4_K_S]
tools
62 Pulls Updated 7 weeks ago
c3fa17b40132 · 1.9kB
{{- if .Tools -}}
<|im_start|>system
{{- if eq (index .Messages 0).Role "system" -}}
{{ (index .Messages 0).Content }}
{{- else -}}
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.
{{- end }}
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{{- range .Tools }}
{{ json . }}
{{- end }}
</tools>
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call><|im_end>
{{- else -}}
{{- if eq (index .Messages 0).Role "system" -}}
<|im_start|>system
{{ (index .Messages 0).Content }}<|im_end>
{{- else -}}
<|im_start|>system
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end>
{{- end -}}
{{- end -}}
{{- range .Messages -}}
{{- if eq .Role "user" -}}
<|im_start|>user
{{ .Content }}<|im_end>
{{- else if and (eq .Role "system") (ne (index $.Messages 0).Role .Role) -}}
<|im_start|>system
{{ .Content }}<|im_end>
{{- else if and (eq .Role "assistant") (not .ToolCalls) -}}
<|im_start|>assistant
{{ .Content }}<|im_end>
{{- else if eq .Role "assistant" -}}
<|im_start|>assistant
{{- if .Content -}}
{{ .Content }}
{{- end -}}
{{- range .ToolCalls -}}
{{- if .Function -}}
<tool_call>
{"name": "{{ .Function.Name }}", "arguments": {{ json .Function.Arguments }}}
</tool_call>
{{- else -}}
<tool_call>
{"name": "{{ .Name }}", "arguments": {{ json .Arguments }}}
</tool_call>
{{- end -}}
{{- end -}}
<|im_end>
{{- else if eq .Role "tool" -}}
<|im_start|>user
<tool_response>
{{ .Content }}
</tool_response>
<|im_end>
{{- end -}}
{{- end -}}
{{- if .Prompt -}}
<|im_start|>assistant
{{- end -}}