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

support batching #201

Closed
go-dockly opened this issue Mar 26, 2023 · 2 comments
Closed

support batching #201

go-dockly opened this issue Mar 26, 2023 · 2 comments

Comments

@go-dockly
Copy link

It would be nice if the chatCompletion method could accept an array of requests optionally as described below:

Batching requests
The OpenAI API has separate limits for requests per minute and tokens per minute.

If you're hitting the limit on requests per minute, but have available capacity on tokens per minute, you can increase your throughput by batching multiple tasks into each request. This will allow you to process more tokens per minute, especially with our smaller models.

Sending in a batch of prompts works exactly the same as a normal API call, except you pass in a list of strings to the prompt parameter instead of a single string.

@sashabaranov
Copy link
Owner

Done in #220

@animalnots
Copy link

Hi, @sashabaranov,
I noticed that this feature seems different from the batch API as described in the Batch API FAQ. Could you clarify how it supports batch processing, including statuses, job checks, and JSONL logic?

I've also noticed a PR which mentions support for it.
And an issue asking support for it.

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

No branches or pull requests

3 participants