Skip to content
Snippets Groups Projects
Unverified Commit cb600470 authored by Dheeraj Agrawal's avatar Dheeraj Agrawal Committed by GitHub
Browse files

Adding support more filters pinecone (#9683)

adding support for one more filter  i.e not in array for pinecone vector store.
parent 6c6f5863
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,7 @@ repos:
- id: codespell
additional_dependencies: [tomli]
exclude: llama_index/_static
args: ["--ignore-words-list", "nin"]
- repo: https://github.com/srstevenson/nb-clean
rev: 3.1.0
hooks:
......
"""Pinecone Vector store index.
"""
Pinecone Vector store index.
An index that that is built on top of an existing vector store.
......@@ -61,6 +62,8 @@ def _transform_pinecone_filter_operator(operator: str) -> str:
return "$lte"
elif operator == "in":
return "$in"
elif operator == "nin":
return "$nin"
else:
raise ValueError(f"Filter operator {operator} not supported")
......
......@@ -69,6 +69,7 @@ class FilterOperator(str, Enum):
GTE = ">=" # greater than or equal to (int, float)
LTE = "<=" # less than or equal to (int, float)
IN = "in" # In array (string or number)
NIN = "nin" # Not in array (string or number)
class FilterCondition(str, Enum):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment