AttributeError: module 'openai' has no attribute 'ChatCompletion'

Had the issue running an Google Colab Notebook with LangChain 0.0.331.
As default it ran with openai 1.1.1. and that is producing the error

/usr/local/lib/python3.10/dist-packages/langchain/embeddings/openai.py 
...
AttributeError: module 'openai' has no attribute 'Embedding'
1 Like