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

Consistent variable syntax / allowing using deeply nested data as keys #85

Open
redhog opened this issue Oct 8, 2024 · 0 comments · May be fixed by #132
Open

Consistent variable syntax / allowing using deeply nested data as keys #85

redhog opened this issue Oct 8, 2024 · 0 comments · May be fixed by #132
Labels

Comments

@redhog
Copy link
Collaborator

redhog commented Oct 8, 2024

In jinja2 templates used for llm prompts, it is possible to access nested json structures in the item, e.g. {{ input.concept.title }}. However, this is not possible for simple lookups like embedding_keys. This is both limiting, and a bit confusing. It would be awesome to use the same logic for lookups, not just straight item.get(key) for key in self.config.get("embedding_keys").

This could be done by using compile_expression from jinja2

@redhog redhog added the medium label Oct 21, 2024
@redhog redhog linked a pull request Oct 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant