We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + ' ' + message['content'] | trim + '<end_of_turn> ' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model '}}{% endif %}
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + ' ' + message['content'] | trim + '<end_of_turn> ' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model ' }}{% endif %}
Download and use the model
The text was updated successfully, but these errors were encountered:
Oh, once the jinja template is fixed, the error message related to the system message also vanishes.
Sorry, something went wrong.
{{ bos_token }} {% if messages[0]['role'] == 'system' %} {{ raise_exception('System role not supported') }} {% endif %} {% for message in messages %} {% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %} {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }} {% endif %} {% if (message['role'] == 'assistant') %} {% set role = 'model' %} {% else %}{% set role = message['role'] %} {% endif %} {{ '<start_of_turn>' + role + '\n' + message['content'] | trim + '<end_of_turn>\n' }} {% endfor %} {% if add_generation_prompt %} {{'<start_of_turn>model\n' }} {% endif %}
No branches or pull requests
Bug Report
Default Jinja template
Fixed Jinja template:
Steps to Reproduce
Download and use the model
Expected Behavior
Your Environment
The text was updated successfully, but these errors were encountered: