On the following code I’m unable to resolve this error:
Get embedding model
embeddings = OpenAIEmbeddings()
Create vector database
db = FAISS.from_documents(chunks, embeddings)
Error:
AttributeError: module ‘openai’ has no attribute ‘Embedding’
I have tried everything, I have installed different version for openai but none seems to work.
This code should work fine
New contributor
user4621 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.