Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ERROR:root:Expected where to have exactly one operator, got {} in query. #101

Open
nguyenphucthinh20 opened this issue Dec 18, 2024 · 1 comment

Comments

@nguyenphucthinh20
Copy link

ERROR:root:Expected where to have exactly one operator, got {} in query.
File "/home/thinhnp/Documents/shirogane/backend/app/routers/v2/projects.py", line 607, in chat_query
result = await chat_main(request, request.app.state.brain, project, q_input, user, db, background_tasks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/Documents/shirogane/backend/app/utils/helper.py", line 58, in chat_main
for line in output:
File "/home/thinhnp/Documents/shirogane/backend/app/projects/rag.py", line 135, in chat
raise e
File "/home/thinhnp/Documents/shirogane/backend/app/projects/rag.py", line 91, in chat
response = chat_engine.chat(chatModel.question)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/instrumentation/dispatcher.py", line 311, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/callbacks/utils.py", line 41, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/chat_engine/context.py", line 209, in chat
nodes = self._get_nodes(message)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/chat_engine/context.py", line 140, in _get_nodes
nodes = self._retriever.retrieve(message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/instrumentation/dispatcher.py", line 311, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/base/base_retriever.py", line 245, in retrieve
nodes = self._retrieve(query_bundle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/instrumentation/dispatcher.py", line 311, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/indices/vector_store/retrievers/retriever.py", line 103, in _retrieve
return self._get_nodes_with_embeddings(query_bundle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/core/indices/vector_store/retrievers/retriever.py", line 180, in _get_nodes_with_embeddings
query_result = self._vector_store.query(query, **self._kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/vector_stores/chroma/base.py", line 371, in query
return self._query(
^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/llama_index/vector_stores/chroma/base.py", line 381, in _query
results = self._collection.query(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 210, in query
query_request = self._validate_and_prepare_query_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 93, in wrapper
raise type(e)(msg).with_traceback(e.traceback)
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 90, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/chromadb/api/models/CollectionCommon.py", line 294, in _validate_and_prepare_query_request
validate_filter_set(filter_set=filters)
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/chromadb/api/types.py", line 339, in validate_filter_set
validate_where(filter_set["where"])
File "/home/thinhnp/anaconda3/envs/restai/lib/python3.11/site-packages/chromadb/api/types.py", line 598, in validate_where
raise ValueError(f"Expected where to have exactly one operator, got {where}")

@nguyenphucthinh20
Copy link
Author

I'm run rag, help me!!!!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant