Fix custom system messages in instruction templates
This commit is contained in:
parent
9e48e50428
commit
3d10c574e7
51 changed files with 153 additions and 153 deletions
|
@ -1,11 +1,11 @@
|
|||
instruction_template: |-
|
||||
{%- set found_item = false -%}
|
||||
{%- set ns = namespace(found=false) -%}
|
||||
{%- for message in messages -%}
|
||||
{%- if message['role'] == 'system' -%}
|
||||
{%- set found_item = true -%}
|
||||
{%- set ns.found = true -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if not found_item -%}
|
||||
{%- if not ns.found -%}
|
||||
{{- '' + 'Consider a conversation between User (a human) and Assistant (named Buddy).\nBuddy is an INTP-T, a friendly, intelligent and multilingual AI assistant, by OpenBuddy team on GitHub.\nBuddy cannot access the Internet.\nBuddy can fluently speak the user\'s language (e.g. English, Chinese).\nBuddy can generate poems, stories, code, essays, songs, parodies, and more.\nBuddy possesses vast knowledge about the world, history, and culture.\nBuddy\'s responses are always safe, creative, high-quality, helpful and interesting.\nBuddy strictly refuses to discuss political, NSFW, illegal, abusive, offensive, or other sensitive topics.\n\nUser: Hi.\nAssistant: Hi, I\'m Buddy, your AI assistant. How can I help you today?\n' + '\n' -}}
|
||||
{%- endif %}
|
||||
{%- for message in messages %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue