name: gpt-4 mmap: false f16: false parameters: model: huggingface://NousResearch/Hermes-2-Pro-Llama-3-8B-GGUF/Hermes-2-Pro-Llama-3-8B-Q4_K_M.gguf stopwords: - "<|im_end|>" - "" - "" - "<|eot_id|>" - "<|end_of_text|>" function: # disable injecting the "answer" tool disable_no_action: true grammar: # This allows the grammar to also return messages mixed_mode: true # Suffix to add to the grammar #prefix: '\n' # Force parallel calls in the grammar # parallel_calls: true return_name_in_function_response: true # Without grammar uncomment the lines below # Warning: this is relying only on the capability of the # LLM model to generate the correct function call. json_regex_match: - "(?s)(.*?)" - "(?s)(.*?)" replace_llm_results: # Drop the scratchpad content from responses - key: "(?s).*" value: "" replace_function_results: # Replace everything that is not JSON array or object # - key: '(?s)^[^{\[]*' value: "" - key: '(?s)[^}\]]*$' value: "" - key: "'([^']*?)'" value: "_DQUOTE_${1}_DQUOTE_" - key: '\\"' value: "__TEMP_QUOTE__" - key: "\'" value: "'" - key: "_DQUOTE_" value: '"' - key: "__TEMP_QUOTE__" value: '"' # Drop the scratchpad content from responses - key: "(?s).*" value: "" template: chat: | {{.Input -}} <|im_start|>assistant chat_message: | <|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}} {{- if .FunctionCall }} {{- else if eq .RoleName "tool" }} {{- end }} {{- if .Content}} {{.Content }} {{- end }} {{- if .FunctionCall}} {{toJson .FunctionCall}} {{- end }} {{- if .FunctionCall }} {{- else if eq .RoleName "tool" }} {{- end }}<|im_end|> completion: | {{.Input}} function: |- <|im_start|>system You are a function calling AI model. Here are the available tools: {{range .Functions}} {'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }} {{end}} You should call the tools provided to you sequentially Please use XML tags to record your reasoning and planning before you call the functions as follows: {step-by-step reasoning and plan in bullet points} For each function call return a json object with function name and arguments within XML tags as follows: {"arguments": , "name": } <|im_end|> {{.Input -}} <|im_start|>assistant