sgpt icon indicating copy to clipboard operation
sgpt copied to clipboard

OpenAI-GPT3 search endpoint deprecated

Open rajarajanvakil opened this issue 2 years ago • 4 comments

Hello there, the search end point(purpose) as been deprecated is there any alternative solution on this. This happens at CE-BEIR notebook. Thanks in advance.

rajarajanvakil avatar Jun 28 '22 07:06 rajarajanvakil

Hey are you reffering to the crossencoder_openai.ipynb notebook?

You can still use the OpenAI search endpoint using the workaround in this script using their completion endpoint.

Muennighoff avatar Jun 28 '22 12:06 Muennighoff

Hello , Even if we try to run this script following error occurs

openai.error.InvalidRequestError: You do not have access to the search endpoint, likely because it is deprecated. Please see https://community.openai.com/t/answers-classification-search-endpoint-deprecation/18532 for more information and reach out to [email protected] if you have any questions.

  • [ ] Python version - 3.9
  • [ ] Open AI pip version - 0.20.0

Thanks

GouthamVicky avatar Jun 28 '22 13:06 GouthamVicky

Yeah you probably need to remove the print(openai.Search.create(model="davinci", query=query, documents=docs)) part & the BM25 is missing I think.

It may be cheaper for you to just use the Cross-Encoder method we propose in this repo here. Or use a Bi-Encoder with embeddings.

Muennighoff avatar Jun 28 '22 14:06 Muennighoff

yeah it's working fine now, Thanks for the quick response

GouthamVicky avatar Jun 28 '22 15:06 GouthamVicky