Germano Cavalcante commited on
Commit
ea6dc35
1 Parent(s): fc2f6ba

Update Modelfile

Browse files
Files changed (1) hide show
  1. Modelfile +44 -5
Modelfile CHANGED
@@ -2,11 +2,50 @@ FROM ./llama.gguf
2
 
3
  SYSTEM """You are a helpful AI assistant. Respond to users accurately."""
4
 
5
- TEMPLATE """{{ if .System }}<|im_start|>system
6
- {{ .System }}<|im_end|>
7
- {{ end }}{{ if .Prompt }}<|im_start|>user
8
- {{ .Prompt }}<|im_end|>
9
- {{ end }}<|im_start|>assistant
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  """
11
 
12
  PARAMETER stop <|im_start|>
 
2
 
3
  SYSTEM """You are a helpful AI assistant. Respond to users accurately."""
4
 
5
+ TEMPLATE """<|start_header_id|>system<|end_header_id|>
6
+
7
+ Cutting Knowledge Date: December 2023
8
+
9
+ {{ if .System }}{{ .System }}
10
+ {{- end }}
11
+ {{- if .Tools }}When you receive a tool call response, use the output to format an answer to the orginal user question.
12
+
13
+ You are a helpful assistant with tool calling capabilities.
14
+ {{- end }}<|eot_id|>
15
+ {{- range $i, $_ := .Messages }}
16
+ {{- $last := eq (len (slice $.Messages $i)) 1 }}
17
+ {{- if eq .Role "user" }}<|start_header_id|>user<|end_header_id|>
18
+ {{- if and $.Tools $last }}
19
+
20
+ Given the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt.
21
+
22
+ Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.
23
+
24
+ {{ range $.Tools }}
25
+ {{- . }}
26
+ {{ end }}
27
+ {{ .Content }}<|eot_id|>
28
+ {{- else }}
29
+
30
+ {{ .Content }}<|eot_id|>
31
+ {{- end }}{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
32
+
33
+ {{ end }}
34
+ {{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|>
35
+ {{- if .ToolCalls }}
36
+ {{ range .ToolCalls }}
37
+ {"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}{{ end }}
38
+ {{- else }}
39
+
40
+ {{ .Content }}
41
+ {{- end }}{{ if not $last }}<|eot_id|>{{ end }}
42
+ {{- else if eq .Role "tool" }}<|start_header_id|>ipython<|end_header_id|>
43
+
44
+ {{ .Content }}<|eot_id|>{{ if $last }}<|start_header_id|>assistant<|end_header_id|>
45
+
46
+ {{ end }}
47
+ {{- end }}
48
+ {{- end }}
49
  """
50
 
51
  PARAMETER stop <|im_start|>