Muennighoff / sgpt

SGPT: GPT Sentence Embeddings for Semantic Search
https://arxiv.org/abs/2202.08904
MIT License
851 stars 52 forks source link

OpenAI-GPT3 search endpoint deprecated #5

Open rajarajanvakil opened 2 years ago

rajarajanvakil commented 2 years ago

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.

Muennighoff commented 2 years ago

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.

GouthamVicky commented 2 years ago

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 deprecation@openai.com if you have any questions.

Thanks

Muennighoff commented 2 years ago

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.

GouthamVicky commented 2 years ago

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