-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
models(gallery): add LocalAI-Llama3-8b-Function-Call-v0.2-GGUF (#2355)
Signed-off-by: Ettore Di Giacinto <[email protected]>
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: localai | ||
|
||
config_file: |- | ||
context_size: 8192 | ||
stopwords: | ||
- <|im_end|> | ||
- <dummy32000> | ||
- <|eot_id|> | ||
- <|end_of_text|> | ||
function: | ||
return_name_in_function_response: true | ||
template: | ||
chat: | | ||
<|begin_of_text|>{{.Input }} | ||
<|start_header_id|>assistant<|end_header_id|> | ||
chat_message: |- | ||
<|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|> | ||
{{ if .Content -}} | ||
{{.Content -}} | ||
{{ else if .FunctionCall -}} | ||
{ "name": "{{ index .FunctionCall "name"}}", "arguments": {{index .FunctionCall "arguments"}} }{{ end -}}<|eot_id|> | ||
completion: | | ||
{{.Input}} | ||
function: |- | ||
<|begin_of_text|><|start_header_id|>system<|end_header_id|> | ||
{{$tools:=""}} | ||
You have access to the following tools: | ||
{{range .Functions -}} | ||
> Tool Name: {{.Name}} | ||
{{ $tools = print $tools .Name " " -}} | ||
Tool Description: {{.Description}} | ||
Tool Args: | ||
{{ range $key,$val:= (index .Parameters "properties") -}} | ||
- {{$key}} ({{ index $val "type"}}): {{index $val "description" }} | ||
{{ end -}} | ||
{{ end -}}Answer only in JSON by using the following format if using a tool: | ||
{"name": "tool_name", "arguments": { "arg_1": "value" } } | ||
Function must be one of [{{$tools}}]).<|eot_id|> | ||
{{.Input}} | ||
<|start_header_id|>assistant<|end_header_id|> |