hwchase17 / chat-your-data

MIT License
901 stars 266 forks source link

Error on Hugging face- AttributeError: 'OpenAIEmbeddings' object has no attribute 'embedding_ctx_length' #5

Open ailanguageinnovations opened 1 year ago

ailanguageinnovations commented 1 year ago

Over the past week I've had a number of projects working fine on Hugging face after duplicating from https://huggingface.co/spaces/hwchase17/chat-your-data-state-of-the-union. I'm now getting the following error every time I try and interact with the model.

AttributeError: 'OpenAIEmbeddings' object has no attribute 'embedding_ctx_length'

I've just checked again and duplicated your HF project and get the same issue. I can't see any difference between my duplicate of the HF project and yours so not sure what is going on.

danielsteinigen commented 1 year ago

There were probably some changes in the last version of LangChain. Using an older version solved the issue for me: pip install langchain==0.0.86