Parse backtick-enclosed json#6607
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6607 +/- ##
=======================================
Coverage 79.68% 79.68%
=======================================
Files 226 227 +1
Lines 16964 16989 +25
=======================================
+ Hits 13517 13538 +21
- Misses 3447 3451 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
LGTM.
FYI, I have merged in #6540 which checks if model supports structured json and uses that.
Your impl seems to work well on top of that (you try to parse json from whatever comes from the model). A final doublecheck would be good.
I am approving this for now.
In general, it might be a good idea for us to just encourage devs to only use models with structured output (for better reliability ) with m1.
afourney
left a comment
There was a problem hiding this comment.
Looks good. I appreciate the changes.
Why are these changes needed?
Some models enclose json in markdown code blocks
Related issue number
resolves #6599. , #6547
Checks