File size: 3,452 Bytes
84ed4f8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
{
"add_bos_token": true,
"add_eos_token": false,
"add_prefix_space": null,
"added_tokens_decoder": {
"0": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "</s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
}
},
"additional_special_tokens": [
"<s>",
"</s>",
"</s>"
],
"bos_token": "<s>",
"chat_template": "{%- set system_message_present = messages | selectattr('role', 'equalto', 'system') | list -%}{%- if not system_message_present -%}{%- set messages = [{ \"content\": \"You are an AI agent acting as a human assistant.\", \"role\": \"system\" }] + messages -%}{%- endif -%}{%- for message in messages -%}<|{{ message.role }}|>{{ '\n' }}{%- if message.role == 'system' -%}{{ message.content }}{%- if tools and tools | length > 0 -%}{{ '\n\n' }}You are aware of the following tools in your environment:{{ '\n' }}{\n \"tools\": [{{ '\n' }}{%- for tool in tools -%}{{ ' ' }}{\n \"function\": {\n \"description\": \"{{ tool.function.description }}\",{{ '\n' }} \"name\": \"{{ tool.function.name }}\",{{ '\n' }} \"parameters\": {{ tool.function.parameters | tojson }}{{ '\n' }} },{{ '\n' }} \"type\": \"{{ tool.type }}\"{{ '\n' }} }{%- if not loop.last -%},{%- endif -%}{{ '\n' }}{%- endfor -%}{{ ' ' }}]{{ '\n' }}}{{ '\n\n' }}If you would like to suggest one or more tool calls, please respond in the following format:{{ '\n' }}{\n \"finish_reason\": \"tool_calls\",{{ '\n' }} \"tool_calls\": [{{ '\n' }}{{ ' ' }}{\n \"arguments\": \"{\\\"parameter_name\\\": \\\"parameter_value\\\"}\",{{ '\n' }} \"id\": \"call_id\",{{ '\n' }} \"name\": \"tool_name\"{{ '\n' }} }{{ '\n' }} ]{{ '\n' }}}{%- endif -%}{{ eos_token }}{{ '\n' }}{%- endif -%}{%- if message.role == 'user' -%}{{ message.content }}{{ eos_token }}{{ '\n' }}{%- endif -%}{%- if message.role == 'assistant' -%}{% generation %}{%- if message.tool_calls and message.tool_calls | length > 0 -%}{\n \"finish_reason\": \"tool_calls\",{{ '\n' }} \"tool_calls\": [{{ '\n' }}{%- for tool_call in message.tool_calls -%}{{ ' ' }}{\n \"arguments\": {{ tool_call.function.arguments | tojson }},{{ '\n' }} \"id\": \"{{ tool_call.id }}\",{{ '\n' }} \"name\": \"{{ tool_call.function.name }}\"{{ '\n' }} }{%- if not loop.last -%},{%- endif -%}{{ '\n' }}{%- endfor -%}{{ ' ' }}]{{ '\n' }}}{%- else -%}{{ message.content }}{%- endif -%}{% endgeneration %}{{ eos_token }}{{ '\n' }}{%- endif -%}{%- if message.role == 'tool' -%}{\n \"content\": {{ message.content | tojson }},{{ '\n' }} \"name\": \"{{ message.name }}\",{{ '\n' }} \"tool_call_id\": \"{{ message.tool_call_id }}\"{{ '\n' }}}{{ eos_token }}{{ '\n' }}{%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%}{{ '<|assistant|>\n' }}{%- endif -%}",
"clean_up_tokenization_spaces": false,
"eos_token": "</s>",
"legacy": false,
"model_max_length": 2048,
"pad_token": "</s>",
"padding_side": "right",
"sp_model_kwargs": {},
"tokenizer_class": "LlamaTokenizer",
"unk_token": "<unk>",
"use_default_system_prompt": false
}
|