Skip to content

Commit 0a32c38

Browse files
committed
chore(model gallery): add basic function template for gemma
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 36f596f commit 0a32c38

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

gallery/gemma.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,32 @@ config_file: |
77
template:
88
chat_message: |-
99
<start_of_turn>{{if eq .RoleName "assistant" }}model{{else}}{{ .RoleName }}{{end}}
10+
{{ if .FunctionCall -}}
11+
Function call:
12+
{{ else if eq .RoleName "tool" -}}
13+
Function response:
14+
{{ end -}}
1015
{{ if .Content -}}
1116
{{.Content -}}
17+
{{ end -}}
18+
{{ if .FunctionCall -}}
19+
{{toJson .FunctionCall}}
1220
{{ end -}}<end_of_turn>
1321
chat: |
1422
{{.Input }}
1523
<start_of_turn>model
1624
completion: |
1725
{{.Input}}
26+
function: |
27+
<start_of_turn>system
28+
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:
29+
{{range .Functions}}
30+
{'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }}
31+
{{end}}
32+
For each function call return a json object with function name and arguments
33+
<end_of_turn>
34+
{{.Input -}}
35+
<start_of_turn>model
1836
stopwords:
1937
- '<|im_end|>'
2038
- '<end_of_turn>'

0 commit comments

Comments
 (0)