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

Add batch api example #808

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Add batch api example #808

wants to merge 9 commits into from

Conversation

eiixy
Copy link
Contributor

@eiixy eiixy commented Jul 24, 2024

No description provided.

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.92%. Comparing base (774fc9d) to head (ea1609c).
Report is 77 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #808      +/-   ##
==========================================
+ Coverage   98.46%   98.92%   +0.45%     
==========================================
  Files          24       26       +2     
  Lines        1364     1389      +25     
==========================================
+ Hits         1343     1374      +31     
+ Misses         15        9       -6     
  Partials        6        6              

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

@sashabaranov
Copy link
Owner

Thank you for the PR! Could you please make it an integration test as well? The library would really benefit from more integration tests (see #771)

For more details: https://github.com/sashabaranov/go-openai/blob/master/api_integration_test.go

@eiixy
Copy link
Contributor Author

eiixy commented Jul 29, 2024

I noticed that when people use the CreateBatchWithUploadFile method, they often overlook the AddChatCompletion, AddCompletion, and AddEmbedding helper methods in the CreateBatchWithUploadFileRequest. Therefore, I added the CreateBatchWithChatCompletions and CreateBatchWithEmbeddings methods to clarify their usage.

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