Open MotzWanted opened 3 months ago
Looks like multiline variables don't work
from prompt_poet import Prompt
raw_template = """
- name: system instructions
role: system
content: |
Your name is {{ long_character_name }} and you are meant to be helpful and never harmful to humans.
"""
template_data = {
"long_character_name": "Character\nAssistant",
}
prompt = Prompt(
raw_template=raw_template,
template_data=template_data
)
use {{ escape_special_characters(long_character_name) }}
See the example here: https://github.com/character-ai/prompt-poet/blob/main/prompt_poet/examples/sections/cai_message_pins.yml.j2#L20
escape_special_characters
where is the define of escape_special_characters?
The error indicates that the YAML parser is having trouble understanding the structure of my prompt due to an issue with a colon (:) in the prompt?