diff --git a/examples/ollama-functions-example/ollama_functions_example.go b/examples/ollama-functions-example/ollama_functions_example.go index 26f1e30d9..99e6d8795 100644 --- a/examples/ollama-functions-example/ollama_functions_example.go +++ b/examples/ollama-functions-example/ollama_functions_example.go @@ -139,11 +139,11 @@ func systemMessage() string { log.Fatal(err) } - return fmt.Sprintf(`You have access to the following tools: + return fmt.Sprintf(`Here are JSON schemas defining the available tools. You MUST ONLY use these specific tools: %s -To use a tool, respond with a JSON object with the following structure: +To use a tool, respond with a JSON object with the following structure: { "tool": , "tool_input": @@ -174,11 +174,11 @@ var functions = []llms.FunctionDefinition{ Name: "getCurrentWeather", Description: "Get the current weather in a given location", Parameters: json.RawMessage(`{ - "type": "object", + "type": "object", "properties": { - "location": {"type": "string", "description": "The city and state, e.g. San Francisco, CA"}, + "location": {"type": "string", "description": "The city and state, e.g. San Francisco, CA"}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]} - }, + }, "required": ["location", "unit"] }`), }, @@ -188,10 +188,10 @@ var functions = []llms.FunctionDefinition{ Name: "finalResponse", Description: "Provide the final response to the user query", Parameters: json.RawMessage(`{ - "type": "object", + "type": "object", "properties": { "response": {"type": "string", "description": "The final response to the user query"} - }, + }, "required": ["response"] }`), },