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
{% if messages[0]['role'] == 'system' %} {% set loop_messages = messages[1:] %} {% set system_message = messages[0]['content'] %} {% elif USE_DEFAULT_PROMPT == true and not '<>' in messages[0]['content'] %} {% set loop_messages = messages %} {% set system_message = 'DEFAULT_SYSTEM_MESSAGE' %} {% else %} {% set loop_messages = messages %} {% set system_message = false %} {% endif %} {% for message in loop_messages %} {% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %} {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }} {% endif %} {% if loop.index0 == 0 and system_message != false %} {% set content = '<>\n' + system_message + '\n<>\n\n' + message['content'] %} {% else %} {% set content = message['content'] %} {% endif %} {% if message['role'] == 'user' %} {{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }} {% elif message['role'] == 'system' %} {{ '<>\n' + content.strip() + '\n<>\n\n' }} {% elif message['role'] == 'assistant' %} {{ ' ' + content.strip() + ' ' + eos_token }} {% endif %} {% endfor %} [TemplateError{severity=FATAL, reason=SYNTAX_ERROR, item=OTHER, message='java.beans.IntrospectionException: Method not found: getChars', fieldName='bos_token + '[INST] ' + content.strip() + ' [/INST]'', lineno=21, startPosition=-1, scopeDepth=2, category=UNKNOWN, categoryErrors=null}, TemplateError{severity=FATAL, reason=SYNTAX_ERROR, item=OTHER, message='java.beans.IntrospectionException: Method not found: getChars', fieldName='' ' + content.strip() + ' ' + eos_token', lineno=25, startPosition=-1, scopeDepth=2, category=UNKNOWN, categoryErrors=null}]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
{% if messages[0]['role'] == 'system' %}
{% set loop_messages = messages[1:] %}
{% set system_message = messages[0]['content'] %}
{% elif USE_DEFAULT_PROMPT == true and not '<>' in messages[0]['content'] %}
{% set loop_messages = messages %}
{% set system_message = 'DEFAULT_SYSTEM_MESSAGE' %}
{% else %}
{% set loop_messages = messages %}
{% set system_message = false %}
{% endif %}
{% for message in loop_messages %}
{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}
{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}
{% endif %}
{% if loop.index0 == 0 and system_message != false %}
{% set content = '<>\n' + system_message + '\n<>\n\n' + message['content'] %}
{% else %}
{% set content = message['content'] %}
{% endif %}
{% if message['role'] == 'user' %}
{{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }}
{% elif message['role'] == 'system' %}
{{ '<>\n' + content.strip() + '\n<>\n\n' }}
{% elif message['role'] == 'assistant' %}
{{ ' ' + content.strip() + ' ' + eos_token }}
{% endif %}
{% endfor %}
[TemplateError{severity=FATAL, reason=SYNTAX_ERROR, item=OTHER, message='java.beans.IntrospectionException: Method not found: getChars', fieldName='bos_token + '[INST] ' + content.strip() + ' [/INST]'', lineno=21, startPosition=-1, scopeDepth=2, category=UNKNOWN, categoryErrors=null}, TemplateError{severity=FATAL, reason=SYNTAX_ERROR, item=OTHER, message='java.beans.IntrospectionException: Method not found: getChars', fieldName='' ' + content.strip() + ' ' + eos_token', lineno=25, startPosition=-1, scopeDepth=2, category=UNKNOWN, categoryErrors=null}]
The text was updated successfully, but these errors were encountered: