Skip to content

The agent engineering platform.

community[patch]: pgvector replace nin_ by not_in (#22619)

lucasiscovici05bf98b2f926
diff --git a/libs/community/langchain_community/vectorstores/pgvector.py b/libs/community/langchain_community/vectorstores/pgvector.py
index 7a8a49bc48..6a48ec294d 100644
--- a/libs/community/langchain_community/vectorstores/pgvector.py
+++ b/libs/community/langchain_community/vectorstores/pgvector.py
@@ -733,7 +733,7 @@ class PGVector(VectorStore):
if operator in {"$in"}:
return queried_field.in_([str(val) for val in filter_value])
elif operator in {"$nin"}:
- return queried_field.nin_([str(val) for val in filter_value])
+ return queried_field.not_in([str(val) for val in filter_value])
elif operator in {"$like"}:
return queried_field.like(filter_value)
elif operator in {"$ilike"}: