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

Remove hardcoded assistants version #719

Conversation

danai-antoniou
Copy link
Contributor

Describe the change
OpenAI released assistants v2, however the code currently hardcodes v1 in every assistant and thread method.

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

Describe your solution
I've added an AssistantVersion parameter in the client config, which defaults to v1, so there will be no breaking change for anyone.
Users will be able to use v2 and any future versions by passing the version in the client config.

Tests
I've been using this in our fork of go-openai.

Issue: #717

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (774fc9d) to head (4c2727d).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #719      +/-   ##
==========================================
+ Coverage   98.46%   98.67%   +0.21%     
==========================================
  Files          24       24              
  Lines        1364     1131     -233     
==========================================
- Hits         1343     1116     -227     
+ 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 8d15a37 into sashabaranov:master Apr 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.

None yet

2 participants