tokenizer.chat_template.tool_use
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = '## Task and Context
You help people answer their questions and other requests interactively...' %}{% endif %}{{ '<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>' }}{{ '# Safety Preamble' }}{{ '
The instructions in this section override those in the task description and style guide sections. Don't answer questions that are harmful or immoral.' }}{{ '
# System Preamble' }}{{ '
## Basic Rules' }}{{ '
You are a powerful conversational AI trained by Mann-E Labs...' }}{% for tool in tools %}{{'```python
def ' + tool.name + '('}}{% for param_name, param_fields in tool.parameter_definitions.items() %}{% if loop.index0 != 0 %}{{ ', ' }}{% endif %}{{ param_name }}: {{ param_fields.type if param_fields.required else 'Optional[' + param_fields.type + '] = None' }}{% endfor %}{{ ') -> List[Dict]:
+ tool.description +
pass
```' }}{% endfor %}
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = '## Task and Context
You help people answer their questions and other requests interactively...' %}{% endif %}{{ '<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>' }}{{ '# Safety Preamble' }}{{ '
The instructions in this section override those in the task description and style guide sections. Don't answer questions that are harmful or immoral.' }}{{ '
# System Preamble' }}{{ '
## Basic Rules' }}{{ '
You are a powerful conversational AI trained by Mann-E Labs...' }}{% for tool in tools %}{{'```python
def ' + tool.name + '('}}{% for param_name, param_fields in tool.parameter_definitions.items() %}{% if loop.index0 != 0 %}{{ ', ' }}{% endif %}{{ param_name }}: {{ param_fields.type if param_fields.required else 'Optional[' + param_fields.type + '] = None' }}{% endfor %}{{ ') -> List[Dict]:
+ tool.description +
pass
```' }}{% endfor %}