Update extras/Modelfile [EXPERIMENTAL]
Browse files- extras/Modelfile [EXPERIMENTAL] +39 -26
extras/Modelfile [EXPERIMENTAL]
CHANGED
|
@@ -1,29 +1,42 @@
|
|
| 1 |
FROM "YOUR/PATH/HERE"
|
| 2 |
|
| 3 |
-
TEMPLATE """{
|
| 4 |
-
|
| 5 |
-
{
|
| 6 |
-
|
| 7 |
-
{
|
|
|
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM "YOUR/PATH/HERE"
|
| 2 |
|
| 3 |
+
TEMPLATE """{{- if .Messages }}
|
| 4 |
+
{{- if or .System .Tools }}<|im_start|>system
|
| 5 |
+
{{- if .System }}
|
| 6 |
+
{{ .System }}
|
| 7 |
+
{{- end }}
|
| 8 |
+
{{- if .Tools }}
|
| 9 |
|
| 10 |
+
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
|
| 11 |
+
<tool_call>
|
| 12 |
+
{"name": <function-name>, "arguments": <args-json-object>}
|
| 13 |
+
</tool_call>
|
| 14 |
+
{{- end }}<|im_end|>
|
| 15 |
+
{{ end }}
|
| 16 |
+
{{- range $i, $_ := .Messages }}
|
| 17 |
+
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
|
| 18 |
+
{{- if eq .Role "user" }}<|im_start|>user
|
| 19 |
+
{{ .Content }}<|im_end|>
|
| 20 |
+
{{ else if eq .Role "assistant" }}<|im_start|>assistant
|
| 21 |
+
{{ if .Content }}{{ .Content }}
|
| 22 |
+
{{- else if .ToolCalls }}<tool_call>
|
| 23 |
+
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
|
| 24 |
+
{{ end }}</tool_call>
|
| 25 |
+
{{- end }}{{ if not $last }}<|im_end|>
|
| 26 |
+
{{ end }}
|
| 27 |
+
{{- else if eq .Role "tool" }}<|im_start|>user
|
| 28 |
+
<tool_response>
|
| 29 |
+
{{ .Content }}
|
| 30 |
+
</tool_response><|im_end|>
|
| 31 |
+
{{ end }}
|
| 32 |
+
{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
|
| 33 |
+
{{ end }}
|
| 34 |
+
{{- end }}
|
| 35 |
+
{{- else }}
|
| 36 |
+
{{- if .System }}<|im_start|>system
|
| 37 |
+
{{ .System }}<|im_end|>
|
| 38 |
+
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 39 |
+
{{ .Prompt }}<|im_end|>
|
| 40 |
+
{{ end }}<|im_start|>assistant
|
| 41 |
+
{{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}"""
|
| 42 |
+
SYSTEM You are Andy, a fine tuned model for playing Minecraft, made by SweaterDog
|