sashabaranov / go-openai

OpenAI ChatGPT, GPT-3, GPT-4, DALL·E, Whisper API wrapper for Go
Apache License 2.0
8.6k stars 1.29k forks source link

Fix integration test #762

Closed TheAdamSmith closed 2 weeks ago

TheAdamSmith commented 3 weeks ago

Describe the change Updates the integration tests to the updated models so that the tests will work. Updated models based off of the Openai recommended upgrades https://platform.openai.com/docs/deprecations

Provide OpenAI documentation link https://platform.openai.com/docs/deprecations

Describe your solution Refactored the completion streaming test into its own class and added a NoErrorF check. This fixes the nil pointer dereference error when this test fails and allows the other tests to keep running. Updated the models the tests were using

Tests image

Additional context https://github.com/sashabaranov/go-openai/issues/761

Issue: #761

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #762 +/- ## ========================================== + 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.