mirror of
https://github.com/mudler/LocalAI
synced 2026-05-24 09:28:23 +00:00
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
---
|
|
name: "harmony"
|
|
|
|
config_file: |
|
|
mmap: true
|
|
backend: "llama-cpp"
|
|
template:
|
|
chat_message: |
|
|
<|start|>{{ if .FunctionCall -}}functions.{{ .FunctionCall.Name }} to=assistant{{ else if eq .RoleName "assistant"}}<|channel|>final<|message|>{{else}}{{ .RoleName }}{{end}}<|message|>
|
|
{{ if .Content -}}
|
|
{{.Content }}
|
|
{{ end -}}
|
|
{{ if .FunctionCall -}}
|
|
{{toJson .FunctionCall}}
|
|
{{ end -}}<|end|>
|
|
function: |
|
|
<|im_start|>system
|
|
You are a function calling AI model. You are provided with functions to execute. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. Here are the available tools:
|
|
|
|
<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.
|
|
Knowledge cutoff: 2024-06
|
|
Current date: {{ now | date }}
|
|
|
|
Reasoning: medium
|
|
|
|
# Tools
|
|
|
|
## functions
|
|
|
|
namespace functions {
|
|
{{-range .Functions}}
|
|
{{if .Description }}
|
|
// {{ .Description }}
|
|
{{- end }}
|
|
{{- if and .Parameters.Properties (gt (len .Parameters.Properties) 0) }}
|
|
type {{ .Name }} = (_: {
|
|
{{- range $name, $prop := .Parameters.Properties }}
|
|
{{- if $prop.Description }}
|
|
// {{ $prop.Description }}
|
|
{{- end }}
|
|
{{ $name }}: {{ if gt (len $prop.Type) 1 }}{{ range $i, $t := $prop.Type }}{{ if $i }} | {{ end }}{{ $t }}{{ end }}{{ else }}{{ index $prop.Type 0 }}{{ end }},
|
|
{{- end }}
|
|
}) => any;
|
|
{{- else }}
|
|
type {{ .Function.Name }} = () => any;
|
|
{{- end }}
|
|
{{- end }}{{/* end of range .Functions */}}
|
|
} // namespace functions
|
|
|
|
# Instructions
|
|
|
|
<|end|>
|
|
{{.Input -}}
|
|
<|start|>assistant
|
|
chat: |
|
|
<|start|>system<|message|>You are ChatGPT, a large language model trained by OpenAI.
|
|
Knowledge cutoff: 2024-06
|
|
Current date: {{ now | date }}
|
|
|
|
Reasoning: medium
|
|
|
|
# Instructions
|
|
|
|
<|end|>
|
|
{{.Input -}}
|
|
<|im_start|>assistant
|
|
completion: |
|
|
{{.Input}}
|
|
context_size: 8192
|
|
f16: true
|
|
stopwords:
|
|
- '<|im_end|>'
|
|
- '<dummy32000>'
|
|
- '</s>'
|
|
- '<|endoftext|>'
|
|
- '<|return|>'
|