azureml-examples
azureml-examples copied to clipboard
azureml.rag.utils.deployment: No module named 'openai.api_resources'
Operating System
Linux
Version Information
python 3.8 azureml-0.2.7
Steps to reproduce
Follow steps in https://github.com/Azure/azureml-examples/blob/main/sdk/python/generative-ai/rag/notebooks/faiss/scheduled_update_faiss_index.ipynb
Run the rag deployment part: from azureml.rag.utils.deployment import infer_deployment
It reports error: ModuleNotFoundError: No module named 'openai.api_resources'
It seems openai.api_resources
has been deprecated.
Expected behavior
No error
Actual behavior
ModuleNotFoundError: No module named 'openai.api_resources'
Addition information
No response
It seems related to this https://github.com/openai/openai-python/discussions/742
We can temporarily fix this issue with pip install openai==0.27.8
Thanks @vsantele it seems to solve the problem