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: exception handling for server errors with different content type header - fixes #132 #134

Merged
merged 4 commits into from
Jun 7, 2023

Conversation

gehrisandro
Copy link
Collaborator

This PR fixes exception handling for errors with a. content type header of application/json instead of application/json; charset=utf-8

fixes #132

@tomirons
Copy link

tomirons commented Jun 1, 2023

This fixes the issue I was encountering.

@bmckay959
Copy link

Just adding that this also fixed my issue.

Undefined array key "choices"

I was trying to send a prompt that would take too many tokens, but was not getting a helpful response until this.

@gehrisandro gehrisandro merged commit f5a97ab into main Jun 7, 2023
12 checks passed
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.

ErrorException: Undefined array key "choices"
4 participants