From 0a32c38317bbbe53271b8342ed9e7b4dbb3e9e9b Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 20 Mar 2025 09:32:21 +0100 Subject: [PATCH] chore(model gallery): add basic function template for gemma Signed-off-by: Ettore Di Giacinto --- gallery/gemma.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gallery/gemma.yaml b/gallery/gemma.yaml index bff7d614..812e254a 100644 --- a/gallery/gemma.yaml +++ b/gallery/gemma.yaml @@ -7,14 +7,32 @@ config_file: | template: chat_message: |- {{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 -}} chat: | {{.Input }} model completion: | {{.Input}} + function: | + 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 + + {{.Input -}} + model stopwords: - '<|im_end|>' - ''