-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Update examples/utils/embeddings_utils.py to API V1 #855
Comments
Hi @gaborcselle! Thank you for flagging and fixing. You can open a PR by forking the repository. @jhills20 for visibility |
Great, working on that. PR coming shortly. |
PR is up, thanks @simonpfish and @jhills20! |
Hi! In Colab, I've ran Does anyone know how to solve this error. Thanks |
I am seeing the same error. |
Use this instead: resouces: https://platform.openai.com/docs/guides/embeddings/use-cases |
Thanks @beshr-sab23 and @danthedanman for flagging, I'll take a look at this tomorrow. |
@beshr-sab23 what directory is the file in that you are calling I just re-tested the import statement locally, with a current version of the repo's Thanks and let me know! Gabor |
The file examples/utils/embeddings_utils.py needs to be updated to API V1. A number of related .ipynb notebooks are failing with depracation errors.
FIX: I have drafted a PR: embeddings_utils_v1_fixes.diff to fix this issue.
Identify the file to be fixed
.ipynb
notebooks such asDescribe the problem
The embeddings_utils.py file has not been updated to API V1 which causes a number of errors:
a*
methods such asacreate
openai.Embedding.create()
->client.embeddings.create()
engine
keyword in function calls when it should usemodel
This causes a number of the example .ipynb notebooks to fail as well.
Describe a solution
Additional context
I'd like push this diff as a PR: embeddings_utils_v1_fixes.diff.
This diff includes updates for
embeddings_utils.py
and related.ipynb
notebooks. I have manually tested all related.ipynb
notebooks that importembeddings_utils.py
and confirm that they work with API version 1.2.3.The text was updated successfully, but these errors were encountered: