Upload folder using huggingface_hub
Browse files- chat_template.jinja +1 -1
- tokenizer_config.json +1 -1
chat_template.jinja
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
|
8 |
## {{ function.name }}
|
9 |
|
10 |
-
{{ function | tojson(indent=4
|
11 |
在调用上述函数时,请使用 Json 格式表示调用的参数。
|
12 |
{%- endfor %}
|
13 |
{%- endif -%}
|
|
|
7 |
|
8 |
## {{ function.name }}
|
9 |
|
10 |
+
{{ function | tojson(indent=4)|string }}
|
11 |
在调用上述函数时,请使用 Json 格式表示调用的参数。
|
12 |
{%- endfor %}
|
13 |
{%- endif -%}
|
tokenizer_config.json
CHANGED
@@ -144,5 +144,5 @@
|
|
144 |
"remove_space": false,
|
145 |
"tokenizer_class": "PreTrainedTokenizer",
|
146 |
"unk_token": null,
|
147 |
-
"chat_template": "[gMASK]<sop>\n{%- if tools -%}\n<|system|>\n# 可用工具\n{% for tool in tools %}\n {%- set function = tool.function if tool.get(\"function\") else tool %}\n\n## {{ function.name }}\n\n{{ function | tojson(indent=4
|
148 |
}
|
|
|
144 |
"remove_space": false,
|
145 |
"tokenizer_class": "PreTrainedTokenizer",
|
146 |
"unk_token": null,
|
147 |
+
"chat_template": "[gMASK]<sop>\n{%- if tools -%}\n<|system|>\n# 可用工具\n{% for tool in tools %}\n {%- set function = tool.function if tool.get(\"function\") else tool %}\n\n## {{ function.name }}\n\n{{ function | tojson(indent=4)|string }}\n在调用上述函数时,请使用 Json 格式表示调用的参数。\n{%- endfor %}\n{%- endif -%}\n\n{%- for msg in messages %}\n {%- if msg.role == 'system' %}\n<|system|>\n{{ msg.content }}\n {%- endif %}\n{%- endfor %}\n\n{%- for message in messages if message.role != 'system' %}\n {%- set role = message['role'] %}\n {%- set content = message['content'] %}\n {%- set meta = message.get(\"metadata\", \"\") %}\n\n {%- if role == 'user' %}\n<|user|>\n{{ content }}\n {%- elif role == 'assistant' and not meta %}\n<|assistant|>\n{{ content }}\n {%- elif role == 'assistant' and meta %}\n<|assistant|>{{ meta }}\n{{ content }}\n {%- elif role == 'observation' %}\n<|observation|>\n{{ content }}\n {%- endif %}\n{%- endfor %}\n{% if add_generation_prompt %}<|assistant|>{% endif %}"
|
148 |
}
|