CoolFace
Modelpublic

atsintli/mirage_dataset_model_test

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes15downloads
Modelfile52 linesDownload Raw Back to root
1 2 3{{- $lastUserIdx := -1 -}}4{{- range $idx, $msg := .Messages -}}5{{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}}6{{- end }}7{{- if or .System .Tools }}<|im_start|>system8{{ if .System }}9{{ .System }}10{{- end }}11{{- if .Tools }}12 13# Tools14 15You may call one or more functions to assist with the user query.16 17You are provided with function signatures within <tools></tools> XML tags:18<tools>19{{- range .Tools }}20{"type": "function", "function": {{ .Function }}}21{{- end }}22</tools>23 24For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:25<tool_call>26{"name": <function-name>, "arguments": <args-json-object>}27</tool_call>28{{- end -}}29<|im_end|>30{{ end }}31{{- range $i, $_ := .Messages }}32{{- $last := eq (len (slice $.Messages $i)) 1 -}}33{{- if eq .Role "user" }}<|im_start|>user34{{ .Content }}<|im_end|>35{{ else if eq .Role "assistant" }}<|im_start|>assistant36{{ if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}}37<think>{{ .Thinking }}</think>38{{ end -}}39{{ if .Content }}{{ .Content }}40{{- else if .ToolCalls }}<tool_call>41{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}42{{ end }}</tool_call>43{{- end }}{{ if not $last }}<|im_end|>44{{ end }}45{{- else if eq .Role "tool" }}<|im_start|>user46<tool_response>47{{ .Content }}48</tool_response><|im_end|>49{{ end }}50{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant51{{ end }}52{{- end }}