Pinkstack commited on
Commit
534960d
1 Parent(s): cfb9b75

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -6
README.md CHANGED
@@ -33,12 +33,53 @@ it is designed to run on any device, from your phone to high-end PC. that is why
33
  To use this model, you must use a service which supports the GGUF file format.
34
  Additionaly, this is the Prompt Template, it uses the qwen2 template.
35
  ```
36
- {{ if .System }}<|system|>
37
- {{ .System }}<|end|>
38
- {{ end }}{{ if .Prompt }}<|user|>
39
- {{ .Prompt }}<|end|>
40
- {{ end }}<|assistant|>
41
- {{ .Response }}<|end|>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  ```
43
 
44
  Or if you are using an anti prompt: <|end|><|assistant|>
 
33
  To use this model, you must use a service which supports the GGUF file format.
34
  Additionaly, this is the Prompt Template, it uses the qwen2 template.
35
  ```
36
+ {{- if .Suffix }}<|fim_prefix|>{{ .Prompt }}<|fim_suffix|>{{ .Suffix }}<|fim_middle|>
37
+ {{- else if .Messages }}
38
+ {{- if or .System .Tools }}<|im_start|>system
39
+ {{- if .System }}
40
+ {{ .System }}
41
+ {{- end }}
42
+ {{- if .Tools }}
43
+ # Tools
44
+ You may call one or more functions to assist with the user query.
45
+ You are provided with function signatures within <tools></tools> XML tags:
46
+ <tools>
47
+ {{- range .Tools }}
48
+ {"type": "function", "function": {{ .Function }}}
49
+ {{- end }}
50
+ </tools>
51
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
52
+ <tool_call>
53
+ {"name": <function-name>, "arguments": <args-json-object>}
54
+ </tool_call>
55
+ {{- end }}<|im_end|>
56
+ {{ end }}
57
+ {{- range $i, $_ := .Messages }}
58
+ {{- $last := eq (len (slice $.Messages $i)) 1 -}}
59
+ {{- if eq .Role "user" }}<|im_start|>user
60
+ {{ .Content }}<|im_end|>
61
+ {{- else if eq .Role "assistant" }}<|im_start|>assistant
62
+ {{ if .Content }}{{ .Content }}
63
+ {{- else if .ToolCalls }}<tool_call>
64
+ {{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
65
+ {{ end }}</tool_call>
66
+ {{- end }}{{ if not $last }}<|im_end|>
67
+ {{ end }}
68
+ {{- else if eq .Role "tool" }}<|im_start|>user
69
+ <tool_response>
70
+ {{ .Content }}
71
+ </tool_response><|im_end|>
72
+ {{ end }}
73
+ {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
74
+ {{ end }}
75
+ {{- end }}
76
+ {{- else }}
77
+ {{- if .System }}<|im_start|>system
78
+ {{ .System }}<|im_end|>
79
+ {{- end }}{{ if .Prompt }}<|im_start|>user
80
+ {{ .Prompt }}<|im_end|>
81
+ {{ end }}<|im_start|>assistant
82
+ {{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}
83
  ```
84
 
85
  Or if you are using an anti prompt: <|end|><|assistant|>