Update tokenizer_config.json
Browse files- tokenizer_config.json +1 -1
tokenizer_config.json
CHANGED
|
@@ -2057,7 +2057,7 @@
|
|
| 2057 |
},
|
| 2058 |
{
|
| 2059 |
"name": "tool_use",
|
| 2060 |
-
"template": "{{bos_token}}{% set loop_messages = messages %}{% for message in loop_messages %}{%set message_content = message['content'] %}{% if loop.last and message['role'] == 'user' %}{{'<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'}}{{'\nGiven the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt. \nRespond in the format ```json\n{\"tool_name\": function name, \"parameters\": dictionary of argument name and its value}\n```\n Do not use variables, make sure to wrap your answer in a json code block using backticks before and after the JSON. Refuse to call tools for queries that could be considered harmful or not appropriate for all audience: use directly_answer in that case.'}}{{'\n\n## Available Tools\nHere is a list of tools that you have available to you:\n\n'}}{% for tool in tools %}{% if loop.index0 != 0 %}{{ '\n\n'}}{% endif %}{{'```python\ndef ' + tool.name + '('}}{% for param_name, param_fields in tool.parameter_definitions.items() %}{% if loop.index0 != 0 %}{{ ', '}}{% endif %}{{param_name}}: {% if not param_fields.required %}{{'Optional[' + param_fields.type + '] = None'}}{% else %}{{ param_fields.type }}{% endif %}{% endfor %}{{ ') -> List[Dict]:\n \"\"\"'}}{{ tool.description }}{% if tool.parameter_definitions|length != 0 %}{{ '\n\n Args:\n '}}{% for param_name, param_fields in tool.parameter_definitions.items() %}{% if loop.index0 != 0 %}{{ '\n ' }}{% endif %}{{ param_name + ' ('}}{% if not param_fields.required %}{{'Optional[' + param_fields.type + ']'}}{% else %}{{ param_fields.type }}{% endif %}{{ '): ' + param_fields.description }}{% endfor %}{% endif %}{{ '\n \"\"\"\n pass\n```' }}{% endfor %}{{'Question: '}}{{message_content + '<|eot_id|>'}}{% else %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message_content | trim + '<|eot_id|>' %}{{ content }}{% endif %}{% endfor %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}"
|
| 2061 |
}
|
| 2062 |
],
|
| 2063 |
"clean_up_tokenization_spaces": true,
|
|
|
|
| 2057 |
},
|
| 2058 |
{
|
| 2059 |
"name": "tool_use",
|
| 2060 |
+
"template": "{{bos_token}}{% set loop_messages = messages %}{% for message in loop_messages %}{%set message_content = message['content'] %}{% if loop.last and message['role'] == 'user' %}{{'<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'}}{{'\nGiven the following functions, please respond with a JSON for a function call with its proper arguments that best answers the given prompt. \nRespond in the format ```json\n{\"tool_name\": function name, \"parameters\": dictionary of argument name and its value}\n```\n Do not use variables, make sure to wrap your answer in a json code block using backticks before and after the JSON. Refuse to call tools for queries that could be considered harmful or not appropriate for all audience: use directly_answer in that case. Only try to call a single tool at a time.'}}{{'\n\n## Available Tools\nHere is a list of tools that you have available to you:\n\n'}}{% for tool in tools %}{% if loop.index0 != 0 %}{{ '\n\n'}}{% endif %}{{'```python\ndef ' + tool.name + '('}}{% for param_name, param_fields in tool.parameter_definitions.items() %}{% if loop.index0 != 0 %}{{ ', '}}{% endif %}{{param_name}}: {% if not param_fields.required %}{{'Optional[' + param_fields.type + '] = None'}}{% else %}{{ param_fields.type }}{% endif %}{% endfor %}{{ ') -> List[Dict]:\n \"\"\"'}}{{ tool.description }}{% if tool.parameter_definitions|length != 0 %}{{ '\n\n Args:\n '}}{% for param_name, param_fields in tool.parameter_definitions.items() %}{% if loop.index0 != 0 %}{{ '\n ' }}{% endif %}{{ param_name + ' ('}}{% if not param_fields.required %}{{'Optional[' + param_fields.type + ']'}}{% else %}{{ param_fields.type }}{% endif %}{{ '): ' + param_fields.description }}{% endfor %}{% endif %}{{ '\n \"\"\"\n pass\n```' }}{% endfor %}{{'Question: '}}{{message_content + '<|eot_id|>'}}{% else %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message_content | trim + '<|eot_id|>' %}{{ content }}{% endif %}{% endfor %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}"
|
| 2061 |
}
|
| 2062 |
],
|
| 2063 |
"clean_up_tokenization_spaces": true,
|