You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was try to deploy the app to the streamlit cloud.
It works fine at localhost, but raised an error when trying to call the langchain vectordatabase with source:
Traceback (most recent call last):
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/app/chatrtc/main.py", line 50, in <module>
result = chain({"question": user_input})
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 146, in __call__
raise e
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/chains/base.py", line 142, in __call__
outputs = self._call(inputs)
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/chains/qa_with_sources/base.py", line 96, in _call
docs = self._get_docs(inputs)
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/chains/qa_with_sources/vector_db.py", line 20, in _get_docs
return self.vectorstore.similarity_search(question, k=self.k)
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 91, in similarity_search
_, indices = self.index.search(np.array([embedding], dtype=np.float32), k)
TypeError: search() missing 3 required positional arguments: 'k', 'distances', and 'labels'
I believe this is some kind of problem when the cloud server try to load the pickle file at the linux os, which is different from my localhost in window. Anyone know how to solve this?
The text was updated successfully, but these errors were encountered:
I was try to deploy the app to the streamlit cloud.
It works fine at localhost, but raised an error when trying to call the langchain vectordatabase with source:
I believe this is some kind of problem when the cloud server try to load the pickle file at the linux os, which is different from my localhost in window. Anyone know how to solve this?
The text was updated successfully, but these errors were encountered: