From 6d29cc6c1c326850b0c4455524fee40e449bd5ae Mon Sep 17 00:00:00 2001 From: George Date: Mon, 11 Nov 2024 17:52:55 +0100 Subject: [PATCH] new: extend signatures with images and inference objects (#842) * new: extend signatures with images and inference objects * fix: remove draft code --- qdrant_client/async_client_base.py | 4 ++++ qdrant_client/async_qdrant_client.py | 4 ++++ qdrant_client/async_qdrant_remote.py | 4 ++++ qdrant_client/client_base.py | 4 ++++ qdrant_client/conversions/common_types.py | 2 ++ qdrant_client/local/async_qdrant_local.py | 2 ++ qdrant_client/local/local_collection.py | 2 ++ qdrant_client/local/qdrant_local.py | 2 ++ qdrant_client/qdrant_client.py | 4 ++++ qdrant_client/qdrant_remote.py | 4 ++++ 10 files changed, 32 insertions(+) diff --git a/qdrant_client/async_client_base.py b/qdrant_client/async_client_base.py index a4405bc4..004ff3c6 100644 --- a/qdrant_client/async_client_base.py +++ b/qdrant_client/async_client_base.py @@ -105,6 +105,8 @@ async def query_points( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, @@ -133,6 +135,8 @@ async def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/async_qdrant_client.py b/qdrant_client/async_qdrant_client.py index 438e46fc..67f53f0c 100644 --- a/qdrant_client/async_qdrant_client.py +++ b/qdrant_client/async_qdrant_client.py @@ -424,6 +424,8 @@ async def query_points( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, @@ -564,6 +566,8 @@ async def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/async_qdrant_remote.py b/qdrant_client/async_qdrant_remote.py index 60fc624c..1b9e4a24 100644 --- a/qdrant_client/async_qdrant_remote.py +++ b/qdrant_client/async_qdrant_remote.py @@ -436,6 +436,8 @@ async def query_points( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, @@ -603,6 +605,8 @@ async def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/client_base.py b/qdrant_client/client_base.py index a2af5430..4a6fb57a 100644 --- a/qdrant_client/client_base.py +++ b/qdrant_client/client_base.py @@ -101,6 +101,8 @@ def query_points( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, @@ -129,6 +131,8 @@ def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/conversions/common_types.py b/qdrant_client/conversions/common_types.py index eeb3288a..b840110f 100644 --- a/qdrant_client/conversions/common_types.py +++ b/qdrant_client/conversions/common_types.py @@ -115,6 +115,8 @@ def get_args_subscribed(tp): # type: ignore Query: TypeAlias = rest.Query Prefetch: TypeAlias = rest.Prefetch Document: TypeAlias = rest.Document +Image: TypeAlias = rest.Image +InferenceObject: TypeAlias = rest.InferenceObject SearchRequest = Union[rest.SearchRequest, grpc.SearchPoints] RecommendRequest = Union[rest.RecommendRequest, grpc.RecommendPoints] diff --git a/qdrant_client/local/async_qdrant_local.py b/qdrant_client/local/async_qdrant_local.py index 13e9c8d2..251c73c3 100644 --- a/qdrant_client/local/async_qdrant_local.py +++ b/qdrant_client/local/async_qdrant_local.py @@ -470,6 +470,8 @@ async def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/local/local_collection.py b/qdrant_client/local/local_collection.py index 2e323874..30416e0a 100644 --- a/qdrant_client/local/local_collection.py +++ b/qdrant_client/local/local_collection.py @@ -926,6 +926,8 @@ def query_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/local/qdrant_local.py b/qdrant_client/local/qdrant_local.py index 91e352fb..7638316e 100644 --- a/qdrant_client/local/qdrant_local.py +++ b/qdrant_client/local/qdrant_local.py @@ -504,6 +504,8 @@ def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/qdrant_client.py b/qdrant_client/qdrant_client.py index 5fd92478..580116b9 100644 --- a/qdrant_client/qdrant_client.py +++ b/qdrant_client/qdrant_client.py @@ -473,6 +473,8 @@ def query_points( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, @@ -618,6 +620,8 @@ def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, diff --git a/qdrant_client/qdrant_remote.py b/qdrant_client/qdrant_remote.py index bd34ac8c..bafb15f8 100644 --- a/qdrant_client/qdrant_remote.py +++ b/qdrant_client/qdrant_remote.py @@ -591,6 +591,8 @@ def query_points( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None, @@ -784,6 +786,8 @@ def query_points_groups( types.Query, types.NumpyArray, types.Document, + types.Image, + types.InferenceObject, None, ] = None, using: Optional[str] = None,