Azure / azureml-examples

Official community-driven Azure Machine Learning examples, tested with GitHub Actions.
https://docs.microsoft.com/azure/machine-learning
MIT License
1.72k stars 1.4k forks source link

azureml.rag.utils.deployment: No module named 'openai.api_resources' #2903

Open lzhecheng opened 9 months ago

lzhecheng commented 9 months ago

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

vsantele commented 9 months ago

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

Jaid844 commented 8 months ago

Thanks @vsantele it seems to solve the problem