mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-24 06:46:39 +00:00
fix(hermes-2-pro-mistral): correct dashes in template to suppress newlines (#1966)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
74492a81c7
commit
f36d86ba6d
@ -6,12 +6,14 @@ parameters:
|
|||||||
template:
|
template:
|
||||||
chat_message: |
|
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}}
|
<|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 }}<tool_call>{{end}}
|
{{- if .FunctionCall }}<tool_call>{{end}}
|
||||||
{{ if eq .RoleName "tool" }}<tool_result>{{end}}
|
{{- if eq .RoleName "tool" }}<tool_result>{{end }}
|
||||||
{{if .Content}}{{.Content}}{{end}}
|
{{- if .Content}}
|
||||||
{{if .FunctionCall}}{{toJson .FunctionCall}}{{end}}
|
{{.Content}}
|
||||||
{{ if .FunctionCall }}</tool_call>{{end}}
|
{{- end }}
|
||||||
{{ if eq .RoleName "tool" }}</tool_result>{{end}}
|
{{- if .FunctionCall}}{{toJson .FunctionCall}}{{end }}
|
||||||
|
{{- if .FunctionCall }}</tool_call>{{end }}
|
||||||
|
{{- if eq .RoleName "tool" }}</tool_result>{{end }}
|
||||||
<|im_end|>
|
<|im_end|>
|
||||||
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
||||||
function: |
|
function: |
|
||||||
@ -27,12 +29,13 @@ template:
|
|||||||
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
||||||
<tool_call>
|
<tool_call>
|
||||||
{'arguments': <args-dict>, 'name': <function-name>}
|
{'arguments': <args-dict>, 'name': <function-name>}
|
||||||
</tool_call><|im_end|>
|
</tool_call>
|
||||||
{{.Input}}
|
<|im_end|>
|
||||||
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
<tool_call>
|
<tool_call>
|
||||||
chat: |
|
chat: |
|
||||||
{{.Input}}
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
completion: |
|
completion: |
|
||||||
{{.Input}}
|
{{.Input}}
|
||||||
|
@ -6,12 +6,14 @@ parameters:
|
|||||||
template:
|
template:
|
||||||
chat_message: |
|
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}}
|
<|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 }}<tool_call>{{end}}
|
{{- if .FunctionCall }}<tool_call>{{end}}
|
||||||
{{ if eq .RoleName "tool" }}<tool_result>{{end}}
|
{{- if eq .RoleName "tool" }}<tool_result>{{end }}
|
||||||
{{if .Content}}{{.Content}}{{end}}
|
{{- if .Content}}
|
||||||
{{if .FunctionCall}}{{toJson .FunctionCall}}{{end}}
|
{{.Content}}
|
||||||
{{ if .FunctionCall }}</tool_call>{{end}}
|
{{- end }}
|
||||||
{{ if eq .RoleName "tool" }}</tool_result>{{end}}
|
{{- if .FunctionCall}}{{toJson .FunctionCall}}{{end }}
|
||||||
|
{{- if .FunctionCall }}</tool_call>{{end }}
|
||||||
|
{{- if eq .RoleName "tool" }}</tool_result>{{end }}
|
||||||
<|im_end|>
|
<|im_end|>
|
||||||
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
||||||
function: |
|
function: |
|
||||||
@ -27,12 +29,13 @@ template:
|
|||||||
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
||||||
<tool_call>
|
<tool_call>
|
||||||
{'arguments': <args-dict>, 'name': <function-name>}
|
{'arguments': <args-dict>, 'name': <function-name>}
|
||||||
</tool_call><|im_end|>
|
</tool_call>
|
||||||
{{.Input}}
|
<|im_end|>
|
||||||
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
<tool_call>
|
<tool_call>
|
||||||
chat: |
|
chat: |
|
||||||
{{.Input}}
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
completion: |
|
completion: |
|
||||||
{{.Input}}
|
{{.Input}}
|
||||||
|
@ -7,12 +7,14 @@ parameters:
|
|||||||
template:
|
template:
|
||||||
chat_message: |
|
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}}
|
<|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 }}<tool_call>{{end}}
|
{{- if .FunctionCall }}<tool_call>{{end}}
|
||||||
{{ if eq .RoleName "tool" }}<tool_result>{{end}}
|
{{- if eq .RoleName "tool" }}<tool_result>{{end }}
|
||||||
{{if .Content}}{{.Content}}{{end}}
|
{{- if .Content}}
|
||||||
{{if .FunctionCall}}{{toJson .FunctionCall}}{{end}}
|
{{.Content}}
|
||||||
{{ if .FunctionCall }}</tool_call>{{end}}
|
{{- end }}
|
||||||
{{ if eq .RoleName "tool" }}</tool_result>{{end}}
|
{{- if .FunctionCall}}{{toJson .FunctionCall}}{{end }}
|
||||||
|
{{- if .FunctionCall }}</tool_call>{{end }}
|
||||||
|
{{- if eq .RoleName "tool" }}</tool_result>{{end }}
|
||||||
<|im_end|>
|
<|im_end|>
|
||||||
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
||||||
function: |
|
function: |
|
||||||
@ -28,12 +30,13 @@ template:
|
|||||||
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
||||||
<tool_call>
|
<tool_call>
|
||||||
{'arguments': <args-dict>, 'name': <function-name>}
|
{'arguments': <args-dict>, 'name': <function-name>}
|
||||||
</tool_call><|im_end|>
|
</tool_call>
|
||||||
{{.Input}}
|
<|im_end|>
|
||||||
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
<tool_call>
|
<tool_call>
|
||||||
chat: |
|
chat: |
|
||||||
{{.Input}}
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
completion: |
|
completion: |
|
||||||
{{.Input}}
|
{{.Input}}
|
||||||
|
@ -6,12 +6,14 @@ parameters:
|
|||||||
template:
|
template:
|
||||||
chat_message: |
|
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}}
|
<|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 }}<tool_call>{{end}}
|
{{- if .FunctionCall }}<tool_call>{{end}}
|
||||||
{{ if eq .RoleName "tool" }}<tool_result>{{end}}
|
{{- if eq .RoleName "tool" }}<tool_result>{{end }}
|
||||||
{{if .Content}}{{.Content}}{{end}}
|
{{- if .Content}}
|
||||||
{{if .FunctionCall}}{{toJson .FunctionCall}}{{end}}
|
{{.Content}}
|
||||||
{{ if .FunctionCall }}</tool_call>{{end}}
|
{{- end }}
|
||||||
{{ if eq .RoleName "tool" }}</tool_result>{{end}}
|
{{- if .FunctionCall}}{{toJson .FunctionCall}}{{end }}
|
||||||
|
{{- if .FunctionCall }}</tool_call>{{end }}
|
||||||
|
{{- if eq .RoleName "tool" }}</tool_result>{{end }}
|
||||||
<|im_end|>
|
<|im_end|>
|
||||||
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
# https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B-GGUF#prompt-format-for-function-calling
|
||||||
function: |
|
function: |
|
||||||
@ -27,12 +29,13 @@ template:
|
|||||||
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
||||||
<tool_call>
|
<tool_call>
|
||||||
{'arguments': <args-dict>, 'name': <function-name>}
|
{'arguments': <args-dict>, 'name': <function-name>}
|
||||||
</tool_call><|im_end|>
|
</tool_call>
|
||||||
{{.Input}}
|
<|im_end|>
|
||||||
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
<tool_call>
|
<tool_call>
|
||||||
chat: |
|
chat: |
|
||||||
{{.Input}}
|
{{.Input -}}
|
||||||
<|im_start|>assistant
|
<|im_start|>assistant
|
||||||
completion: |
|
completion: |
|
||||||
{{.Input}}
|
{{.Input}}
|
||||||
|
Loading…
Reference in New Issue
Block a user