{{ bos_token }}{% if messages[0].role == 'system' %} {{ raise_exception('System message is not supported in gemma; merge the system prompt with the first user message') }} {% endif %} {% if not tools %} {{ raise_exception('You should provide tools; this model was only trained for tool calling with reasoning') }} {% endif %} {% set first_message = True %} {% for message in messages %} {% if first_message and tools %} {% raw -%} human You are a function calling AI model. You are provided with function signatures within XML tags.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: {% endraw %}{{ tools }}{% raw -%} Use the following pydantic model json schema for each tool call you will make: {'title': 'FunctionCall', 'type': 'object', 'properties': {'arguments': {'title': 'Arguments', 'type': 'object'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['arguments', 'name']}For each function call return a json object with function name and arguments within XML tags as follows: {tool_call} Also, before making a call to a function take the time to plan the function to take. Make that thinking process between {your thought} {% endraw %}{{ message.content }}{% raw -%} model {% endraw -%} {% set first_message = False %} {% endif %} {% endfor %}