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 with Jinja templates and max generations #95

Open
GeBo1 opened this issue Jul 26, 2023 · 0 comments
Open

Issue with Jinja templates and max generations #95

GeBo1 opened this issue Jul 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@GeBo1
Copy link

GeBo1 commented Jul 26, 2023

With Enable Jinja2 templates and Combinatorial generation checked, setting Max generations to 0 raises an exception trying to call range(0) on this line:

prompts = [jinja_template.render(**self._context) for i in range(num_prompts)]

Setting Max generations to 1 works around the issue (which I'm not sure is intended or not).

This should make 0 behave as expected:

prompts = [jinja_template.render(**self._context) for i in range(num_prompts or 1)]
@akx akx added the bug Something isn't working label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants