Replies: 2 comments
|
You could use the ContextHook extension: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey @yajo 👋
I've been wondering what's the official way of normalizing answers values? Currently, I'm using the
when: falsekey to sort of post-process prompt value for a given question. Example:This is especially useful during templating. Jinja template is much more readable this way. Also it's easier to write
{{package_name}}rather than{{ project_name|lower|replace(' ','_')|replace('-','_') }}in every file/line that needs the variable. Secondly, this gives a mechanism to ensure correct values on the template configuration level.The problem with using
when:falsefor this use case is that, the value will not be updated even if the "parent" answer has changed. And I know this is currently expected behavior as the docs say:Is there any other way to normalize answers values, such that it would work with the updates too?
Thanks as always, and have a good one!
All reactions