chore(model gallery): add basic function template for gemma

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2025-03-20 09:32:21 +01:00
parent 36f596f260
commit 0a32c38317

@ -7,14 +7,32 @@ config_file: |
template:
chat_message: |-
<start_of_turn>{{if eq .RoleName "assistant" }}model{{else}}{{ .RoleName }}{{end}}
{{ if .FunctionCall -}}
Function call:
{{ else if eq .RoleName "tool" -}}
Function response:
{{ end -}}
{{ if .Content -}}
{{.Content -}}
{{ end -}}
{{ if .FunctionCall -}}
{{toJson .FunctionCall}}
{{ end -}}<end_of_turn>
chat: |
{{.Input }}
<start_of_turn>model
completion: |
{{.Input}}
function: |
<start_of_turn>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:
{{range .Functions}}
{'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }}
{{end}}
For each function call return a json object with function name and arguments
<end_of_turn>
{{.Input -}}
<start_of_turn>model
stopwords:
- '<|im_end|>'
- '<end_of_turn>'