Create localai.yaml
Browse files- localai.yaml +42 -0
localai.yaml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: llama3-functioncall
|
2 |
+
context_size: 8192
|
3 |
+
parameters:
|
4 |
+
model: huggingface://mudler/LocalAI-Llama3-8b-Function-Call-v0.2-GGUF/LocalAI-Llama3-8b-Function-Call-v0.2-q4_k_m.bin
|
5 |
+
stopwords:
|
6 |
+
- <|im_end|>
|
7 |
+
- <dummy32000>
|
8 |
+
- <|eot_id|>
|
9 |
+
- <|end_of_text|>
|
10 |
+
|
11 |
+
function:
|
12 |
+
return_name_in_function_response: true
|
13 |
+
template:
|
14 |
+
chat: |
|
15 |
+
<|begin_of_text|>{{.Input }}
|
16 |
+
<|start_header_id|>assistant<|end_header_id|>
|
17 |
+
chat_message: |-
|
18 |
+
<|start_header_id|>{{if .FunctionCall}}assistant{{ else if eq .RoleName "assistant"}}assistant{{else if eq .RoleName "system"}}system{{else if eq .RoleName "tool"}}tool_response{{else if eq .RoleName "user"}}user{{end}}<|end_header_id|>
|
19 |
+
|
20 |
+
{{ if .Content -}}
|
21 |
+
{{.Content -}}
|
22 |
+
{{ else if .FunctionCall -}}
|
23 |
+
{ "name": "{{ index .FunctionCall "name"}}", "arguments": {{index .FunctionCall "arguments"}} }{{ end -}}<|eot_id|>
|
24 |
+
completion: |
|
25 |
+
{{.Input}}
|
26 |
+
function: |-
|
27 |
+
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
|
28 |
+
{{$tools:=""}}
|
29 |
+
You have access to the following tools:
|
30 |
+
{{range .Functions -}}
|
31 |
+
> Tool Name: {{.Name}}
|
32 |
+
{{ $tools = print $tools .Name " " -}}
|
33 |
+
Tool Description: {{.Description}}
|
34 |
+
Tool Args:
|
35 |
+
{{ range $key,$val:= (index .Parameters "properties") -}}
|
36 |
+
- {{$key}} ({{ index $val "type"}}): {{index $val "description" }}
|
37 |
+
{{ end -}}
|
38 |
+
{{ end -}}Answer only in JSON by using the following format if using a tool:
|
39 |
+
{"name": "tool_name", "arguments": { "arg_1": "value" } }
|
40 |
+
Function must be one of [{{$tools}}]).<|eot_id|>
|
41 |
+
{{.Input}}
|
42 |
+
<|start_header_id|>assistant<|end_header_id|>
|