Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix - File content #544

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix - File content #544

wants to merge 3 commits into from

Conversation

gregszero
Copy link

@gregszero gregszero commented Oct 29, 2024

This pull request includes changes to the get method in the HTTP module within the lib/openai/http.rb file. The main purpose of these changes is to improve error handling when parsing JSON responses to address issue #421

Error handling improvements:

  • lib/openai/http.rb: Modified the get method to handle JSON::ParserError exceptions. If parsing the response body as JSON fails, the raw response body will be returned instead.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?

there’s another PR addressing this issue, but since I found a solution that works for me, I believe the community could also benefit from this change

@gregszero gregszero marked this pull request as draft October 29, 2024 21:38
@gregszero gregszero marked this pull request as ready for review October 29, 2024 22:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant