1- name : gpt-4
2- mmap : true
3- parameters :
4- model : huggingface://NousResearch/Hermes-2-Pro-Llama-3-8B-GGUF/Hermes-2-Pro-Llama-3-8B-Q4_K_M.gguf
51context_size : 8192
6-
7- stopwords :
8- - " <|im_end|>"
9- - " <dummy32000>"
10- - " </tool_call>"
11- - " <|eot_id|>"
12- - " <|end_of_text|>"
13-
2+ f16 : true
143function :
15- # disable injecting the "answer" tool
16- disable_no_action : true
17-
184 grammar :
19- # This allows the grammar to also return messages
20- mixed_mode : true
21- # Suffix to add to the grammar
22- # prefix: '<tool_call>\n'
23- # Force parallel calls in the grammar
24- # parallel_calls: true
25-
26- return_name_in_function_response : true
27- # Without grammar uncomment the lines below
28- # Warning: this is relying only on the capability of the
29- # LLM model to generate the correct function call.
30- json_regex_match :
31- - " (?s)<tool_call>(.*?)</tool_call>"
32- - " (?s)<tool_call>(.*?)"
33- replace_llm_results :
34- # Drop the scratchpad content from responses
35- - key : " (?s)<scratchpad>.*</scratchpad>"
36- value : " "
37- replace_function_results :
38- # Replace everything that is not JSON array or object
39- #
40- - key : ' (?s)^[^{\[]*'
41- value : " "
42- - key : ' (?s)[^}\]]*$'
43- value : " "
44- - key : " '([^']*?)'"
45- value : " _DQUOTE_${1}_DQUOTE_"
46- - key : ' \\"'
47- value : " __TEMP_QUOTE__"
48- - key : " \' "
49- value : " '"
50- - key : " _DQUOTE_"
51- value : ' "'
52- - key : " __TEMP_QUOTE__"
53- value : ' "'
54- # Drop the scratchpad content from responses
55- - key : " (?s)<scratchpad>.*</scratchpad>"
56- value : " "
57-
5+ no_mixed_free_string : true
6+ schema_type : llama3.1 # or JSON is supported too (json)
7+ response_regex :
8+ - <function=(?P<name>\w+)>(?P<arguments>.*)</function>
9+ mmap : true
10+ name : gpt-4
11+ parameters :
12+ model : Hermes-3-Llama-3.2-3B-Q4_K_M.gguf
13+ stopwords :
14+ - <|im_end|>
15+ - <dummy32000>
16+ - <|eot_id|>
17+ - <|end_of_text|>
5818template :
5919 chat : |
60- {{.Input -}}
61- <|im_start|>assistant
20+ <|begin_of_text|><|start_header_id|>system<|end_header_id|>
21+ You are a helpful assistant<|eot_id|><|start_header_id|>user<|end_header_id|>
22+ {{.Input }}
23+ <|start_header_id|>assistant<|end_header_id|>
6224 chat_message : |
63- <|im_start|>{{if eq .RoleName "assistant"}}assistant{{else if eq .RoleName "system"}}system{{else if eq .RoleName "tool"}}tool{{else if eq .RoleName "user"}}user{{end}}
64- {{- if .FunctionCall }}
65- <tool_call>
66- {{- else if eq .RoleName "tool" }}
67- <tool_response>
68- {{- end }}
69- {{- if .Content}}
70- {{.Content }}
71- {{- end }}
72- {{- if .FunctionCall}}
73- {{toJson .FunctionCall}}
74- {{- end }}
75- {{- if .FunctionCall }}
76- </tool_call>
77- {{- else if eq .RoleName "tool" }}
78- </tool_response>
79- {{- end }}<|im_end|>
25+ <|start_header_id|>{{if eq .RoleName "assistant"}}assistant{{else if eq .RoleName "system"}}system{{else if eq .RoleName "tool"}}tool{{else if eq .RoleName "user"}}user{{end}}<|end_header_id|>
26+ {{ if .FunctionCall -}}
27+ {{ else if eq .RoleName "tool" -}}
28+ The Function was executed and the response was:
29+ {{ end -}}
30+ {{ if .Content -}}
31+ {{.Content -}}
32+ {{ else if .FunctionCall -}}
33+ {{ range .FunctionCall }}
34+ [{{.FunctionCall.Name}}({{.FunctionCall.Arguments}})]
35+ {{ end }}
36+ {{ end -}}
37+ <|eot_id|>
8038 completion : |
8139 {{.Input}}
82- function : |-
83- <|im_start|>system
84- You are a function calling AI model.
85- Here are the available tools:
86- <tools>
87- {{range .Functions}}
88- {'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }}
89- {{end}}
90- </tools>
91- You should call the tools provided to you sequentially
92- Please use <scratchpad> XML tags to record your reasoning and planning before you call the functions as follows:
93- <scratchpad>
94- {step-by-step reasoning and plan in bullet points}
95- </scratchpad>
96- For each function call return a json object with function name and arguments within <tool_call> XML tags as follows:
97- <tool_call>
98- {"arguments": <args-dict>, "name": <function-name>}
99- </tool_call><|im_end|>
100- {{.Input -}}
101- <|im_start|>assistant
40+ function : |
41+ <|start_header_id|>system<|end_header_id|>
42+ You are an expert in composing functions. You are given a question and a set of possible functions.
43+ Based on the question, you will need to make one or more function/tool calls to achieve the purpose.
44+ If none of the functions can be used, point it out. If the given question lacks the parameters required by the function, also point it out. You should only return the function call in tools call sections.
45+ If you decide to invoke any of the function(s), you MUST put it in the format as follows:
46+ [func_name1(params_name1=params_value1,params_name2=params_value2,...),func_name2(params_name1=params_value1,params_name2=params_value2,...)]
47+ You SHOULD NOT include any other text in the response.
48+ Here is a list of functions in JSON format that you can invoke.
49+ {{toJson .Functions}}
50+ <|eot_id|><|start_header_id|>user<|end_header_id|>
51+ {{.Input}}
52+ <|eot_id|><|start_header_id|>assistant<|end_header_id|>
53+
54+ download_files :
55+ - filename : Hermes-3-Llama-3.2-3B-Q4_K_M.gguf
56+ sha256 : 2e220a14ba4328fee38cf36c2c068261560f999fadb5725ce5c6d977cb5126b5
57+ uri : huggingface://bartowski/Hermes-3-Llama-3.2-3B-GGUF/Hermes-3-Llama-3.2-3B-Q4_K_M.gguf
0 commit comments