Skip to content
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

fix json object generation #18

Closed
wants to merge 7 commits into from

Conversation

jauniusmentimeter
Copy link

@jauniusmentimeter jauniusmentimeter commented Jul 20, 2024

After updating chrome canary to latest version, language model started returning json wrapped with markdown prefix and suffix, ie ```json {"key": "value"}``` instead of just {"key": "value"}. It's hard to fix that with only modifying prompt - it does not always work. This PR adds functionality to parse the json string if it's wrapped with markdown notation prefix and suffix.

Copy link

vercel bot commented Jul 20, 2024

@jauniusmentimeter is attempting to deploy a commit to the Jeason's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2f51304) to head (5fa9c80).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #18   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines          414       429   +15     
  Branches        53        58    +5     
=========================================
+ Hits           414       429   +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants