Type error occurred while handling pdf
Opened this issue · 11 comments
I am working on windows,where I encountered this type error it states that INSTRUCTOR._load_sbert_model() got an unexpected argument 'token', I guess this error occurred due to version issues of sentences -transformers , currently I am using sentence -transformers version 2.3.1, previously I was using version 2.2.2 where it causes an import error that states that dependencies of InstructorEmbedding not found, I guess the root issue is related to sentence -transformers versions
I had the same problem and it worked for me to do "pip uninstall sentence-transformers" and then reinstall the library with "pip install sentence-transformers==2.2.2".
@krshubhamm do you have Microsoft Visual C++ 14.0 or greater installed as mentioned in the error message?
no do i have to install c++??
Yes it seems that you have to install it. "hnsw", the underlying implementetion of many vector databases seems to work with C++, which makes sense for speed purposes.
I would suggest that you follow the link mentioned in the error message and install the newest Microsoft Visual C++ version.
@krshubhamm In the config file just add "/" to the chat sessions path, so it looks like this:
chat_history_path: "./chat_sessions/"
I would recommend downloading the newest version of the code, which saves and loads the chat sessions in a database.
After downloading, you need to run python database_operations.py
first to create the database.
I had the same problem and it worked for me to do "pip uninstall sentence-transformers" and then reinstall the library with "pip install sentence-transformers==2.2.2".
I also had the original problem and this solved it. Now i have the issue that only CPU is being used and not GPU - but that's a different issue
"pip install sentence-transformers==2.2.2".
This worked for me as well.