llama_index
llama_index copied to clipboard
[Bug]: Not able to use chroma db vector store integration to get nodes using get_nodes
Bug Description
In my use case i want to get the nodes directly from the chromadb vector store using some metadata filters. previously i used to pass an empty array of nodeIds and filters in the get_node function to get the nodes specific to the filter. Now due to validate_ids method in chroma db repo it raises the error Expected IDs to be a non-empty list, got 0 IDs. Suggestion for the fix - do not default to empty list in get_nodes function from - node_ids = node_ids or [] to - node_ids = node_ids
For now i am directly using _get function and have copied a some utility functions to create the where param for the _get function
Version
llama-index-vector-stores-chroma = "^0.4.1", llama-index = "0.12.19"
Steps to Reproduce
create metadata filter and pass None or [] in node_ids param in get_nodes function.
Relevant Logs/Tracbacks
Expected IDs to be a non-empty list, got 0 IDs