Skip to content

Does "nlp.pipe(docs)" groups requests to an API ? #212

Answered by rmitsch
JeanMarieGRALL asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JeanMarieGRALL!

I would like to know nlp.pipe(docs) groups the request to the API ?

In the case of GPT 3.5 no, because unfortunately the OpenAI API doesn't allow batching different prompts (it allows sending a conversation, but not disparate texts). Because of that we are forced to send individual requests. This applies to all models using the /chat/completions endpoint. All models targeting the /completions endpoint, which OpenAI considers legacy at this point, use batching and are therefore significantly more efficient.

See https://platform.openai.com/docs/models/model-endpoint-compatibility to check which models use which endpoint.

i.e. does it prompt the context once for all se…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rmitsch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
feat/batching Feature: batching
2 participants