-
Notifications
You must be signed in to change notification settings - Fork 38
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
openAi broken JSON, the rescue #139
Comments
Another example received from
|
Thanks for your inputs Tiago. Some thoughts:
|
Got it @josdejong! Thank you for your feedback, and it totally make sense. Maybe it could have a parameter to define "conservative" level, so, in some cases when it's better have something than nothing, we could set a low conservative param. Some that the user would use "at your own risk". It's just one idea. |
Yes, that is an interesting idea, a "conservative" option. In the long run, I would love to let |
I will keep posting here some cases, so if in the future a Another broken JSON from OpenAi. In this case it visibly failed to close the objects from the array (same atributes 3 times), and didn't finished the string as well.
|
Your tool is amazing and help a lot.
Dealing with LLMs like OpenAi, Gemini, DeepSeek, it very often return crazy invalid JSON, where one
jsonrepair
call is not enougth.As example (json inside
message.content
) with two JSON objects togheter:Sometime it returns the JSON inside a markdown
```json
markup.I would like to share with you two methods I made here, that helpme solve a little more that crazy json, and maybe it could be an idea to make you lib better.
The text was updated successfully, but these errors were encountered: