chat-langchain
chat-langchain copied to clipboard
chat-langchain does not work in Windows
Hello, I'm using Windows PC and would like to run application. Having bellow errors when trying to run ingest.py
/d/demo/chat-langchain (master)
$ d:/demo/chat-langchain/.venv/Scripts/python.exe d:/demo/chat-langchain/ingest.py
D:\demo\chat-langchain\.venv\lib\site-packages\langchain\document_loaders\readthedocs.py:48: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 48 of the file D:\demo\chat-langchain\.venv\lib\site-packages\langchain\document_loaders\readthedocs.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.
_ = BeautifulSoup(
Traceback (most recent call last):
File "d:\demo\chat-langchain\ingest.py", line 28, in <module>
ingest_docs()
File "d:\demo\chat-langchain\ingest.py", line 20, in ingest_docs
vectorstore = FAISS.from_documents(documents, embeddings)
File "D:\demo\chat-langchain\.venv\lib\site-packages\langchain\vectorstores\base.py", line 413, in from_documents
return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)
File "D:\demo\chat-langchain\.venv\lib\site-packages\langchain\vectorstores\faiss.py", line 578, in from_texts
return cls.__from(
File "D:\demo\chat-langchain\.venv\lib\site-packages\langchain\vectorstores\faiss.py", line 522, in __from
index = faiss.IndexFlatL2(len(embeddings[0]))
IndexError: list index out of range
(.venv)
Hi there! Try this fork. I already made a pull request but there hasn't been much updates on this repo lately and It hasn't been approved yet.
The url needs to be changed for both Windows and non-Windows for this to work.