Skip to content
New issue

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

Template parser can't handle escape characters or mixed quotes in the template definition #27

Open
escesare opened this issue Feb 15, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request Output Verifier Related to the output format issues from LLMs parser related to parser

Comments

@escesare
Copy link
Contributor

escesare commented Feb 15, 2023

Both of these example templates result in the error TemplateSyntaxError: unexpected char '\\' at 5:

ner.jinja:

{{ ' "hello world" ' }}

ner.jinja:

{{ " \"\"\"hello world\"\"\" " }}

And I confirmed it's not an issue with jinja, because passing the same template directly to jinja works fine:

>>> jinja2.Template('{{ \' "hello world" \' }}').render()
' "hello world" '

>>> jinja2.Template('{{ " \\"\\"\\"hello world\\"\\"\\" " }}\n').render()
' """hello world""" '
@monk1337 monk1337 self-assigned this Feb 15, 2023
@monk1337 monk1337 added the Output Verifier Related to the output format issues from LLMs label Feb 15, 2023
@syedjafer
Copy link

Hi Can i take this issue @monk1337

@escesare escesare changed the title Template parser can't handle escape characters or mixed quotes Template parser can't handle escape characters or mixed quotes in the template definition Feb 16, 2023
@monk1337
Copy link
Contributor

monk1337 commented Feb 16, 2023

@syedjafer Sure, Plan is to build a verifier. Please check #8 and #4. Feel free to open a PR. If you want to discuss the details, Please ping me on discord.

@monk1337
Copy link
Contributor

@syedjafer Are you taking the issue?

@syedjafer
Copy link

@monk1337 yes mate. but i can take this only on weekends.

@monk1337 monk1337 added enhancement New feature or request parser related to parser labels Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Output Verifier Related to the output format issues from LLMs parser related to parser
Projects
None yet
Development

No branches or pull requests

3 participants