-
Notifications
You must be signed in to change notification settings - Fork 56
Replace json.loads with ast.literal_eval #314
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
Replace json.loads with ast.literal_eval #314
Conversation
WalkthroughThe changes update the metadata parsing logic in the streaming query endpoint to use Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
ea27033 to
9c17bc1
Compare
9c17bc1 to
5aa3876
Compare
manstis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Ah, the sweet smell of (llama-stack) breaking changes.
Description
This was found an issue while testing with llama-stack 0.2.16.
The logic for supporting referenced documents in streaming mode (#183) had an issue. When an empty metadata is included, the knowledge search log includes strings like:
the logic attempts to convert this to JSON syntax by replacing double quotes to single ones, but
is not correct in JSON syntax (
Noneshould be replaced withnull).I will resolve this issue by using
ast.literal_eval()instead ofjson.loads(), which is currently used.Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit
Bug Fixes
Tests