You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The optional where should be a dict mapping metadata field names to values that the resulting objects should contain (for example where={"foo": "bar"} means that the method will only return objects that have a "foo" field in their metadata with value "bar").
The WhereQuery type is also defined in Ragbits:
WhereQuery = dict[str, str | int | float | bool]
All vector store implementations are responsible for converting this common filter format to whatever format that the underlying store uses. Client code should be able to confidently use the VectorStore API without needing to know which implementation is being used behind the scenes.
Unfortunately the list method in QdrantVectorStore is not compatible with the base list method:
The where parameter has a completely different type - Filter is a class (pydantic model) defined internally in qdrant and is qdrant-specific. The # type: ignore is used to suppress the errors that would normally result from overwriting a method with an incompatible method.
Acceptance criteria
The method signature should be identical to the one on the base model. where should be typed as WhereQuery and no # type: ignore should be present.
Internally, inside the method's body, it should create the qdrant Filter object (based on the information passed in where) to pass it along to qdrant.
The text was updated successfully, but these errors were encountered:
ludwiktrammer
changed the title
fix: Make the qdrant VectorStore API consistent with others
fix: Make the qdrant QdrantVectorStore.list API consistent with VectorStore
Jan 21, 2025
Description of the problem
In Ragbits the common interface for all vector stores includes the
list
command defined as:The optional
where
should be a dict mapping metadata field names to values that the resulting objects should contain (for examplewhere={"foo": "bar"}
means that the method will only return objects that have a "foo" field in their metadata with value "bar").The
WhereQuery
type is also defined in Ragbits:All vector store implementations are responsible for converting this common filter format to whatever format that the underlying store uses. Client code should be able to confidently use the
VectorStore
API without needing to know which implementation is being used behind the scenes.Unfortunately the
list
method inQdrantVectorStore
is not compatible with the baselist
method:The
where
parameter has a completely different type -Filter
is a class (pydantic model) defined internally in qdrant and is qdrant-specific. The# type: ignore
is used to suppress the errors that would normally result from overwriting a method with an incompatible method.Acceptance criteria
where
should be typed asWhereQuery
and no# type: ignore
should be present.Filter
object (based on the information passed inwhere
) to pass it along to qdrant.The text was updated successfully, but these errors were encountered: