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

Issue: Nested Mustache variables not being parsed correctly #876

Open
k3vob opened this issue Jul 17, 2024 · 0 comments
Open

Issue: Nested Mustache variables not being parsed correctly #876

k3vob opened this issue Jul 17, 2024 · 0 comments
Assignees

Comments

@k3vob
Copy link

k3vob commented Jul 17, 2024

Issue you'd like to raise.

I have a prompt in the following format:

{{#is_a}}
In A
{{#is_b}}
In A.B
{{b}}
{{/is_b}}
{{/is_a}}
image
  1. In the Prompt playground, you can see that is_b was recognised as it is blue, but b was not as it is still black.
  2. In the variables on the right, you can see that only is_a was found.

I see the same when I pull this prompt and print it:

input_variables=['is_a'] metadata={'lc_hub_owner': '-', 'lc_hub_repo': 'temp', 'lc_hub_commit_hash': '463e2203cb19e084cc661be7b2f44f088d9f3d8ddb488ecb4d3be02ac3e49134'} messages=[SystemMessagePromptTemplate(prompt=PromptTemplate(input_variables=['is_a'], template='{{#is_a}}\nIn A\n{{#is_b}}\nIn A.B\n{{b}}\n{{/is_b}}\n{{/is_a}}', template_format='mustache'))]

Suggestion:

Nested Mustache variables should be parsed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants