azureml-examples icon indicating copy to clipboard operation
azureml-examples copied to clipboard

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

Open lzhecheng opened this issue 1 year ago • 2 comments

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

lzhecheng avatar Dec 11 '23 07:12 lzhecheng

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

vsantele avatar Dec 20 '23 01:12 vsantele

Thanks @vsantele it seems to solve the problem

Jaid844 avatar Jan 07 '24 11:01 Jaid844