-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Qute global values should probably be lazy #39832
Comments
/cc @mkouba (qute) |
Globals variables are implemented as
...and fields ;-)
These variables are "global" by definition. If you only need something in a certain template, then don't use "global variable" but a custom In theory, we could add something like a set of targets where the global is accessible. But this would require the creator of the
and then when creating the template instance something like:
so that we could compare And |
Well, they could be added to the map as a "lazy cacheable" value.
I mean, both solutions would probably solve the issue of unwanted globals showing up:
I'm not sure which is better, or if there's another even better approach? Both options do seem valuable for other use-cases, though, generally, no? |
Yes, I think that we should make it possible to compute the data lazily and use it for global variables. |
- computed data are evaluated lazily when needed - resolves quarkusio#39832
Describe the bug
While filing a LangChain4J issue related to rendering a prompt using Qute, which is probably using the wrong classloader, which invoked global values, I noticed that global values were not lazy: quarkiverse/quarkus-langchain4j#436
So, there are two Qute issues here:
Web, Email, AI
…?The text was updated successfully, but these errors were encountered: