
    Ngm                        d dl Z d dlmZ d dlmZmZmZmZmZm	Z	m
Z
mZmZmZmZ d dlmZ d dlmZ d dlmZ d dlmZmZ d dlmZ d d	lmZ d d
lmZ d dlm Z   G d de          Z!dS )    N)deepcopy)Any	AwaitableCallableDictIterableListMappingOptionalSequenceTupleUnion)grpc)
QdrantBase)common_types)	ApiClientSyncApis)QdrantLocalmigrate)QdrantFastembedMixin)QdrantRemotec            )       L$    e Zd ZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddee         dee         dee         d	ed
edee         dee         dee         dee         dee         dee         dedeeee	f                  dee
eg ef         eg ee         f         f                  de	f fdZddZddee         de	ddfdZedej        fd            Zedej        fd            Zedej        fd            Zedej        fd            Zedee         fd            Zedee         fd            Zedeee	f         fd             Z	 	 dd!ed"eej                  dee         d#eej!                 de	de"e"ej#                          fd$Z$	 	 	 	 	 	 	 	 	 	 	 dd!ed'e
ee         e%ee"e         f         ej&        ej'        ej(        f         d(eej)                 d)eej*                 d*ed+ee         d,e
eee         ej+        f         d-e
eee         f         d.ee         d/ed#eej!                 d0eej,                 dee         de	de"ej#                 fd1Z-	 	 dd!ed"eej.                 d#eej!                 dee         de	de"ej/                 fd2Z0	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd!ed3e
ej1        e"e         e"e"e                  ej2        ej3        ej(        ej4        df         d4ee         d5e
ej5        e"ej5                 df         d(eej)                 d)eej*                 d*ed+ee         d,e
eee         ej+        f         d-e
eee         f         d.ee         d6eej6                 d#eej!                 d0eej,                 dee         de	dej/        f"d7Z7	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd!ed9ed3e
ej1        e"e         e"e"e                  ej2        ej3        ej(        ej4        df         d4ee         d5e
ej5        e"ej5                 df         d(eej)                 d)eej*                 d*ed:ed,e
eee         ej+        f         d-e
eee         f         d.ee         d;eej8                 d6eej6                 d#eej!                 d0eej,                 dee         de	dej9        f&d<Z:	 	 	 	 	 	 	 	 	 	 	 dd!ed'e
ee         e%ee"e         f         ej&        ej'        ej(        f         d9ed(eej)                 d)eej*                 d*ed:ed,e
eee         ej+        f         d-e
eee         f         d.ee         d;eej8                 d#eej!                 d0eej,                 dee         de	dej9        f d>Z;	 	 dd!ed"eej<                 d#eej!                 dee         de	de"e"ej#                          fd?Z=	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd!edAeeej>                          dBeeej>                          d(eej)                 d)eej*                 d*ed+ed,e
ee"e         ej+        f         d-e
ee"e         f         d.ee         d4ee         d6eej6                 dCeej?                 d#eej!                 d0eej,                 dee         de	de"ej#                 f$dDZ@	 	 	 	 	 	 	 dd!ed(eej)                 d*edEed4ee         d#eej!                 dee         d0eej,                 de	dejA        fdFZB	 	 	 	 	 	 	 dd!ed(eej)                 d*edEed4ee         d#eej!                 dee         d0eej,                 de	dejC        fdGZD	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd!ed9edAeeej>                          dBeeej>                          d(eej)                 d)eej*                 d*ed:ed.ee         d,e
eee         ej+        f         d-e
eee         f         d4ee         d6eej6                 d;eej8                 dCeej?                 d#eej!                 d0eej,                 dee         de	dej9        f(dHZE	 	 	 	 	 	 	 	 	 	 	 	 	 dd!edIeejF                 dJeeejG                          d(eej)                 d)eej*                 d*ed+ed,e
ee"e         ej+        f         d-e
ee"e         f         d4ee         d6eej6                 d#eej!                 d0eej,                 dee         de	de"ej#                 f dKZH	 	 dd!ed"eejI                 d#eej!                 dee         de	de"e"ej#                          fdLZJ	 	 	 	 	 	 	 	 	 dd!edMeej)                 d*edNeejK                 d+eej1                 d,e
eee         ej+        f         d-e
eee         f         d#eej!                 d0eej,                 dee         de	de%e"ejL                 eej1                 f         fdOZM	 	 	 	 dd!edPeej)                 dQed0eej,                 dee         de	dejN        fdRZO	 	 	 	 	 	 dd!edSedTeej)                 d*edQed#eej!                 dee         d0eej,                 de	dejP        fdUZQ	 	 	 dd!edVejR        dWedXeejS                 d0eej,                 de	dejT        fdYZU	 	 	 dd!edVeejV                 dWedXeejS                 d0eej,                 de	dejT        fdZZW	 	 	 dd!ed[ee         dVejX        dWedXeejS                 d0eej,                 de	dejT        fd\ZY	 	 	 	 	 dd!ed]eej1                 d,e
eee         ej+        f         d-e
eee         f         d#eej!                 d0eej,                 dee         de	de"ejL                 fd^ZZ	 	 	 dd!ed_ejX        dWedXeejS                 d0eej,                 de	dejT        fd`Z[	 	 	 	 dd!edaej\        dVejX        dSee         dWedXeejS                 d0eej,                 de	dejT        fdbZ]	 	 	 dd!edaej\        dVejX        dWedXeejS                 d0eej,                 de	dejT        fdcZ^	 	 	 dd!eddee         dVejX        dWedXeejS                 d0eej,                 de	dejT        fdeZ_	 	 	 dd!ed_ejX        dWedXeejS                 d0eej,                 de	dejT        fdfZ`	 	 dd!edgeeja                 dWedXeejS                 de	de"ejT                 fdhZb	 ddieejc                 dee         de	defdjZdd!ede	deje        fdkZfde	deje        fdlZgde	dejh        fdmZid!ede	dejj        fdnZkd!ede	defdoZl	 	 	 	 	 	 	 dd!edpeejm                 dqeejn                 dreejo                 dseejp                 dteejq                 dee         dueereejs        f                  de	defdvZt	 dd!edee         de	defdwZu	 	 	 	 	 	 	 	 	 	 	 	 dd!edre
ejv        ereejv        f         f         dueereejs        f                  dxee         dyeejw                 dzee         d{ee         d|ee         dseejp                 dpeejm                 d}eejx                 dteejy                 d~eejz                 dee         de	def dZ{	 	 	 	 	 	 	 	 	 	 	 	 dd!edre
ejv        ereejv        f         f         dueereejs        f                  dxee         dyeejw                 dzee         d{ee         d|ee         dseejp                 dpeejm                 d}eejx                 dteejy                 d~eejz                 dee         de	def dZ|	 	 	 	 	 	 dd!ede}ejL                 dededee         dedWed0eej,                 de	ddfdZ~	 	 	 	 	 	 dd!edVe}ej                 dededee         dedWed0eej,                 de	ddfdZ	 	 	 	 	 	 	 	 dd!ed[e
e}ej                 eeej(        f         ej(        f         daee}ee	e	f                           d]ee}ej1                          dededee         dedWed0eej,                 de	ddfdZ	 	 	 	 dd!ededeej                 deej                 dWedXeejS                 de	dejT        fdZ	 	 dd!ededWedXeejS                 de	dejT        fdZd!ede	de"ej                 fdZ	 dd!edWede	deej                 fdZ	 dd!ededWede	dee         f
dZde	de"ej                 fdZ	 ddWede	deej                 fdZ	 ddedWede	dee         fdZ	 	 	 	 dd!ededee         dee         deej                 dWede	dee         fdZd!edede	de"ej                 fdZ	 dd!ededWede	deej                 f
dZ	 dd!edededWede	dee         fdZ	 	 	 	 dd!edededee         dee         deej                 dWede	dee         fdZdede	dej        fdZde	dej        fdZde	dej        fdZ	 	 	 ddedee"e                  dededdf
dZ	 	 	 dd!edej        dee         dzee         dee"e                  de	defdZd!edej        de	defdZdej        fdZ xZS )QdrantClienta
  Entry point to communicate with Qdrant service via REST or gRPC API.

    It combines interface classes and endpoint implementation.
    Additionally, it provides custom implementations for frequently used methods like initial collection upload.

    All methods in QdrantClient accept both gRPC and REST structures as an input.
    Conversion will be performed automatically.

    .. note::
        This module methods are wrappers around generated client code for gRPC and REST methods.
        If you need lower-level access to generated clients, use following properties:

        - :py:attr:`QdrantClient.grpc_points`
        - :py:attr:`QdrantClient.grpc_collections`
        - :py:attr:`QdrantClient.rest`

    .. note::
        If you need async, please consider using Async Implementations of QdrantClient.

        - :class:`qdrant_client.async_qdrant_client`

    Args:
        location:
            If `":memory:"` - use in-memory Qdrant instance.
            If `str` - use it as a `url` parameter.
            If `None` - use default values for `host` and `port`.
        url: either host or str of "Optional[scheme], host, Optional[port], Optional[prefix]".
            Default: `None`
        port: Port of the REST API interface. Default: 6333
        grpc_port: Port of the gRPC interface. Default: 6334
        prefer_grpc: If `true` - use gPRC interface whenever possible in custom methods.
        https: If `true` - use HTTPS(SSL) protocol. Default: `None`
        api_key: API key for authentication in Qdrant Cloud. Default: `None`
        prefix:
            If not `None` - add `prefix` to the REST URL path.
            Example: `service/v1` will result in `http://localhost:6333/service/v1/{qdrant-endpoint}` for REST API.
            Default: `None`
        timeout:
            Timeout for REST and gRPC API requests.
            Default: 5 seconds for REST and unlimited for gRPC
        host: Host name of Qdrant service. If url and host are None, set to 'localhost'.
            Default: `None`
        path: Persistence path for QdrantLocal. Default: `None`
        force_disable_check_same_thread:
            For QdrantLocal, force disable check_same_thread. Default: `False`
            Only use this if you can guarantee that you can resolve the thread safety outside QdrantClient.
        auth_token_provider: Callback function to get Bearer access token. If given, the function will be called before each request to get the token.
        **kwargs: Additional arguments passed directly into REST client initialization

    N    Flocationurlport	grpc_portprefer_grpchttpsapi_keyprefixtimeouthostpathforce_disable_check_same_threadgrpc_optionsauth_token_providerkwargsc                      t                      j        di | d t                                                      D             | _        | j                            t          |                     |  t          d |||
|fD                       dk    rt          d          |dk    rt          ||          | _
        d S |t          ||          | _
        d S |||}t          d||||||||	|
||d|| _
        d S )	Nc                 "    i | ]\  }}|d v	||S ))self	__class__r+    ).0keyvalues      W/var/www/html/ai-engine/env/lib/python3.11/site-packages/qdrant_client/qdrant_client.py
<dictcomp>z)QdrantClient.__init__.<locals>.<dictcomp>k   s4     
 
 
U999 999    c                     g | ]}|d uS Nr0   )r1   params     r4   
<listcomp>z)QdrantClient.__init__.<locals>.<listcomp>t   s    KKKeT!KKKr6      zDOnly one of <location>, <url>, <host> or <path> should be specified.z:memory:)r   r(   )r   r   r    r!   r"   r#   r$   r%   r&   r)   r*   r0   )super__init__localsitems_init_optionsupdater   sum
ValueErrorr   _clientr   )r.   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r/   s                   r4   r=   zQdrantClient.__init__O   ss   ( 	 	
 	
	
 	
 	

 
$hhnn..
 
 

 	!!(6"2"2333 KK#tT/JKKKLLqPPV   z!!&!0O  DLLL &0O  DLLL
 #' #')$7   DLLLr6   returnc                 .    |                                   d S r8   )closer.   s    r4   __del__zQdrantClient.__del__   s    

r6   
grpc_gracec                 R    t          | d          r | j        j        dd|i| dS dS )zCloses the connection to Qdrant

        Args:
            grpc_grace: Grace period for gRPC connection close. Default: None
        rD   rJ   Nr0   )hasattrrD   rG   )r.   rJ   r+   s      r4   rG   zQdrantClient.close   sI     4## 	@DL??*??????	@ 	@r6   c                     t          | j        t                    r| j        j        S t	          dt          | j                             )gRPC client for collections methods

        Returns:
            An instance of raw gRPC client, generated from Protobuf
        !gRPC client is not supported for )
isinstancerD   r   grpc_collectionsNotImplementedErrortyperH   s    r4   rQ   zQdrantClient.grpc_collections   sD     dlL11 	1<00!"Zd4<FXFX"Z"Z[[[r6   c                     t          | j        t                    r| j        j        S t	          dt          | j                             )}gRPC client for points methods

        Returns:
            An instance of raw gRPC client, generated from Protobuf
        rO   )rP   rD   r   grpc_pointsrR   rS   rH   s    r4   rV   zQdrantClient.grpc_points   sD     dlL11 	,<++!"Zd4<FXFX"Z"Z[[[r6   c                     t          j        dt          d           t          | j        t
                    r| j        j        S t          dt          | j                             )rU   zuasync_grpc_points is deprecated and will be removed in a future release. Use `AsyncQdrantRemote.grpc_points` instead.   
stacklevelrO   )	warningswarnDeprecationWarningrP   rD   r   async_grpc_pointsrR   rS   rH   s    r4   r^   zQdrantClient.async_grpc_points   sk     	 D	
 	
 	
 	

 dlL11 	2<11!"Zd4<FXFX"Z"Z[[[r6   c                     t          j        dt          d           t          | j        t
                    r| j        j        S t          dt          | j                             )rN   zasync_grpc_collections is deprecated and will be removed in a future release. Use `AsyncQdrantRemote.grpc_collections` instead.rX   rY   rO   )	r[   r\   r]   rP   rD   r   async_grpc_collectionsrR   rS   rH   s    r4   r`   z#QdrantClient.async_grpc_collections   sk     	 N	
 	
 	
 	

 dlL11 	7<66!"Zd4<FXFX"Z"Z[[[r6   c                     t          j        dt          d           t          | j        t
                    r| j        j        S t          dt          | j                             )tREST Client

        Returns:
            An instance of raw REST API client, generated from OpenAPI schema
        z^The 'rest' property is deprecated and will be removed in a future version. Use `http` instead.rX   rY   !REST client is not supported for )	r[   r\   r]   rP   rD   r   restrR   rS   rH   s    r4   rd   zQdrantClient.rest   sh     	l	
 	
 	
 	

 dlL11 	%<$$!"Zd4<FXFX"Z"Z[[[r6   c                     t          | j        t                    r| j        j        S t	          dt          | j                             )rb   rc   )rP   rD   r   httprR   rS   rH   s    r4   rf   zQdrantClient.http   sD     dlL11 	%<$$!"Zd4<FXFX"Z"Z[[[r6   c                     | j         S )zy`__init__` Options

        Returns:
             A dictionary of options the client class was instantiated with
        )r@   rH   s    r4   init_optionszQdrantClient.init_options   s     !!r6   collection_namerequestsconsistencyc                     t          |          dk    s,J dt          |                                                        | j        j        d||||d|S )aw  Perform multiple searches in a collection mitigating network overhead

        Args:
            collection_name: Name of the collection
            requests: List of search requests
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Returns:
            List of search responses
        r   Unknown arguments: ri   rj   rk   r%   r0   )lenlistkeysrD   search_batch)r.   ri   rj   r%   rk   r+   s         r4   rr   zQdrantClient.search_batch  su    4 6{{a!LtFKKMM7J7J!L!L(t|( 
+#	
 

 
 
 	
r6   
   Tquery_vectorquery_filtersearch_paramslimitoffsetwith_payloadwith_vectorsscore_thresholdappend_payloadshard_key_selectorc                     t          |          dk    s,J dt          |                                                        | j        j        d|||||||||	|
|||d|S )a  Search for closest vectors in collection taking into account filtering conditions

        Args:
            collection_name: Collection to search in
            query_vector:
                Search for vectors closest to this.
                Can be either a vector itself, or a named vector, or a named sparse vector, or a tuple of vector name and vector itself
            query_filter:
                - Exclude vectors which doesn't fit given conditions.
                - If `None` - search among all vectors
            search_params: Additional search params
            limit: How many results return
            offset:
                Offset of the first result to return.
                May be used to paginate results.
                Note: large offset values may cause performance issues.
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` - Do not attach vector.
                - If List of string - include only specified fields
                - Default: `False`
            score_threshold:
                Define a minimal score threshold for the result.
                If defined, less similar results will not be returned.
                Score of the returned result might be higher or smaller than the threshold depending
                on the Distance function used.
                E.g. for cosine similarity only higher scores will be returned.
            append_payload: Same as `with_payload`. Deprecated.
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Examples:

        `Search with filter`::

            qdrant.search(
                collection_name="test_collection",
                query_vector=[1.0, 0.1, 0.2, 0.7],
                query_filter=Filter(
                    must=[
                        FieldCondition(
                            key='color',
                            range=Match(
                                value="red"
                            )
                        )
                    ]
                )
            )

        Returns:
            List of found close points with similarity scores.
        r   rm   )ri   rt   ru   rv   rw   rx   ry   rz   r{   r|   rk   r}   r%   r0   )ro   rp   rq   rD   search)r.   ri   rt   ru   rv   rw   rx   ry   rz   r{   r|   rk   r}   r%   r+   s                  r4   r   zQdrantClient.search%  s    x 6{{a!LtFKKMM7J7J!L!L"t|" 
+%%'%%+)#1
 
 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        d||||d|S )a  Perform any search, recommend, discovery, context search operations in batch, and mitigate network overhead

        Args:
            collection_name: Name of the collection
            requests: List of query requests
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Returns:
            List of query responses
        r   rm   rn   r0   )ro   rp   rq   rD   query_batch_pointsr.   ri   rj   rk   r%   r+   s         r4   r   zQdrantClient.query_batch_points  su    4 6{{a!LtFKKMM7J7J!L!L.t|. 
+#	
 

 
 
 	
r6   queryusingprefetchlookup_fromc                     t          |          dk    s,J dt          |                                                       |                     ||          \  }} | j        j        d||||||||	|
||||||d|S )a  Universal endpoint to run any available operation, such as search, recommendation, discovery, context search.

        Args:
            collection_name: Collection to search in
            query:
                Query for the chosen search type operation.
                - If `str` - use string as UUID of the existing point as a search query.
                - If `int` - use integer as ID of the existing point as a search query.
                - If `List[float]` - use as a dense vector for nearest search.
                - If `List[List[float]]` - use as a multi-vector for nearest search.
                - If `SparseVector` - use as a sparse vector for nearest search.
                - If `Query` - use as a query for specific search type.
                - If `NumpyArray` - use as a dense vector for nearest search.
                - If `Document` - infer vector from the document text and use it for nearest search (requires `fastembed` package installed).
                - If `None` - return first `limit` points from the collection.
            prefetch: prefetch queries to make a selection of the data to be used with the main query
            query_filter:
                - Exclude vectors which doesn't fit given conditions.
                - If `None` - search among all vectors
            search_params: Additional search params
            limit: How many results return
            offset:
                Offset of the first result to return.
                May be used to paginate results.
                Note: large offset values may cause performance issues.
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` - Do not attach vector.
                - If List of string - include only specified fields
                - Default: `False`
            score_threshold:
                Define a minimal score threshold for the result.
                If defined, less similar results will not be returned.
                Score of the returned result might be higher or smaller than the threshold depending
                on the Distance function used.
                E.g. for cosine similarity only higher scores will be returned.
            using:
                Name of the vectors to use for query.
                If `None` - use default vectors or provided in named vector structures.
            lookup_from:
                Defines a location (collection and vector field name), used to lookup vectors for recommendations,
                    discovery and context queries.
                If `None` - current collection will be used.
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Examples:

        `Search for closest points with a filter`::

            qdrant.query(
                collection_name="test_collection",
                query=[1.0, 0.1, 0.2, 0.7],
                query_filter=Filter(
                    must=[
                        FieldCondition(
                            key='color',
                            range=Match(
                                value="red"
                            )
                        )
                    ]
                )
            )

        Returns:
            QueryResponse structure containing list of found close points with similarity scores.
        r   rm   )ri   r   r   ru   rv   rw   rx   ry   rz   r{   r   r   rk   r}   r%   r0   )ro   rp   rq   3_resolve_query_to_embedding_embeddings_and_prefetchrD   query_points)r.   ri   r   r   r   ru   rv   rw   rx   ry   rz   r{   r   rk   r}   r%   r+   s                    r4   r   zQdrantClient.query_points  s    b 6{{a!LtFKKMM7J7J!L!L RRSXZbccx(t|( 
+%'%%+##1
 
  !
 
 	
r6      group_by
group_sizewith_lookupc                 6   t          |          dk    s,J dt          |                                                       |                     ||          \  }} | j        j        di d|d|d|d|d|d|d	|d
|	d|
d|d|d|d|d|d|d||S )a  Universal endpoint to group on any available operation, such as search, recommendation, discovery, context search.

        Args:
            collection_name: Collection to search in
            query:
                Query for the chosen search type operation.
                - If `str` - use string as UUID of the existing point as a search query.
                - If `int` - use integer as ID of the existing point as a search query.
                - If `List[float]` - use as a dense vector for nearest search.
                - If `List[List[float]]` - use as a multi-vector for nearest search.
                - If `SparseVector` - use as a sparse vector for nearest search.
                - If `Query` - use as a query for specific search type.
                - If `NumpyArray` - use as a dense vector for nearest search.
                - If `Document` - infer vector from the document text and use it for nearest search (requires `fastembed` package installed).
                - If `None` - return first `limit` points from the collection.
            prefetch: prefetch queries to make a selection of the data to be used with the main query
            query_filter:
                - Exclude vectors which doesn't fit given conditions.
                - If `None` - search among all vectors
            search_params: Additional search params
            limit: How many results return
            group_size: How many results return for each group
            group_by: Name of the payload field to group by. Field must be of type "keyword" or "integer".
                Nested fields are specified using dot notation, e.g. "nested_field.subfield".
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` - Do not attach vector.
                - If List of string - include only specified fields
                - Default: `False`
            score_threshold:
                Define a minimal score threshold for the result.
                If defined, less similar results will not be returned.
                Score of the returned result might be higher or smaller than the threshold depending
                on the Distance function used.
                E.g. for cosine similarity only higher scores will be returned.
            using:
                Name of the vectors to use for query.
                If `None` - use default vectors or provided in named vector structures.
            with_lookup:
                Look for points in another collection using the group ids.
                If specified, each group will contain a record from the specified collection
                with the same id as the group id. In addition, the parameter allows to specify
                which parts of the record should be returned, like in `with_payload` and `with_vectors` parameters.
            lookup_from:
                Defines a location (collection and vector field name), used to lookup vectors being referenced in the query as IDs.
                If `None` - current collection will be used.
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Examples:

        `Search for closest points and group results`::

            qdrant.query_points_groups(
                collection_name="test_collection",
                query=[1.0, 0.1, 0.2, 0.7],
                group_by="color",
                group_size=3,
            )

         Returns:
            List of groups with not more than `group_size` hits in each group.
            Each group also contains an id of the group, which is the value of the payload field.
        r   rm   ri   r   r   ru   rv   r   rw   r   ry   rz   r{   r   r   rk   r}   r%   r0   )ro   rp   rq   r   rD   query_points_groups)r.   ri   r   r   r   r   ru   rv   rw   r   ry   rz   r{   r   r   rk   r}   r%   r+   s                      r4   r   z QdrantClient.query_points_groupsB  sC   ^ 6{{a!LtFKKMM7J7J!L!L RR
 
x
 0t|/ 
 
 
+O
%
 X
 &	

 (-
 X
 %
 "z
 &
 &
 ,O
 %
 $
 $
  21
  G#
 
 	
r6   r;   c                     t          |          dk    s,J dt          |                                                        | j        j        d|||||||||	|
||||d|S )a  Search for closest vectors grouped by payload field.

        Searches best matches for query vector grouped by the value of payload field.
        Useful to obtain most relevant results for each category, deduplicate results,
        finding the best representation vector for the same entity.

        Args:
            collection_name: Collection to search in
            query_vector:
                Search for vectors closest to this.
                Can be either a vector itself, or a named vector, or a named sparse vector, or a tuple of vector name and vector itself
            group_by: Name of the payload field to group by.
                Field must be of type "keyword" or "integer".
                Nested fields are specified using dot notation, e.g. "nested_field.subfield".
            query_filter:
                - Exclude vectors which doesn't fit given conditions.
                - If `None` - search among all vectors
            search_params: Additional search params
            limit: How many groups return
            group_size: How many results return for each group
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` - Do not attach vector.
                - If List of string - include only specified fields
                - Default: `False`
            score_threshold: Minimal score threshold for the result.
                If defined, less similar results will not be returned.
                Score of the returned result might be higher or smaller than the threshold depending
                on the Distance function used.
                E.g. for cosine similarity only higher scores will be returned.
            with_lookup:
                Look for points in another collection using the group ids.
                If specified, each group will contain a record from the specified collection
                with the same id as the group id. In addition, the parameter allows to specify
                which parts of the record should be returned, like in `with_payload` and `with_vectors` parameters.
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result.
                Values:
                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Returns:
            List of groups with not more than `group_size` hits in each group.
            Each group also contains an id of the group, which is the value of the payload field.
        r   rm   )ri   rt   r   ru   rv   rw   r   ry   rz   r{   r   rk   r}   r%   r0   )ro   rp   rq   rD   search_groups)r.   ri   rt   r   ru   rv   rw   r   ry   rz   r{   r   rk   r}   r%   r+   s                   r4   r   zQdrantClient.search_groups  s    d 6{{a!LtFKKMM7J7J!L!L)t|) 
+%%'!%%+##1
 
 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        d||||d|S )ai  Perform multiple recommend requests in batch mode

        Args:
            collection_name: Name of the collection
            requests: List of recommend requests
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Returns:
            List of recommend responses
        r   rm   rn   r0   )ro   rp   rq   rD   recommend_batchr   s         r4   r   zQdrantClient.recommend_batch4  su    4 6{{a!LtFKKMM7J7J!L!L+t|+ 
+#	
 

 
 
 	
r6   r   positivenegativestrategyc                    t          |          dk    s,J dt          |                                                        | j        j        di d|d|d|d|d|d|d	|d
|d|	d|
d|d|d|d|d|d||S )a  Recommend points: search for similar points based on already stored in Qdrant examples.

        Provide IDs of the stored points, and Qdrant will perform search based on already existing vectors.
        This functionality is especially useful for recommendation over existing collection of points.

        Args:
            collection_name: Collection to search in
            positive:
                List of stored point IDs or vectors, which should be used as reference for similarity search.
                If there is only one example - this request is equivalent to the regular search with vector of that
                point.
                If there are more than one example, Qdrant will attempt to search for similar to all of them.
                Recommendation for multiple vectors is experimental.
                Its behaviour may change depending on selected strategy.
            negative:
                List of stored point IDs or vectors, which should be dissimilar to the search result.
                Negative examples is an experimental functionality.
                Its behaviour may change depending on selected strategy.
            query_filter:
                - Exclude vectors which doesn't fit given conditions.
                - If `None` - search among all vectors
            search_params: Additional search params
            limit: How many results return
            offset:
                Offset of the first result to return.
                May be used to paginate results.
                Note: large offset values may cause performance issues.
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` - Do not attach vector.
                - If List of string - include only specified fields
                - Default: `False`
            score_threshold:
                Define a minimal score threshold for the result.
                If defined, less similar results will not be returned.
                Score of the returned result might be higher or smaller than the threshold depending
                on the Distance function used.
                E.g. for cosine similarity only higher scores will be returned.
            using:
                Name of the vectors to use for recommendations.
                If `None` - use default vectors.
            lookup_from:
                Defines a location (collection and vector field name), used to lookup vectors for recommendations.
                If `None` - current collection will be used.
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.
            strategy:
                Strategy to use for recommendation.
                Strategy defines how to combine multiple examples into a recommendation query.
                Possible values:

                - 'average_vector' - calculates average vector of all examples and uses it for search
                - 'best_score' - finds the result which is closer to positive examples and further from negative
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Returns:
            List of recommended points with similarity scores.
        r   rm   ri   r   r   ru   rv   rw   rx   ry   rz   r{   r   r   rk   r}   r   r%   r0   )ro   rp   rq   rD   	recommend)r.   ri   r   r   ru   rv   rw   rx   ry   rz   r{   r   r   r   rk   r}   r%   r+   s                     r4   r   zQdrantClient.recommendX  s    z 6{{a!LtFKKMM7J7J!L!L%t|% 
 
 
+O
X
 X
 &	

 (-
 %
 6
 &
 &
 ,O
 %
 $
 $
  21
 X
  G#
 
 	
r6   samplec	                     t          |	          dk    s,J dt          |	                                                        | j        j        d||||||||d|	S )a  
        Compute distance matrix for sampled points with a pair-based output format.

        Args:
            collection_name: Name of the collection.
            query_filter: Filter to apply.
            limit: How many neighbors per sample to find.
            sample: How many points to select and search within.
            using: Name of the vectors to use for search. If `None`, use default vectors.
            consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:
                - int: Number of replicas to query, values should be present in all queried replicas.
                - 'majority': Query all replicas, but return values present in the majority of replicas.
                - 'quorum': Query the majority of replicas, return values present in all of them.
                - 'all': Query all replicas, and return values present in all replicas.
            timeout: Overrides global timeout for this search. Unit is seconds.
            shard_key_selector: This parameter allows specifying which shards should be queried.
                If `None`, query all shards. Only works for collections with the `custom` sharding method.

        Returns:
            Distance matrix using a pair-based encoding.
        r   rm   ri   ru   rw   r   r   rk   r%   r}   r0   )ro   rp   rq   rD   search_matrix_pairs
r.   ri   ru   rw   r   r   rk   r%   r}   r+   s
             r4   r   z QdrantClient.search_matrix_pairs  s    D 6{{a!LtFKKMM7J7J!L!L/t|/ 

+%#1

 

 

 

 
	
r6   c	                     t          |	          dk    s,J dt          |	                                                        | j        j        d||||||||d|	S )a  
        Compute distance matrix for sampled points with an offset-based output format.

        Args:
            collection_name: Name of the collection.
            query_filter: Filter to apply.
            limit: How many neighbors per sample to find.
            sample: How many points to select and search within.
            using: Name of the vectors to use for search. If `None`, use default vectors.
            consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:
                - int: Number of replicas to query, values should present in all queried replicas.
                - 'majority': Query all replicas, but return values present in the majority of replicas.
                - 'quorum': Query the majority of replicas, return values present in all of them.
                - 'all': Query all replicas and return values present in all replicas.
            timeout: Overrides global timeout for this search. Unit is seconds.
            shard_key_selector: This parameter allows specifying which shards should be queried.
                If `None`, query all shards. Only works for collections with the `custom` sharding method.

        Returns:
            Distance matrix using an offset-based encoding.
        r   rm   r   r0   )ro   rp   rq   rD   search_matrix_offsetsr   s
             r4   r   z"QdrantClient.search_matrix_offsets  s    D 6{{a!LtFKKMM7J7J!L!L1t|1 

+%#1

 

 

 

 
	
r6   c                    t          |          dk    s,J dt          |                                                        | j        j        di d|d|d|d|d|d|d	|d
|d|	d|
d|d|d|d|d|d|d|d||S )ai  Recommend point groups: search for similar points based on already stored in Qdrant examples
        and groups by payload field.

        Recommend best matches for given stored examples grouped by the value of payload field.
        Useful to obtain most relevant results for each category, deduplicate results,
        finding the best representation vector for the same entity.

        Args:
            collection_name: Collection to search in
            positive:
                List of stored point IDs or vectors, which should be used as reference for similarity search.
                If there is only one example - this request is equivalent to the regular search with vector of that
                point.
                If there are more than one example, Qdrant will attempt to search for similar to all of them.
                Recommendation for multiple vectors is experimental.
                Its behaviour may change depending on selected strategy.
            negative:
                List of stored point IDs or vectors, which should be dissimilar to the search result.
                Negative examples is an experimental functionality.
                Its behaviour may change depending on selected strategy.
            group_by: Name of the payload field to group by.
                Field must be of type "keyword" or "integer".
                Nested fields are specified using dot notation, e.g. "nested_field.subfield".
            query_filter:
                - Exclude vectors which doesn't fit given conditions.
                - If `None` - search among all vectors
            search_params: Additional search params
            limit: How many groups return
            group_size: How many results return for each group
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` - Do not attach vector.
                - If List of string - include only specified fields
                - Default: `False`
            score_threshold:
                Define a minimal score threshold for the result.
                If defined, less similar results will not be returned.
                Score of the returned result might be higher or smaller than the threshold depending
                on the Distance function used.
                E.g. for cosine similarity only higher scores will be returned.
            using:
                Name of the vectors to use for recommendations.
                If `None` - use default vectors.
            lookup_from:
                Defines a location (collection and vector field name), used to lookup vectors for recommendations.
                If `None` - current collection will be used.
            with_lookup:
                Look for points in another collection using the group ids.
                If specified, each group will contain a record from the specified collection
                with the same id as the group id. In addition, the parameter allows to specify
                which parts of the record should be returned, like in `with_payload` and `with_vectors` parameters.
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.
            strategy:
                Strategy to use for recommendation.
                Strategy defines how to combine multiple examples into a recommendation query.
                Possible values:

                - 'average_vector' - calculates average vector of all examples and uses it for search
                - 'best_score' - finds the result which is closer to positive examples and further from negative
            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Returns:
            List of groups with not more than `group_size` hits in each group.
            Each group also contains an id of the group, which is the value of the payload field.

        r   rm   ri   r   r   r   ru   rv   rw   r   r{   ry   rz   r   r   r   r   rk   r}   r%   r0   )ro   rp   rq   rD   recommend_groups)r.   ri   r   r   r   ru   rv   rw   r   r{   ry   rz   r   r   r   r   rk   r}   r%   r+   s                       r4   r   zQdrantClient.recommend_groups+  s8   P 6{{a!LtFKKMM7J7J!L!L,t|, 
 
 
+O
X
 X
 X	

 &
 (-
 %
 "z
 ,O
 &
 &
 %
 $
 $
 X
  $!
"  21#
$ G'
 
 	
r6   targetcontextc                 D     | j         j        d|||||||||	|
||||d|S )a  
        Use context and a target to find the most similar points, constrained by the context.

        Args:
            collection_name: Collection to discover in

            target:
                Look for vectors closest to this.

                When using the target (with or without context), the integer part of the score represents the rank with respect to the context, while the decimal part of the score relates to the distance to the target.

            context:
                Pairs of { positive, negative } examples to constrain the search.

                When using only the context (without a target), a special search - called context search - is performed where pairs of points are used to generate a loss that guides the search towards the zone where most positive examples overlap. This means that the score minimizes the scenario of finding a point closer to a negative than to a positive part of a pair.

                Since the score of a context relates to loss, the maximum score a point can get is 0.0, and it becomes normal that many points can have a score of 0.0.

                For discovery search (when including a target), the context part of the score for each pair is calculated +1 if the point is closer to a positive than to a negative part of a pair, and -1 otherwise.

            query_filter:
                Look only for points which satisfies this conditions

            search_params:
                Additional search params

            limit:
                Max number of result to return

            offset:
                Offset of the first result to return. May be used to paginate results. Note: large offset values may cause performance issues.

            with_payload:
                Select which payload to return with the response. Default: None

            with_vectors:
                Whether to return the point vector with the result?

            using:
                Define which vector to use for recommendation, if not specified - try to use default vector.

            lookup_from:
                The location used to lookup vectors. If not specified - use current collection. Note: the other collection should have the same vector size as the current collection.

            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas

            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.

            timeout:
                Overrides global timeout for this search. Unit is seconds.

        Returns:
            List of discovered points with discovery or context scores, accordingly.
        )ri   r   r   ru   rv   rw   rx   ry   rz   r   r   rk   r}   r%   r0   )rD   discover)r.   ri   r   r   ru   rv   rw   rx   ry   rz   r   r   rk   r}   r%   r+   s                   r4   r   zQdrantClient.discover  s\    ` %t|$ 
+%'%%##1
 
 
 
 	
r6   c                 0     | j         j        d||||d|S )Nrn   r0   )rD   discover_batchr   s         r4   r   zQdrantClient.discover_batch  s=     +t|* 
+#	
 

 
 
 	
r6   scroll_filterorder_byc                     t          |          dk    s,J dt          |                                                        | j        j        d|||||||||	|
d
|S )a  Scroll over all (matching) points in the collection.

        This method provides a way to iterate over all stored points with some optional filtering condition.
        Scroll does not apply any similarity estimations, it will return points sorted by id in ascending order.

        Args:
            collection_name: Name of the collection
            scroll_filter: If provided - only returns points matching filtering conditions
            limit: How many points to return
            order_by: Order the records by a payload key. If `None` - order by id
            offset: If provided - skip points with ids less than given `offset`
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` (default) - Do not attach vector.
                - If List of string - include only specified fields
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas

            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.

            timeout:
                Overrides global timeout for this operation. Unit is seconds.

        Returns:
            A pair of (List of points) and (optional offset for the next scroll request).
            If next page offset is `None` - there is no more points in the collection to scroll.
        r   rm   )
ri   r   rw   r   rx   ry   rz   rk   r}   r%   r0   )ro   rp   rq   rD   scroll)r.   ri   r   rw   r   rx   ry   rz   rk   r}   r%   r+   s               r4   r   zQdrantClient.scroll  s    l 6{{a!LtFKKMM7J7J!L!L"t|" 
+'%%#1
 
 
 
 	
r6   count_filterexactc           	          t          |          dk    s,J dt          |                                                        | j        j        d|||||d|S )aR  Count points in the collection.

        Count points in the collection matching the given filter.

        Args:
            collection_name: name of the collection to count points in
            count_filter: filtering conditions
            exact:
                If `True` - provide the exact count of points matching the filter.
                If `False` - provide the approximate count of points matching the filter. Works faster.

            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.

            timeout:
                Overrides global timeout for this operation. Unit is seconds.

        Returns:
            Amount of points in the collection matching the filter.
        r   rm   )ri   r   r   r}   r%   r0   )ro   rp   rq   rD   count)r.   ri   r   r   r}   r%   r+   s          r4   r   zQdrantClient.countc  sx    < 6{{a!LtFKKMM7J7J!L!L!t|! 
+%1
 
 
 
 	
r6   r2   facet_filterc	                     t          |	          dk    s,J dt          |	                                                        | j        j        d||||||||d|	S )a  Facet counts for the collection. For a specific payload key, returns unique values along with their counts.
        Higher counts come first in the results.

        Args:
            collection_name: Name of the collection
            key: Payload field to facet
            facet_filter: Filter to apply
            limit: Maximum number of hits to return
            exact: If `True` - provide the exact count of points matching the filter. If `False` - provide the approximate count of points matching the filter. Works faster.

            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas
            timeout: Overrides global timeout for this search. Unit is seconds.
            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.

        Returns:
            Unique values in the facet and the amount of points that they cover.
        r   rm   )ri   r2   r   rw   r   rk   r%   r}   r0   )ro   rp   rq   rD   facet)
r.   ri   r2   r   rw   r   rk   r%   r}   r+   s
             r4   r   zQdrantClient.facet  s    J 6{{a!LtFKKMM7J7J!L!L!t|! 

+%#1

 

 

 

 
	
r6   pointswaitorderingc           	          t          |          dk    s,J dt          |                                                        | j        j        d|||||d|S )a[  
        Update or insert a new point into the collection.

        If point with given ID already exists - it will be overwritten.

        Args:
            collection_name (str): To which collection to insert
            points (Point): Batch or list of points to insert
            wait (bool): Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

            shard_key_selector:
                Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.

        Returns:
            Operation Result(UpdateResult)
        r   rm   ri   r   r   r   r}   r0   )ro   rp   rq   rD   upsertr.   ri   r   r   r   r}   r+   s          r4   r   zQdrantClient.upsert  sy    F 6{{a!LtFKKMM7J7J!L!L"t|" 
+1
 
 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                       | j                            |||||          S )a8  Update specified vectors in the collection. Keeps payload and unspecified vectors unchanged.

        Args:
            collection_name (str): Name of the collection to update vectors in
            points (Point): List of (id, vector) pairs to update. Vector might be a list of numbers or a dict of named vectors.
                Examples:

                - `PointVectors(id=1, vector=[1, 2, 3])`
                - `PointVectors(id=2, vector={'vector_1': [1, 2, 3], 'vector_2': [4, 5, 6]})`

            wait (bool): Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.

            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

            shard_key_selector:
                Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.

        Returns:
            Operation Result(UpdateResult)
        r   rm   r   )ro   rp   rq   rD   update_vectorsr   s          r4   r   zQdrantClient.update_vectors  sk    L 6{{a!LtFKKMM7J7J!L!L|**+1 + 
 
 	
r6   vectorsc                     t          |          dk    s,J dt          |                                                       | j                            ||||||          S )a  Delete specified vector from the collection. Does not affect payload.

        Args:

            collection_name (str): Name of the collection to delete vector from
            vectors: List of names of the vectors to delete. Use `""` to delete the default vector. At least one vector should be specified.
            points (Point): Selects points based on list of IDs or filter
                Examples:

                - `points=[1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90"]`
                - `points=Filter(must=[FieldCondition(key='rand_number', range=Range(gte=0.7))])`
            wait (bool): Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

            shard_key_selector:
                Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.

        Returns:
            Operation result
        r   rm   )ri   r   r   r   r   r}   )ro   rp   rq   rD   delete_vectors)r.   ri   r   r   r   r   r}   r+   s           r4   r   zQdrantClient.delete_vectors  sn    N 6{{a!LtFKKMM7J7J!L!L|**+1 + 
 
 	
r6   idsc                     t          |          dk    s,J dt          |                                                        | j        j        d|||||||d|S )a~  Retrieve stored points by IDs

        Args:
            collection_name: Name of the collection to lookup in
            ids: list of IDs to lookup
            with_payload:
                - Specify which stored payload should be attached to the result.
                - If `True` - attach all payload
                - If `False` - do not attach any payload
                - If List of string - include only specified fields
                - If `PayloadSelector` - use explicit rules
            with_vectors:
                - If `True` - Attach stored vector to the search result.
                - If `False` - Do not attach vector.
                - If List of string - Attach only specified vectors.
                - Default: `False`
            consistency:
                Read consistency of the search. Defines how many replicas should be queried before returning the result. Values:

                - int - number of replicas to query, values should present in all queried replicas
                - 'majority' - query all replicas, but return values present in the majority of replicas
                - 'quorum' - query the majority of replicas, return values present in all of them
                - 'all' - query all replicas, and return values present in all replicas

            shard_key_selector:
                This parameter allows to specify which shards should be queried.
                If `None` - query all shards. Only works for collections with `custom` sharding method.

            timeout:
                Overrides global timeout for this operation. Unit is seconds.

        Returns:
            List of points
        r   rm   )ri   r   ry   rz   rk   r}   r%   r0   )ro   rp   rq   rD   retrieve)	r.   ri   r   ry   rz   rk   r}   r%   r+   s	            r4   r   zQdrantClient.retrieveO  s    Z 6{{a!LtFKKMM7J7J!L!L$t|$ 	
+%%#1	
 	
 	
 	
 		
r6   points_selectorc           	          t          |          dk    s,J dt          |                                                        | j        j        d|||||d|S )a  Deletes selected points from collection

        Args:
            collection_name: Name of the collection
            wait: Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            points_selector: Selects points based on list of IDs or filter.
                Examples:

                - `points=[1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90"]`
                - `points=Filter(must=[FieldCondition(key='rand_number', range=Range(gte=0.7))])`
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

            shard_key_selector:
                Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.

        Returns:
            Operation result
        r   rm   ri   r   r   r   r}   r0   )ro   rp   rq   rD   deleter.   ri   r   r   r   r}   r+   s          r4   r   zQdrantClient.delete  sy    H 6{{a!LtFKKMM7J7J!L!L"t|" 
++1
 
 
 
 	
r6   payloadc                     t          |          dk    s,J dt          |                                                        | j        j        d|||||||d|S )aQ  
        Modifies payload of the specified points.

        Examples:

            `Set payload`::

                # Assign payload value with key `"key"` to points 1, 2, 3.
                # If payload value with specified key already exists - it will be overwritten
                qdrant_client.set_payload(
                    collection_name="test_collection",
                    wait=True,
                    payload={
                        "key": "value"
                    },
                    points=[1, 2, 3]
                )

        Args:
            collection_name: Name of the collection.
            wait: Await for the results to be processed.
                - If `true`, the result will be returned only when all changes are applied.
                - If `false`, the result will be returned immediately after confirmation of receipt.
            payload: Key-value pairs of payload to assign.
            points: List of affected points, filter, or points selector.
                Example:
                    - `points=[1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90"]`
                    - `points=Filter(must=[FieldCondition(key='rand_number', range=Range(gte=0.7))])`
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:
                - `weak` (default): Write operations may be reordered, works faster.
                - `medium`: Write operations go through a dynamically selected leader, may be inconsistent for a short period of time in case of leader change.
                - `strong`: Write operations go through the permanent leader, consistent, but may be unavailable if the leader is down.
            shard_key_selector: Defines the shard groups that should be used to write updates into.
                If multiple shard keys are provided, the update will be written to each of them.
                Only works for collections with the `custom` sharding method.
            key: Path to the nested field in the payload to modify. If not specified, modifies the root of the payload.
                E.g.::

                    PointStruct(
                        id=42,
                        vector=[...],
                        payload={
                            "recipe": {
                                "fruits": {"apple": "100g"}
                            }
                        }
                    )

                    qdrant_client.set_payload(
                        ...,
                        payload={"cinnamon": "2g"},
                        key="recipe.fruits",
                        points=[42]
                    )

                    PointStruct(
                        id=42,
                        vector=[...],
                        payload={
                            "recipe": {
                                "fruits": {
                                    "apple": "100g",
                                    "cinnamon": "2g"
                                }
                            }
                        }
                    )

        Returns:
            Operation result.
        r   rm   )ri   r   r   r   r   r}   r2   r0   )ro   rp   rq   rD   set_payload)	r.   ri   r   r   r2   r   r   r}   r+   s	            r4   r   zQdrantClient.set_payload  s    f 6{{a!LtFKKMM7J7J!L!L't|' 	
+1	
 	
 	
 	
 		
r6   c           
          t          |          dk    s,J dt          |                                                        | j        j        d||||||d|S )aq  Overwrites payload of the specified points
        After this operation is applied, only the specified payload will be present in the point.
        The existing payload, even if the key is not specified in the payload, will be deleted.

        Examples:

        `Set payload`::

            # Overwrite payload value with key `"key"` to points 1, 2, 3.
            # If any other valid payload value exists - it will be deleted
            qdrant_client.overwrite_payload(
                collection_name="test_collection",
                wait=True,
                payload={
                    "key": "value"
                },
                points=[1,2,3]
            )

        Args:
            collection_name: Name of the collection
            wait: Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            payload: Key-value pairs of payload to assign
            points: List of affected points, filter or points selector.
                Example:
                    - `points=[1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90"]`
                    - `points=Filter(must=[FieldCondition(key='rand_number', range=Range(gte=0.7))])`

            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

            shard_key_selector:
                Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.

        Returns:
            Operation result
        r   rm   )ri   r   r   r   r   r}   r0   )ro   rp   rq   rD   overwrite_payload)r.   ri   r   r   r   r   r}   r+   s           r4   r   zQdrantClient.overwrite_payload  s|    n 6{{a!LtFKKMM7J7J!L!L-t|- 
+1
 
 
 
 	
r6   rq   c           
          t          |          dk    s,J dt          |                                                        | j        j        d||||||d|S )a  Remove values from point's payload

        Args:
            collection_name: Name of the collection
            wait: Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            keys: List of payload keys to remove
            points: List of affected points, filter or points selector.
                Example:
                    - `points=[1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90"]`
                    - `points=Filter(must=[FieldCondition(key='rand_number', range=Range(gte=0.7))])`
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is downn

            shard_key_selector:
                Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.

        Returns:
            Operation result
        r   rm   )ri   rq   r   r   r   r}   r0   )ro   rp   rq   rD   delete_payload)r.   ri   rq   r   r   r   r}   r+   s           r4   r   zQdrantClient.delete_payload[  s|    J 6{{a!LtFKKMM7J7J!L!L*t|* 
+1
 
 
 
 	
r6   c           	          t          |          dk    s,J dt          |                                                        | j        j        d|||||d|S )a  Delete all payload for selected points

        Args:
            collection_name: Name of the collection
            wait: Await for the results to be processed.
                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            points_selector: List of affected points, filter or points selector. Example:
                - `points=[1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90"]`
                - `points=Filter(must=[FieldCondition(key='rand_number', range=Range(gte=0.7))])`
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

            shard_key_selector:
                Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.

        Returns:
            Operation result
        r   rm   r   r0   )ro   rp   rq   rD   clear_payloadr   s          r4   r   zQdrantClient.clear_payload  sy    B 6{{a!LtFKKMM7J7J!L!L)t|) 
++1
 
 
 
 	
r6   update_operationsc                     t          |          dk    s,J dt          |                                                        | j        j        d||||d|S )a  Batch update points in the collection.

        Args:
            collection_name: Name of the collection
            update_operations: List of update operations
            wait: Await for the results to be processed.
                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

        Returns:
            Operation results
        r   rm   )ri   r   r   r   r0   )ro   rp   rq   rD   batch_update_points)r.   ri   r   r   r   r+   s         r4   r   z QdrantClient.batch_update_points  su    4 6{{a!LtFKKMM7J7J!L!L/t|/ 
+/	
 

 
 
 	
r6   change_aliases_operationsc                     t          |          dk    s,J dt          |                                                        | j        j        d||d|S )a  Operation for performing changes of collection aliases.

        Alias changes are atomic, meaning that no collection modifications can happen between alias operations.

        Args:
            change_aliases_operations: List of operations to perform
            timeout:
                Wait for operation commit timeout in seconds.
                If timeout is reached - request will return with service error.

        Returns:
            Operation result
        r   rm   )r   r%   r0   )ro   rp   rq   rD   update_collection_aliases)r.   r   r%   r+   s       r4   r   z&QdrantClient.update_collection_aliases  so    & 6{{a!LtFKKMM7J7J!L!L5t|5 
&?
 
 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        dd|i|S )zGet collection aliases

        Args:
            collection_name: Name of the collection

        Returns:
            Collection aliases
        r   rm   ri   r0   )ro   rp   rq   rD   get_collection_aliasesr.   ri   r+   s      r4   r   z#QdrantClient.get_collection_aliases  s]     6{{a!LtFKKMM7J7J!L!L2t|2]]?]V\]]]r6   c                     t          |          dk    s,J dt          |                                                        | j        j        di |S )zUGet all aliases

        Returns:
            All aliases of all collections
        r   rm   r0   )ro   rp   rq   rD   get_aliasesr.   r+   s     r4   r   zQdrantClient.get_aliases  sW     6{{a!LtFKKMM7J7J!L!L't|'11&111r6   c                     t          |          dk    s,J dt          |                                                        | j        j        di |S )zhGet list name of all existing collections

        Returns:
            List of the collections
        r   rm   r0   )ro   rp   rq   rD   get_collectionsr   s     r4   r   zQdrantClient.get_collections  sW     6{{a!LtFKKMM7J7J!L!L+t|+55f555r6   c                     t          |          dk    s,J dt          |                                                        | j        j        dd|i|S )zGet detailed information about specified existing collection

        Args:
            collection_name: Name of the collection

        Returns:
            Detailed information about the collection
        r   rm   ri   r0   )ro   rp   rq   rD   get_collectionr   s      r4   r   zQdrantClient.get_collection  s\     6{{a!LtFKKMM7J7J!L!L*t|*UU?UfUUUr6   c                     t          |          dk    s,J dt          |                                                        | j        j        dd|i|S )zCheck whether collection already exists

        Args:
            collection_name: Name of the collection

        Returns:
            True if collection exists, False if not
        r   rm   ri   r0   )ro   rp   rq   rD   collection_existsr   s      r4   r   zQdrantClient.collection_exists&  s]     6{{a!LtFKKMM7J7J!L!L-t|-XXoXQWXXXr6   optimizers_configcollection_paramsvectors_confighnsw_configquantization_configsparse_vectors_configc	                    d|	v r|t          d          d|	v r|	                    d          }t          |	          dk    s,J dt          |	                                                        | j        j        d||||||||d|	S )a  Update parameters of the collection

        Args:
            collection_name: Name of the collection
            optimizers_config: Override for optimizer configuration
            collection_params: Override for collection parameters
            vectors_config: Override for vector-specific configuration
            hnsw_config: Override for HNSW index params
            quantization_config: Override for quantization params
            timeout:
                Wait for operation commit timeout in seconds.
                If timeout is reached - request will return with service error.
            sparse_vectors_config: Override for sparse vector-specific configuration
        Returns:
            Operation result
        optimizer_configNzFOnly one of optimizer_config and optimizers_config should be specifiedr   rm   )ri   r   r   r   r   r   r%   r   r0   )rC   popro   rp   rq   rD   update_collection)
r.   ri   r   r   r   r   r   r%   r   r+   s
             r4   r   zQdrantClient.update_collection3  s    8 '',=,IX   '' &

+= > >6{{a!LtFKKMM7J7J!L!L-t|- 

+//)# 3"7

 

 

 

 
	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        d||d|S )aL  Removes collection and all it's data

        Args:
            collection_name: Name of the collection to delete
            timeout:
                Wait for operation commit timeout in seconds.
                If timeout is reached - request will return with service error.

        Returns:
            Operation result
        r   rm   )ri   r%   r0   )ro   rp   rq   rD   delete_collection)r.   ri   r%   r+   s       r4   r   zQdrantClient.delete_collectione  sl     6{{a!LtFKKMM7J7J!L!L-t|- 
+W
 
@F
 
 	
r6   shard_numbersharding_methodreplication_factorwrite_consistency_factoron_disk_payload
wal_config	init_fromc                     t          |          dk    s,J dt          |                                                        | j        j        d||||||||	|
|||||d|S )a  Create empty collection with given parameters

        Args:
            collection_name: Name of the collection to recreate
            vectors_config:
                Configuration of the vector storage. Vector params contains size and distance for the vector storage.
                If dict is passed, service will create a vector storage for each key in the dict.
                If single VectorParams is passed, service will create a single anonymous vector storage.
            sparse_vectors_config:
                Configuration of the sparse vector storage.
                The service will create a sparse vector storage for each key in the dict.
            shard_number: Number of shards in collection. Default is 1, minimum is 1.
            sharding_method:
                Defines strategy for shard creation.
                Option `auto` (default) creates defined number of shards automatically.
                Data will be distributed between shards automatically.
                After creation, shards could be additionally replicated, but new shards could not be created.
                Option `custom` allows to create shards manually, each shard should be created with assigned
                unique `shard_key`. Data will be distributed between based on `shard_key` value.
            replication_factor:
                Replication factor for collection. Default is 1, minimum is 1.
                Defines how many copies of each shard will be created.
                Have effect only in distributed mode.
            write_consistency_factor:
                Write consistency factor for collection. Default is 1, minimum is 1.
                Defines how many replicas should apply the operation for us to consider it successful.
                Increasing this number will make the collection more resilient to inconsistencies, but will
                also make it fail if not enough replicas are available.
                Does not have any performance impact.
                Have effect only in distributed mode.
            on_disk_payload:
                If true - point`s payload will not be stored in memory.
                It will be read from the disk every time it is requested.
                This setting saves RAM by (slightly) increasing the response time.
                Note: those payload values that are involved in filtering and are indexed - remain in RAM.
            hnsw_config: Params for HNSW index
            optimizers_config: Params for optimizer
            wal_config: Params for Write-Ahead-Log
            quantization_config: Params for quantization, if None - quantization will be disabled
            init_from: Use data stored in another collection to initialize this collection
            timeout:
                Wait for operation commit timeout in seconds.
                If timeout is reached - request will return with service error.

        Returns:
            Operation result
        r   rm   ri   r   r   r   r   r   r   r   r   r   r   r   r%   r   r0   )ro   rp   rq   rD   create_collectionr.   ri   r   r   r   r   r   r   r   r   r   r   r   r   r%   r+   s                   r4   r   zQdrantClient.create_collectiony  s    B 6{{a!LtFKKMM7J7J!L!L-t|- 
+)%+1%=+#/! 3"7
 
 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                       t          j        dt
          d            | j        j        d||||||||	|
|||||d|S )a  Delete and create empty collection with given parameters

        Args:
            collection_name: Name of the collection to recreate
            vectors_config:
                Configuration of the vector storage. Vector params contains size and distance for the vector storage.
                If dict is passed, service will create a vector storage for each key in the dict.
                If single VectorParams is passed, service will create a single anonymous vector storage.
            sparse_vectors_config:
                Configuration of the sparse vector storage.
                The service will create a sparse vector storage for each key in the dict.
            shard_number: Number of shards in collection. Default is 1, minimum is 1.
            sharding_method:
                Defines strategy for shard creation.
                Option `auto` (default) creates defined number of shards automatically.
                Data will be distributed between shards automatically.
                After creation, shards could be additionally replicated, but new shards could not be created.
                Option `custom` allows to create shards manually, each shard should be created with assigned
                unique `shard_key`. Data will be distributed between based on `shard_key` value.
            replication_factor:
                Replication factor for collection. Default is 1, minimum is 1.
                Defines how many copies of each shard will be created.
                Have effect only in distributed mode.
            write_consistency_factor:
                Write consistency factor for collection. Default is 1, minimum is 1.
                Defines how many replicas should apply the operation for us to consider it successful.
                Increasing this number will make the collection more resilient to inconsistencies, but will
                also make it fail if not enough replicas are available.
                Does not have any performance impact.
                Have effect only in distributed mode.
            on_disk_payload:
                If true - point`s payload will not be stored in memory.
                It will be read from the disk every time it is requested.
                This setting saves RAM by (slightly) increasing the response time.
                Note: those payload values that are involved in filtering and are indexed - remain in RAM.
            hnsw_config: Params for HNSW index
            optimizers_config: Params for optimizer
            wal_config: Params for Write-Ahead-Log
            quantization_config: Params for quantization, if None - quantization will be disabled
            init_from: Use data stored in another collection to initialize this collection
            timeout:
                Wait for operation commit timeout in seconds.
                If timeout is reached - request will return with service error.

        Returns:
            Operation result
        r   rm   z`recreate_collection` method is deprecated and will be removed in the future. Use `collection_exists` to check collection existence and `create_collection` instead.rX   rY   r   r0   )ro   rp   rq   r[   r\   r]   rD   recreate_collectionr   s                   r4   r   z QdrantClient.recreate_collection  s    B 6{{a!LtFKKMM7J7J!L!Lf		
 	
 	
 	
 0t|/ 
+)%+1%=+#/! 3"7
 
 
 
 	
r6   @   records
batch_sizeparallelmethodmax_retriesc	           
          t          j        dt          d           t          |	          dk    s,J dt	          |	                                                       | j                            ||||||||          S )a-  Upload records to the collection

        Similar to `upload_collection` method, but operates with records, rather than vector and payload individually.

        Args:
            collection_name:  Name of the collection to upload to
            records: Iterator over records to upload
            batch_size: How many vectors upload per-request, Default: 64
            parallel: Number of parallel processes of upload
            method: Start method for parallel processes, Default: forkserver
            max_retries: maximum number of retries in case of a failure
                during the upload of a batch
            wait:
                Await for the results to be applied on the server side.
                If `true`, each update request will explicitly wait for the confirmation of completion. Might be slower.
                If `false`, each update request will return immediately after the confirmation of receiving.
                Default: `false`
            shard_key_selector: Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.
                This parameter overwrites shard keys written in the records.

        z;`upload_records` is deprecated, use `upload_points` insteadrX   rY   r   rm   )ri   r   r   r   r   r   r   r}   )r[   r\   r]   ro   rp   rq   rD   upload_records)
r.   ri   r   r   r   r   r   r   r}   r+   s
             r4   r  zQdrantClient.upload_records,	  s    F 	I	
 	
 	
 	
 6{{a!LtFKKMM7J7J!L!L|**+!#1 + 	
 	
 		
r6   c	           
          t          |	          dk    s,J dt          |	                                                       | j                            ||||||||          S )a)  Upload points to the collection

        Similar to `upload_collection` method, but operates with points, rather than vector and payload individually.

        Args:
            collection_name:  Name of the collection to upload to
            points: Iterator over points to upload
            batch_size: How many vectors upload per-request, Default: 64
            parallel: Number of parallel processes of upload
            method: Start method for parallel processes, Default: forkserver
            max_retries: maximum number of retries in case of a failure
                during the upload of a batch
            wait:
                Await for the results to be applied on the server side.
                If `true`, each update request will explicitly wait for the confirmation of completion. Might be slower.
                If `false`, each update request will return immediately after the confirmation of receiving.
                Default: `false`
            shard_key_selector: Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.
                This parameter overwrites shard keys written in the records.

        r   rm   )ri   r   r   r   r   r   r   r}   )ro   rp   rq   rD   upload_points)
r.   ri   r   r   r   r   r   r   r}   r+   s
             r4   r  zQdrantClient.upload_pointsb	  st    F 6{{a!LtFKKMM7J7J!L!L|))+!#1 * 	
 	
 		
r6   c                     t          |          dk    s,J dt          |                                                       | j                            |||||||||	|

  
        S )a  Upload vectors and payload to the collection.
        This method will perform automatic batching of the data.
        If you need to perform a single update, use `upsert` method.
        Note: use `upload_records` method if you want to upload multiple vectors with single payload.

        Args:
            collection_name:  Name of the collection to upload to
            vectors: np.ndarray or an iterable over vectors to upload. Might be mmaped
            payload: Iterable of vectors payload, Optional, Default: None
            ids: Iterable of custom vectors ids, Optional, Default: None
            batch_size: How many vectors upload per-request, Default: 64
            parallel: Number of parallel processes of upload
            method: Start method for parallel processes, Default: forkserver
            max_retries: maximum number of retries in case of a failure
                during the upload of a batch
            wait:
                Await for the results to be applied on the server side.
                If `true`, each update request will explicitly wait for the confirmation of completion. Might be slower.
                If `false`, each update request will return immediately after the confirmation of receiving.
                Default: `false`
            shard_key_selector: Defines the shard groups that should be used to write updates into.
                If multiple shard_keys are provided, the update will be written to each of them.
                Only works for collections with `custom` sharding method.
        r   rm   )
ri   r   r   r   r   r   r   r   r   r}   )ro   rp   rq   rD   upload_collection)r.   ri   r   r   r   r   r   r   r   r   r}   r+   s               r4   r  zQdrantClient.upload_collection	  sz    T 6{{a!LtFKKMM7J7J!L!L|--+!#1 . 
 
 	
r6   
field_namefield_schema
field_typec           
          t          |          dk    s,J dt          |                                                        | j        j        d||||||d|S )aj  Creates index for a given payload field.
        Indexed fields allow to perform filtered search operations faster.

        Args:
            collection_name: Name of the collection
            field_name: Name of the payload field
            field_schema: Type of data to index
            field_type: Same as field_schema, but deprecated
            wait: Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

        Returns:
            Operation Result
        r   rm   )ri   r  r  r	  r   r   r0   )ro   rp   rq   rD   create_payload_index)r.   ri   r  r  r	  r   r   r+   s           r4   r  z!QdrantClient.create_payload_index	  s{    > 6{{a!LtFKKMM7J7J!L!L0t|0 
+!%!
 
 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        d||||d|S )a  Removes index for a given payload field.

        Args:
            collection_name: Name of the collection
            field_name: Name of the payload field
            wait: Await for the results to be processed.

                - If `true`, result will be returned only when all changes are applied
                - If `false`, result will be returned immediately after the confirmation of receiving.
            ordering (Optional[WriteOrdering]): Define strategy for ordering of the points. Possible values:

                - `weak` (default) - write operations may be reordered, works faster
                - `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change
                - `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

        Returns:
            Operation Result
        r   rm   )ri   r  r   r   r0   )ro   rp   rq   rD   delete_payload_index)r.   ri   r  r   r   r+   s         r4   r  z!QdrantClient.delete_payload_index	  su    4 6{{a!LtFKKMM7J7J!L!L0t|0 
+!	
 

 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        dd|i|S )zList all snapshots for a given collection.

        Args:
            collection_name: Name of the collection

        Returns:
            List of snapshots
        r   rm   ri   r0   )ro   rp   rq   rD   list_snapshotsr   s      r4   r  zQdrantClient.list_snapshots
  s\     6{{a!LtFKKMM7J7J!L!L*t|*UU?UfUUUr6   c                     t          |          dk    s,J dt          |                                                        | j        j        d||d|S )a  Create snapshot for a given collection.

        Args:
            collection_name: Name of the collection
            wait: Await for the snapshot to be created.

                - If `true`, result will be returned only when a snapshot is created
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            Snapshot description
        r   rm   )ri   r   r0   )ro   rp   rq   rD   create_snapshot)r.   ri   r   r+   s       r4   r  zQdrantClient.create_snapshot)
  s`     6{{a!LtFKKMM7J7J!L!L+t|+aORVaaZ`aaar6   snapshot_namec                     t          |          dk    s,J dt          |                                                        | j        j        d|||d|S )a  Delete snapshot for a given collection.

        Args:
            collection_name: Name of the collection
            snapshot_name: Snapshot id
            wait: Await for the snapshot to be deleted.

                - If `true`, result will be returned only when the snapshot is deleted
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            True if snapshot was deleted
        r   rm   )ri   r  r   r0   )ro   rp   rq   rD   delete_snapshot)r.   ri   r  r   r+   s        r4   r  zQdrantClient.delete_snapshot<
  sr      6{{a!LtFKKMM7J7J!L!L+t|+ 
+'
 
 	
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        di |S )z_List all snapshots for a whole storage

        Returns:
            List of snapshots
        r   rm   r0   )ro   rp   rq   rD   list_full_snapshotsr   s     r4   r  z QdrantClient.list_full_snapshotsU
  sW     6{{a!LtFKKMM7J7J!L!L/t|/99&999r6   c                     t          |          dk    s,J dt          |                                                        | j        j        dd|i|S )af  Create snapshot for a whole storage.

        Args:
            wait: Await for the snapshot to be created.

                - If `true`, result will be returned only when the snapshot is created
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            Snapshot description
        r   rm   r   r0   )ro   rp   rq   rD   create_full_snapshot)r.   r   r+   s      r4   r  z!QdrantClient.create_full_snapshot_
  s\     6{{a!LtFKKMM7J7J!L!L0t|0EEdEfEEEr6   c                     t          |          dk    s,J dt          |                                                        | j        j        d||d|S )a  Delete snapshot for a whole storage.

        Args:
            snapshot_name: Snapshot name
            wait: Await for the snapshot to be deleted.

                - If `true`, result will be returned only when the snapshot is deleted
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            True if snapshot was deleted
        r   rm   )r  r   r0   )ro   rp   rq   rD   delete_full_snapshot)r.   r  r   r+   s       r4   r  z!QdrantClient.delete_full_snapshotq
  s`     6{{a!LtFKKMM7J7J!L!L0t|0b}SWbb[abbbr6   checksumpriorityc           
          t          |          dk    s,J dt          |                                                        | j        j        d||||||d|S )a  Recover collection from snapshot.

        Args:
            collection_name: Name of the collection
            location: URL of the snapshot
                Example:
                - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot`
                - Local path `file:///qdrant/snapshots/test_collection/test_collection-6194298859870377-2023-11-09-15-17-51.snapshot`

            api_key: API key to use for accessing the snapshot on another server.

            checksum: Checksum of the snapshot to verify the integrity of the snapshot.

            priority: Defines source of truth for snapshot recovery

                - `replica` (default) means - prefer existing data over the snapshot
                - `no_sync` means - do not sync shard with other shards
                - `snapshot` means - prefer snapshot data over the current state

            wait: Await for the recovery to be done.

                - If `true`, result will be returned only when the recovery is done
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            True if snapshot was recovered
        r   rm   )ri   r   r#   r  r  r   r0   )ro   rp   rq   rD   recover_snapshot)r.   ri   r   r#   r  r  r   r+   s           r4   r  zQdrantClient.recover_snapshot
  s|    J 6{{a!LtFKKMM7J7J!L!L,t|, 
+
 
 
 
 	
r6   shard_idc                     t          |          dk    s,J dt          |                                                        | j        j        d||d|S )zList all snapshots of a given shard

        Args:
            collection_name: Name of the collection
            shard_id: Index of the shard

        Returns:
            List of snapshots
        r   rm   )ri   r  r0   )ro   rp   rq   rD   list_shard_snapshots)r.   ri   r  r+   s       r4   r!  z!QdrantClient.list_shard_snapshots
  so     6{{a!LtFKKMM7J7J!L!L0t|0 
+
 
 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        d|||d|S )a  Create snapshot for a given shard.

        Args:
            collection_name: Name of the collection
            shard_id: Index of the shard
            wait: Await for the snapshot to be created.

                - If `true`, result will be returned only when the snapshot is created.
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            Snapshot description
        r   rm   )ri   r  r   r0   )ro   rp   rq   rD   create_shard_snapshot)r.   ri   r  r   r+   s        r4   r#  z"QdrantClient.create_shard_snapshot
  sr      6{{a!LtFKKMM7J7J!L!L1t|1 
+
 
 	
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        d||||d|S )a  Delete snapshot for a given shard.

        Args:
            collection_name: Name of the collection
            shard_id: Index of the shard
            snapshot_name: Snapshot id
            wait: Await for the snapshot to be deleted.

                - If `true`, result will be returned only when the snapshot is deleted
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            True if snapshot was deleted
        r   rm   )ri   r  r  r   r0   )ro   rp   rq   rD   delete_shard_snapshot)r.   ri   r  r  r   r+   s         r4   r%  z"QdrantClient.delete_shard_snapshot
  su    . 6{{a!LtFKKMM7J7J!L!L1t|1 
+'	
 

 
 
 	
r6   c                     t          |          dk    s,J dt          |                                                        | j        j        d|||||||d|S )a>  Recover shard from snapshot.

        Args:
            collection_name: Name of the collection
            shard_id: Index of the shard
            location: URL of the snapshot
                Example:
                - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot`

            api_key: API key to use for accessing the snapshot on another server.
            checksum: Checksum of the snapshot to verify the integrity of the snapshot.
            priority: Defines source of truth for snapshot recovery

                - `replica` (default) means - prefer existing data over the snapshot
                - `no_sync` means - do not sync shard with other shards
                - `snapshot` means - prefer snapshot data over the current state
            wait: Await for the recovery to be done.

                - If `true`, result will be returned only when the recovery is done
                - If `false`, result will be returned immediately after the confirmation of receiving.

        Returns:
            True if snapshot was recovered
        r   rm   )ri   r  r   r#   r  r  r   r0   )ro   rp   rq   rD   recover_shard_snapshot)	r.   ri   r  r   r#   r  r  r   r+   s	            r4   r'  z#QdrantClient.recover_shard_snapshot  s    H 6{{a!LtFKKMM7J7J!L!L2t|2 	
+	
 	
 	
 	
 		
r6   reasonc                     t          |          dk    s,J dt          |                                                        | j        j        dd|i|S )zLock storage for writing.r   rm   r(  r0   )ro   rp   rq   rD   lock_storage)r.   r(  r+   s      r4   r*  zQdrantClient.lock_storage4  sZ    6{{a!LtFKKMM7J7J!L!L(t|(AAA&AAAr6   c                     t          |          dk    s,J dt          |                                                        | j        j        di |S )zUnlock storage for writing.r   rm   r0   )ro   rp   rq   rD   unlock_storager   s     r4   r,  zQdrantClient.unlock_storage:  sU    6{{a!LtFKKMM7J7J!L!L*t|*44V444r6   c                     t          |          dk    s,J dt          |                                                        | j        j        di |S )zGet current locks state.r   rm   r0   )ro   rp   rq   rD   	get_locksr   s     r4   r.  zQdrantClient.get_locks@  sU    6{{a!LtFKKMM7J7J!L!L%t|%/////r6   d   dest_clientcollection_namesrecreate_on_collisionc                 .    t          | ||||           dS )a  Migrate data from one Qdrant instance to another.

        Args:
            dest_client: Destination Qdrant instance either in local or remote mode
            collection_names: List of collection names to migrate. If None - migrate all collections
            batch_size: Batch size to be in scroll and upsert operations during migration
            recreate_on_collision: If True - recreate collection on destination if it already exists, otherwise
                raise ValueError exception
        )r1  r   r2  Nr   )r.   r0  r1  r   r2  s        r4   r   zQdrantClient.migrateF  s4      	-!"7	
 	
 	
 	
 	
 	
r6   	shard_keyshards_number	placementc           	      2     | j         j        d|||||d|S )a  Create shard key for collection.

        Only works for collections with `custom` sharding method.

        Args:
            collection_name: Name of the collection
            shard_key: Shard key to create
            shards_number: How many shards to create for this key
            replication_factor: Replication factor for this key
            placement: List of peers to place shards on. If None - place on all peers.

        Returns:
            Operation result
        )ri   r4  r5  r   r6  r0   )rD   create_shard_key)r.   ri   r4  r5  r   r6  r+   s          r4   r8  zQdrantClient.create_shard_key^  s@    . -t|, 
+'1
 
 
 
 	
r6   c                 ,     | j         j        d||d|S )a	  Delete shard key for collection.

        Only works for collections with `custom` sharding method.

        Args:
            collection_name: Name of the collection
            shard_key: Shard key to delete

        Returns:
            Operation result
        )ri   r4  r0   )rD   delete_shard_key)r.   ri   r4  r+   s       r4   r:  zQdrantClient.delete_shard_key~  s7    " -t|, 
+
 
 
 
 	
r6   c                 4    | j                                         S )zReturns information about the running Qdrant instance like version and commit id

        Returns:
            Title, version and optionally commit info

        )rD   inforH   s    r4   r<  zQdrantClient.info  s     |  """r6   )NNr   r   FNNNNNNFNN)rE   Nr8   )NN)NNrs   NTFNTNNN)NNNNNrs   NTFNNNNN)NNNNNrs   r   TFNNNNNN)NNrs   r;   TFNNNNN)NNNNrs   r   TFNNNNNNN)Nr   rs   NNNN)NNNNrs   r;   NTFNNNNNNN)NNNNrs   r   TFNNNNN)	Nrs   NNTFNNN)NTNN)Nrs   FNNN)TNN)TFNNN)TN)NNNNNNN)NNNNNNNNNNNN)r   r;   Nr   FN)NNr   r;   Nr   FN)NNTN)T)NNNT)Nr/  F)NNN)__name__
__module____qualname____doc__r   strintboolr   r   r   r   r   r=   rI   floatrG   propertyr   CollectionsStubrQ   
PointsStubrV   r^   r`   r   r   rd   rf   rh   r   typesSearchRequestReadConsistencyr	   ScoredPointrr   r   NamedVectorNamedSparseVector
NumpyArrayFilterSearchParamsPayloadSelectorShardKeySelectorr   QueryRequestQueryResponser   PointIdSparseVectorQueryDocumentPrefetchLookupLocationr   WithLookupInterfaceGroupsResultr   r   RecommendRequestr   RecommendExampleRecommendStrategyr   SearchMatrixPairsResponser   SearchMatrixOffsetsResponser   r   TargetVectorContextExamplePairr   DiscoverRequestr   OrderByRecordr   CountResultr   FacetResponser   PointsWriteOrderingUpdateResultr   PointVectorsr   PointsSelectorr   r   r   Payloadr   r   r   r   UpdateOperationr   AliasOperationsr   CollectionsAliasesResponser   r   CollectionsResponser   CollectionInfor   r   OptimizersConfigDiffCollectionParamsDiffVectorsConfigDiffHnswConfigDiffQuantizationConfigDiffr
   SparseVectorParamsr   r   VectorParamsShardingMethodWalConfigDiffQuantizationConfigInitFromr   r   r   r  PointStructr  VectorStructr  PayloadSchemaTyper  r  SnapshotDescriptionr  r  r  r  r  r  SnapshotPriorityr  r!  r#  r%  r'  LocksOptionr*  r,  r.  r   r   ShardKeyr8  r:  VersionInfor<  __classcell__)r/   s   @r4   r   r      s&       1 1j #'!"! $!% $!%""0515 #D D3-D c]D sm	D
 D D ~D #D D #D smD smD *.D tCH~.D &(2s7#Xb)C..@%AAB
D$ %D D D D D DL   @ @ @# @$ @ @ @ @ 	\$"6 	\ 	\ 	\ X	\ 	\T_ 	\ 	\ 	\ X	\ \4? \ \ \ X\  \(< \ \ \ X\  \hy) \ \ \ X\  	\hy) 	\ 	\ 	\ X	\ "d38n " " " X" "&7;"
 "
"
 5./"
 #	"

 e34"
 "
 
d5$%	&"
 "
 "
 "
\ 046: $JN38+/#7;?C!%)m
 m
m
 UO#tE{"##	
m
 u|,m
   23m
 m
 m
 D(3-1FFGm
 D(3-/0m
  "%!m
" #m
$ e34%m
& %U%;<'m
( #)m
* +m
, 
e	 -m
 m
 m
 m
f 8<!%"
 "
"
 5-."
 e34	"

 #"
 "
 
e!	""
 "
 "
 "
` #FJ/36: $JN38+/6:7;?C!%3H
 H
H
 MKeKN	
H
 }H
 U^(<dBCH
 u|,H
    23!H
" #H
$ %H
& D(3-1FFG'H
( D(3-/0)H
* "%+H
, e23-H
. e34/H
0 %U%;<1H
2 #3H
4 5H
6 
	7H
 H
 H
 H
n #FJ/36:JN38+/;?6:7;?C!%7J
 J
J
 J
 MKeKN	
	J
 }J
 U^(<dBCJ
  u|,!J
"   23#J
$ %J
& 'J
( D(3-1FFG)J
* D(3-/0+J
, "%-J
. e78/J
0 e231J
2 e343J
4 %U%;<5J
6 #7J
8 9J
: 
	;J
 J
 J
 J
n 046:JN38+/;?7;?C!%+d
 d
d
 UO#tE{"##	
d
 d
 u|,d
   23d
 d
 d
 D(3-1FFGd
  D(3-/0!d
" "%#d
$ e78%d
& e34'd
( %U%;<)d
* #+d
, -d
. 
	/d
 d
 d
 d
T 8<!%"
 "
"
 512"
 e34	"

 #"
 "
 
d5$%	&"
 "
 "
 "
N @D?C/36:FJ/4+/#6:6:7;?C!%#q
 q
q
 8E$:;<q
 8E$:;<	q

 u|,q
   23q
 q
 q
 D$s)U-BBCq
 D$s)O,q
 "%q
 }q
 e23q
 523q
 e34q
  %U%;<!q
" ##q
$ %q
& 
e	 'q
 q
 q
 q
l 04#7;!%?C.
 .
.
 u|,.
 	.

 .
 }.
 e34.
 #.
 %U%;<.
 .
 
	(.
 .
 .
 .
f 04#7;!%?C.
 .
.
 u|,.
 	.

 .
 }.
 e34.
 #.
 %U%;<.
 .
 
	*.
 .
 .
 .
h @D?C/36:+/JN38#6:;?6:7;?C!%'~
 ~
~
 ~
 8E$:;<	~

 8E$:;<~
 u|,~
   23~
 ~
 ~
 "%~
 D(3-1FFG~
 D(3-/0~
 }~
 e23~
 e78~
  523!~
" e34#~
$ %U%;<%~
& #'~
( )~
* 
	+~
 ~
 ~
 ~
F 04@D/36:FJ/4#6:7;?C!%`
 `
`
 +,`
 (5#;<=	`

 u|,`
   23`
 `
 `
 D$s)U-BBC`
 D$s)O,`
 }`
 e23`
 e34`
 %U%;<`
 #`
  !`
" 
e	 #`
 `
 `
 `
L 8<!%
 

 501
 e34	

 #
 
 
d5$%	&
 
 
 
& 15,0*.JN387;?C!%D
 D
D
  -D
 	D

 5=)D
 'D
 D(3-1FFGD
 D(3-/0D
 e34D
 %U%;<D
 #D
 D
 
tEL!8EM#::	;D
 D
 D
 D
R 04?C!%'
 '
'
 u|,'
 	'

 %U%;<'
 #'
 '
 
	'
 '
 '
 '
Z 047;!%?C1
 1
1
 1
 u|,	1

 1
 1
 e341
 #1
 %U%;<1
 1
 
	1
 1
 1
 1
n 26?C,
 ,
,
 ,
 	,

 5./,
 %U%;<,
 ,
 
	,
 ,
 ,
 ,
d 26?C.
 .
.
 +,.
 	.

 5./.
 %U%;<.
 .
 
	.
 .
 .
 .
j 26?C0
 0
0
 #0
 $	0

 0
 5./0
 %U%;<0
 0
 
	0
 0
 0
 0
l KO387;?C!%8
 8
8
 em$8
 D(3-1FFG	8

 D(3-/08
 e348
 %U%;<8
 #8
 8
 
el	8
 8
 8
 8
| 26?C-
 -
-
 --
 	-

 5./-
 %U%;<-
 -
 
	-
 -
 -
 -
h "26?C^
 ^
^
 ^
 $	^

 c]^
 ^
 5./^
 %U%;<^
 ^
 
	^
 ^
 ^
 ^
J 26?CA
 A
A
 A
 $	A

 A
 5./A
 %U%;<A
 A
 
	A
 A
 A
 A
P 26?C/
 /
/
 sm/
 $	/

 /
 5.//
 %U%;</
 /
 
	/
 /
 /
 /
j 26?C*
 *
*
 -*
 	*

 5./*
 %U%;<*
 *
 
	*
 *
 *
 *
` 26!
 !
!
 $E$9:!
 	!

 5./!
 !
 
e 	!!
 !
 !
 !
L "&
 
#+E,A#B
 #
 	

 

 
 
 
6^"^.1^		)^ ^ ^ ^2C 2E,L 2 2 2 26 60I 6 6 6 6Vc VS VUEY V V V VY Y Y Y Y Y Y  CGBF<@6:FJ!%RV0
 0
0
 $E$>?0
 $E$>?	0

 !!890
 e230
 &e&BC0
 #0
  (U5M0M(NO0
 0
 
0
 0
 0
 0
f >B
 
"
-5c]
MP
	
 
 
 
0 SW&*:>,026*.6:BF48BF.2!%S
 S
S
 e0'#u?Q:Q2RRSS
  (U5M0M(NO	S

 smS
 "%"67S
 %SMS
 #+3-S
 "$S
 e23S
 $E$>?S
 U01S
 &e&>?S
 EN+S
 #S
  !S
" 
#S
 S
 S
 S
v SW&*:>,026*.6:BF48BF.2!%Z
 Z
Z
 e0'#u?Q:Q2RRSZ
  (U5M0M(NO	Z

 smZ
 "%"67Z
 %SMZ
 #+3-Z
 "$Z
 e23Z
 $E$>?Z
 U01Z
 &e&>?Z
 EN+Z
 #Z
  !Z
" 
#Z
 Z
 Z
 Z
@  $?C4
 4
4
 %,'4
 	4

 4
 4
 4
 4
 %U%;<4
 4
 
4
 4
 4
 4
t  $?C.
 .
.
 *+.
 	.

 .
 .
 .
 .
 %U%;<.
 .
 
.
 .
 .
 .
p 7;15 $?C7
 7
7
 U'(e&&'
7
 (4S>237
 hu}-.7
 7
 7
 7
 7
 7
 %U%;<7
  !7
" 
#7
 7
 7
 7
z ;?8<26)
 )
)
 )
 u67	)

 U45)
 )
 5./)
 )
 
	)
 )
 )
 )
^ 26"
 "
"
 "
 	"

 5./"
 "
 
	"
 "
 "
 "
HV"V.1V	e'	(V V V V  26b b"b*.bADb	%+	,b b b b( FJ
 
"
36
>B
UX
	$
 
 
 
2:C :D9R4S : : : :  F FF+.F	%+	,F F F F& 04c c c(,c?Bc	$c c c c. "&"&59/
 /
/
 /
 #	/

 3-/
 512/
 /
 /
 
$/
 /
 /
 /
b
"
.1
=@
	e'	(
 
 
 
* AE
 
"
.1
9=
PS
	%+	,
 
 
 
< 
 

 
 	

 
 
 
$
 
 
 
L "&"&59/
 /
/
 /
 	/

 #/
 3-/
 512/
 /
 /
 
$/
 /
 /
 /
bB3 B# B%:K B B B B5s 5u/@ 5 5 5 50# 0%*; 0 0 0 0 15&+
 

 #49-
 	

  $
 

 
 
 
8 (,,0)-
 

 >
  }	

 %SM
 DI&
 
 

 
 
 
@

 >
 	

 

 
 
 
.#e' # # # # # # # #r6   r   )"r[   copyr   typingr   r   r   r   r   r	   r
   r   r   r   r   qdrant_clientr   qdrant_client.client_baser   qdrant_client.conversionsr   rH  qdrant_client.httpr   r    qdrant_client.local.qdrant_localr   qdrant_client.migrater   qdrant_client.qdrant_fastembedr   qdrant_client.qdrant_remoter   r   r0   r6   r4   <module>r     sy                                   ' & & & & & 0 0 0 0 0 0 ; ; ; ; ; ; 2 2 2 2 2 2 2 2 8 8 8 8 8 8 ) ) ) ) ) ) ? ? ? ? ? ? 4 4 4 4 4 4A.# A.# A.# A.# A.#' A.# A.# A.# A.# A.#r6   