private-gpt icon indicating copy to clipboard operation
private-gpt copied to clipboard

Error while querying

Open robli314 opened this issue 2 years ago • 0 comments

Hi, nice project!!

I am getting the following error while querying:

Enter a query: what is 2 + 2?

llama_print_timings: load time = 11190.14 ms llama_print_timings: sample time = 0.00 ms / 1 runs ( 0.00 ms per run) llama_print_timings: prompt eval time = 11185.03 ms / 8 tokens ( 1398.13 ms per token) llama_print_timings: eval time = 1541.14 ms / 1 runs ( 1541.14 ms per run) llama_print_timings: total time = 12747.00 ms Traceback (most recent call last): File "/Users/robsonliebke/projects/python/privateGPT/privateGPT.py", line 39, in main() File "/Users/robsonliebke/projects/python/privateGPT/privateGPT.py", line 24, in main res = qa(query)
^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/langchain/chains/base.py", line 140, in call raise e File "/opt/homebrew/lib/python3.11/site-packages/langchain/chains/base.py", line 134, in call self._call(inputs, run_manager=run_manager) File "/opt/homebrew/lib/python3.11/site-packages/langchain/chains/retrieval_qa/base.py", line 119, in _call docs = self._get_docs(question) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/langchain/chains/retrieval_qa/base.py", line 181, in _get_docs return self.retriever.get_relevant_documents(question) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/langchain/vectorstores/base.py", line 333, in get_relevant_documents docs = self.vectorstore.similarity_search(query, **self.search_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 181, in similarity_search docs_and_scores = self.similarity_search_with_score(query, k, filter=filter) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 227, in similarity_search_with_score results = self.__query_collection( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/langchain/utils.py", line 50, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/langchain/vectorstores/chroma.py", line 120, in __query_collection return self._collection.query( ^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 219, in query return self._client._query( ^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/chromadb/api/local.py", line 408, in _query uuids, distances = self._db.get_nearest_neighbors( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/chromadb/db/clickhouse.py", line 583, in get_nearest_neighbors uuids, distances = index.get_nearest_neighbors(embeddings, n_results, ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/chromadb/db/index/hnswlib.py", line 230, in get_nearest_neighbors raise NoIndexException( chromadb.errors.NoIndexException: Index not found, please create an instance before querying

robli314 avatar May 10 '23 17:05 robli314