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 integration test #762

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

TheAdamSmith
Copy link
Contributor

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
#761

Issue: #761

@TheAdamSmith TheAdamSmith force-pushed the fix-integration-test branch 2 times, most recently from 3583067 to 2186686 Compare June 5, 2024 00:18
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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              

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

moved completion stream testing to seperate function
added NoErrorF
fixes nil pointer reference on stream object
@@ -16,7 +16,7 @@ var ErrVectorLengthMismatch = errors.New("vector length mismatch")
type EmbeddingModel string

const (
// Deprecated: The following block will be shut down on January 04, 2024. Use text-embedding-ada-002 instead.
// Deprecated: The following block is shut down. Use text-embedding-ada-002 instead.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO these should just be removed now that they are shutdown, but wasn't sure that would cause issues

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 so much! We should enable integration tests in the CI on master merge

@sashabaranov sashabaranov merged commit fd41f7a into sashabaranov:master Jun 13, 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.

None yet

2 participants