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

Update client.go to get response header whether there is an error or not #751

Merged
merged 1 commit into from
May 24, 2024

Conversation

ando-masaki
Copy link
Contributor

Update client.go to get response header whether there is an error or not. Because 429 Too Many Requests error response has "Retry-After" header.

A similar PR may already be submitted!
Please search among the Pull request before creating one.

If your changes introduce breaking changes, please prefix the title of your pull request with "[BREAKING_CHANGES]". This allows for clear identification of such changes in the 'What's Changed' section on the release page, making it developer-friendly.

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.

Describe the change
Please provide a clear and concise description of the changes you're proposing. Explain what problem it solves or what feature it adds.

Provide OpenAI documentation link
Provide a relevant API doc from https://platform.openai.com/docs/api-reference

Describe your solution
Describe how your changes address the problem or how they add the feature. This should include a brief description of your approach and any new libraries or dependencies you're using.

Tests
Briefly describe how you have tested these changes. If possible — please add integration tests.

Additional context
Add any other context or screenshots or logs about your pull request here. If the pull request relates to an open issue, please link to it.

Issue: #XXXX

…not.

Update client.go to get response header whether there is an error or not. Because 429 Too Many Requests error response has "Retry-After" header.
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.68%. Comparing base (774fc9d) to head (bc17880).
Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #751      +/-   ##
==========================================
+ Coverage   98.46%   98.68%   +0.22%     
==========================================
  Files          24       24              
  Lines        1364     1140     -224     
==========================================
- Hits         1343     1125     -218     
+ Misses         15        9       -6     
  Partials        6        6              

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

Copy link
Owner

@sashabaranov sashabaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

@sashabaranov sashabaranov merged commit 211cb49 into sashabaranov:master May 24, 2024
3 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.

2 participants