-
Notifications
You must be signed in to change notification settings - Fork 4.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
add prompt hava json test code #14311
base: main
Are you sure you want to change the base?
Conversation
Looks like the test doesn't pass? |
@logan-markewich Yes, the test code I've written is specifically for Issue 14310. Once this issue is resolved, the tests should pass successfully. |
So, we should fix the issue then before merging this PR, otherwise cicd will always fail 😅 |
@logan-markewich You can merge the PR after resolving this issue. |
Hi @danerlt , @logan-markewich, this issue is not llama-index specific. From std python, this already fails with KeyError: And even this: That's how the string-formatting works :) Solution is to double up the braces: |
@tibor-reiss Thank you for your response. I understand that this issue pertains to the standard library, but I prefer not to alter the JSON format with double braces. Instead, I would like to address it using jinja2, similar to how the langchain framework handles such matters. |
@danerlt jinja is python only though. Tbh there are plans to unify prompts between python and typescript packages, possibly using something like liquid. Then, if we also centralize prompts to some central registry, it will be much easier to work with Being honest though, this work is probably 2 months away though (many other higher priority items right now) |
Description
add prompt hava json test code
Fixes # (issue)
New Package?
Did I fill in the
tool.llamahub
section in thepyproject.toml
and provide a detailed README.md for my new integration or package?Version Bump?
Did I bump the version in the
pyproject.toml
file of the package I am updating? (Except for thellama-index-core
package)Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Suggested Checklist:
make format; make lint
to appease the lint gods