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

Replace custom OpenAI code with official library #388

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

waf
Copy link
Owner

@waf waf commented Dec 13, 2024

When OpenAI was first released, there wasn't a good C# library, so we built the CSharpRepl + OpenAI integration on top of HttpClient. This replaces that custom implementation with the official OpenAI Nuget Package. Luckily, both the custom implementation and the official package represented the streaming text as an IAsyncEnumerable, so the transition wasn't too difficult.

@waf waf merged commit d65ec6f into main Dec 13, 2024
2 checks passed
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 35.13514% with 24 lines in your changes missing coverage. Please review.

Project coverage is 67.2%. Comparing base (dbffe47) to head (291be09).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...pRepl.Services/Completion/OpenAICompleteService.cs 22.5% 23 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #388     +/-   ##
=======================================
- Coverage   68.2%   67.2%   -1.1%     
=======================================
  Files         98      90      -8     
  Lines       6917    6719    -198     
  Branches     929     915     -14     
=======================================
- Hits        4721    4518    -203     
- Misses      1869    1884     +15     
+ Partials     327     317     -10     

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

@waf waf deleted the replace-openai-with-library branch December 13, 2024 17:52
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.

1 participant