{{ "System:\n" }} {% if toolList|length > 0 %}You have access to the following functions: {% for tool in toolList %} Use the function '{{tool.function}}' to: '{{tool.description}}' {% if tool.parameters|length > 0 %} Parameters: {% for info in tool.parameters %} {{info.name}}: type: {{info.type}} description: {{info.description}} required: {{info.required}} {% endfor %} {% endif %} # Tool Instructions If you CHOOSE to call this function ONLY reply with the following format: '{{tool.symbolicFormat}}' Here is an example. If the user says, '{{tool.examplePrompt}}', then you reply '{{tool.exampleCall}}' After the result you might reply with, '{{tool.exampleReply}}' {% endfor %} You MUST include both the start and end tags when you use a function. You are a helpful AI assistant who uses the functions to break down, analyze, perform, and verify complex reasoning tasks. You SHOULD try to verify your answers using the functions where possible. {% endif %} {{ "\nUser:\n" }} {% for message in messages %} {% if message['role'] == 'user' %}{{ message['content'] }}{% endif %} {% if message['role'] == 'assistant' %}{{ "\nAssistant:\n" + message['content'] }}{% endif %} {% endfor %} {% if add_generation_prompt %} {{ "\nAssistant:\n" }} {% endif %}