
    LKig              	       ,   S SK JrJrJrJrJrJrJr  S SKJ	r	  S SK
r
S SKrS SKJr  S SKJs  Jr  S SKJs  Jr  S SKJr  S SKJrJrJr  S SKJrJrJrJ r J!r!  S SK"J#r#J$r$J%r%  S S	K&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4   " S
 S\5      r5 " S S\5      r6S\2S\-S\Rd                  4S jr7S\Rd                  S\\\-4   4S jr8S\RT                  S\*4S jr9S\Rb                  S\\)   4S jr:S\Rb                  S\\1   4S jr;S\Rb                  S\<S\\\1\)4      4S jr=S\1S\Rb                  4S jr>S\RV                  S\0S\(4S jr?S\R\                  S\.4S jr@S\.S\R\                  4S  jrAS!\R^                  S\/4S" jrBS!\/S\R^                  4S# jrCS$\\D\E\F\<S4   S\R                  4S% jrHS&\RN                  S\'4S' jrIS&\'S\RN                  4S( jrJS\*S\RT                  4S) jrKS*\+S\RV                  4S+ jrLS,\Rf                  S\34S- jrMS,\3S\-S\Rf                  4S. jrNS/\Rh                  S\44S0 jrOS1\RX                  S\,4S2 jrPS1\,S\RX                  4S3 jrQS4\S\R4                  4S5 jrRS6\S\R6                  4S7 jrSS8\!S\R                  4S9 jrUS:\S\R                  4S; jrWS<\S\R                  4S= jrYS>\S\R                  4S? jr[S@\ S\R                  4SA jr]S@\ S\R                  4SB jr_SC\#S\RF                  4SD jr`SE\R                  S\E4SF jrbSG\$S\RH                  4SH jrcSI\Rj                  S\54SJ jrdSE\R                  S\\5   4SK jrfS<\%S\RJ                  4SL jrgSI\Rl                  S\64SM jrhSN\R                  S\\\6      4SO jrjg)P    )DictOptionalSequenceTuple	TypedDictUnioncast)UUIDN)NDArray)$collection_configuration_to_json_str)	EmbeddingWhereWhereDocument)KNNFilterLimit
ProjectionScan)	CountPlanGetPlanKNNPlan)
Collection	LogRecordMetadata	OperationOperationRecordRequestVersionContextScalarEncodingSegmentSegmentScopeSeqIdUpdateMetadataVectorVectorEmbeddingRecordVectorQueryResultc                   P    \ rS rSr% \\S'   \\   \S'   \\   \S'   \\   \S'   Sr	g)ProjectionRecord(   iddocument	embeddingmetadata N)
__name__
__module____qualname____firstlineno__str__annotations__r   r#   r   __static_attributes__r-       X/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/chromadb/proto/convert.pyr'   r'   (   s'    Gsmx  r5   r'   c                   0    \ rS rSr% \\S'   \\   \S'   Srg)KNNProjectionRecord/   recorddistancer-   N)	r.   r/   r0   r1   r'   r3   r   floatr4   r-   r5   r6   r8   r8   /   s    uor5   r8   vectorencodingreturnc                     U[         R                  :X  aL  [        R                  " U [        R                  S9R                  5       n[        R                   R                  nOU[         R                  :X  aL  [        R                  " U [        R                  S9R                  5       n[        R                   R                  nO0[        SU S[         R                   S[         R                   35      e[        R                  " U R                  X#S9$ )NdtypeUnknown encoding , expected one of z             or )	dimensionr=   r>   )r   FLOAT32nparrayfloat32tobytes	chroma_pbINT32int32
ValueErrorr#   size)r=   r>   as_bytesproto_encodings       r6   to_proto_vectorrR   5   s    >)))88F"**5==?"1199	^))	)88F"((3;;="1177z);N<R<R;S T$$%'
 	

 ++h r5   c                    U R                   nU[        R                  R                  :X  a@  [        R
                  " U R                  [        R                  S9n[        R                  nX#4$ U[        R                  R                  :X  a@  [        R
                  " U R                  [        R                  S9n[        R                  nX#4$ [        SU S[        R                  R                   S[        R                  R                   35      e)NrA   rC   z, expected one of             z or )r>   rK   r   rF   rG   
frombufferr=   rI   rL   rM   rN   )r=   r>   as_arrayout_encodings       r6   from_proto_vectorrW   G   s    H9++333==bjjA%-- ## 
Y--33	3==bhh?%++ ## z *%%--.d93K3K3Q3Q2RT
 	
r5   	operationc                    U [         R                  R                  :X  a  [        R                  $ U [         R                  R                  :X  a  [        R                  $ U [         R                  R                  :X  a  [        R                  $ U [         R                  R
                  :X  a  [        R
                  $ [        SU  35      e)NUnknown operation )rK   r   ADDUPDATEUPSERTDELETERuntimeErrorrX   s    r6   from_proto_operationra   Y   s    I''+++}}	i))00	0	i))00	0	i))00	0 /	{;<<r5   r,   c                 D    [        [        [           [        U S5      5      $ )NF)r	   r   r    _from_proto_metadata_handle_noner,   s    r6   from_proto_metadatare   g   s    "$DXu$UVVr5   c                 D    [        [        [           [        U S5      5      $ )NT)r	   r   r"   rc   rd   s    r6   from_proto_update_metadatarg   k   s#      "B8T"R r5   	is_updatec                    U R                   (       d  g 0 nU R                   R                  5        H  u  p4UR                  S5      (       a  UR                  X#'   M+  UR                  S5      (       a  UR                  X#'   MQ  UR                  S5      (       a  UR
                  X#'   Mw  UR                  S5      (       a  UR                  X#'   M  U(       a  S X#'   M  [        SU S35      e   U$ )N
bool_valuestring_value	int_valuefloat_valuezMetadata key z value cannot be None)r,   itemsHasFieldrj   rk   rl   rm   rN   )r,   rh   out_metadatakeyvalues        r6   rc   rc   s   s     BDL''--/
>>,'' % 0 0L^^N++ % 2 2L^^K(( %L^^M** % 1 1L $L}SE1FGHH 0 r5   c           
          [         R                  " U R                  5        VVs0 s H  u  pU[        U5      _M     snnS9$ s  snnf )Nrd   )rK   r"   rn   to_proto_metadata_update_value)r,   kvs      r6   to_proto_update_metadatarw      s@    ##CK>>CSTCS41!3A66CST Ts   A
operation_recordseq_idc                     [        U R                  5      u  p#[        U[        U R                  UU[        U R                  5      [        U R                  5      S9S9nU$ )N)r)   r+   r>   r,   rX   )
log_offsetr:   )	rW   r=   r   r   r)   rg   r,   ra   rX   )rx   ry   r+   r>   r:   s        r6   from_proto_submitr|      sa     ,,<,C,CDI""/0@0I0IJ*+;+E+EF
	F Mr5   segmentc                    [        [        U R                  S9U R                  [	        U R
                  5      [        U R                  S9U R                  S5      (       a  [        U R                  5      OS U R                  R                  5        VVVs0 s H!  u  pXR                   Vs/ s H  o3PM     sn_M#     snnnS9$ s  snf s  snnnf )Nhexr,   r)   typescope
collectionr,   
file_paths)r   r
   r)   r   from_proto_segment_scoper   r   ro   re   r,   r   rn   paths)r}   namer   paths       r6   from_proto_segmentr      s    GJJ\\&w}}5G../J'' %W%5%56  '11779
9 KK0KD4K009
  1
s   C)C4CCc                 ,   [         R                  " U S   R                  U S   [        U S   5      U S   R                  U S   c  S O[	        U S   5      U S   R                  5        VVs0 s H  u  pU[         R                  " US9_M     snnS9$ s  snnf )	Nr)   r   r   r   r,   r   )r   r   )rK   r   r   to_proto_segment_scoperw   rn   	FilePaths)r}   r   r   s      r6   to_proto_segmentr      s    4=V_$WW%56<(,,:& %gj&9:  '|4::<
< )%%E22<
 
s   )!Bsegment_scopec                 2   U [         R                  R                  :X  a  [        R                  $ U [         R                  R                  :X  a  [        R                  $ U [         R                  R                  :X  a  [        R                  $ [        SU  35      eNzUnknown segment scope )rK   r    VECTORMETADATARECORDr_   r   s    r6   r   r      su    	..555"""	)0099	9$$$	)0077	7"""3M?CDDr5   c                 2   U [         R                  :X  a  [        R                   R                  $ U [         R                  :X  a  [        R                   R                  $ U [         R                  :X  a  [        R                   R                  $ [        SU  35      er   )r    r   rK   r   r   r_   r   s    r6   r   r      su    +++%%,,,	,//	/%%...	,--	-%%,,,3M?CDDr5   rr   c                    [        U [        5      (       a  [        R                  " U S9$ [        U [        5      (       a  [        R                  " U S9$ [        U [
        5      (       a  [        R                  " U S9$ [        U [        5      (       a  [        R                  " U S9$ U c  [        R                  " 5       $ [        S[        U 5       S35      e)N)rj   )rk   )rl   )rm   zUnknown metadata value type z6, expected one of str, int,             float, or None)	
isinstanceboolrK   UpdateMetadataValuer2   intr<   rN   r   )rr   s    r6   rt   rt      s     %,,>>	E3		,,%@@	E3		,,u==	E5	!	!,,??	,,..*4;- 8 
 	
r5   r   c                    [        [        U R                  S9U R                  [        R
                  " U R                  5      U R                  S5      (       a  [        U R                  5      OS U R                  S5      (       a  U R                  (       a  U R                  OS U R                  U R                  U R                  U R                  S9	$ )Nr   r,   rE   )	r)   r   configuration_jsonr,   rE   databasetenantversionlog_position)r   r
   r)   r   jsonloadsconfiguration_json_strro   re   r,   rE   r   r   r   r   r   s    r6   from_proto_collectionr      s    JMM"__::j&G&GHz** %Z%8%89{++
0D0D &&$$  "",, r5   c                     [         R                  " U S   R                  U S   [        U R	                  5       5      U S   c  S O[        U S   5      U S   U S   U S   U S   U S   S	9	$ )
Nr)   r   r,   rE   r   r   r   r   )	r)   r   r   r,   rE   r   r   r   r   )rK   r   r   r   get_configurationrw   r   s    r6   to_proto_collectionr      s    dC((* 
 j!) %j&<=[)(#J'/9% r5   c                    U [         R                  :X  a  [        R                   R                  $ U [         R                  :X  a  [        R                   R                  $ U [         R                  :X  a  [        R                   R                  $ U [         R
                  :X  a  [        R                   R
                  $ [        SU  S[         R                   S[         R                   S[         R                   S[         R
                   3
5      e)NrZ   rD   z,             z, z, or )r   r[   rK   r\   r]   r^   rN   r`   s    r6   to_proto_operationr     s    IMM!""&&&	i&&	&"")))	i&&	&"")))	i&&	&""))) +=imm_ Mb!1!1 2%	8H8H7IK
 	
r5   submit_recordc           	          S nU S   b  U S   b  [        U S   U S   5      nS nU S   b  [        U S   5      n[        R                  " U S   UU[	        U S   5      S9$ )Nr+   r>   r,   r)   rX   )r)   r=   r,   rX   )rR   rw   rK   r   r   )r   r=   r,   s      r6   to_proto_submitr   "  s     F[!--
2K2W {!;]:=VWHZ ,+M*,EF$$$];%?@	 r5   embedding_recordc                 V    [        U R                  [        U R                  5      S   S9$ )Nr   )r)   r+   )r$   r)   rW   r=   )r   s    r6   "from_proto_vector_embedding_recordr   5  s.     !#$4$;$;<Q? r5   c                 L    [         R                  " U S   [        U S   U5      S9$ )Nr)   r+   )r)   r=   )rK   r$   rR   )r   r>   s     r6    to_proto_vector_embedding_recordr   >  s/     **D!/<hG r5   vector_query_resultc                 l    [        U R                  U R                  [        U R                  5      S   S9$ )Nr   )r)   r;   r+   )r%   r)   r;   rW   r=   )r   s    r6   from_proto_vector_query_resultr   H  s7     !!$--#$7$>$>?B r5   request_version_contextc                 >    [        U R                  U R                  S9$ )Ncollection_versionr   )r   r   r   r   s    r6   "from_proto_request_version_contextr   R  s#     !2EE,99 r5   c                 8    [         R                  " U S   U S   S9$ )Nr   r   r   )rK   r   r   s    r6    to_proto_request_version_contextr   [  s(     **23GH,^< r5   wherec           	      Z  ^ [         R                  " 5       n[        U 5      S:w  a  [        SU  35      eU R	                  5        G	H]  u  p#[        U[        5      (       d  [        SU 35      eUS:X  d  US:X  a  [        U[        5      (       d  [        SU 35      e[         R                  " U Vs/ s H  n[        U5      PM     snS9nUS:X  a   [         R                  R                  Ul        O[         R                  R                  Ul        UR                  R                  U5        Us  $ [         R                   " 5       nX&l        [        U[$        5      (       Gd  ['        U5      [        L aW  [         R(                  " 5       nX7l        [         R,                  R.                  Ul        UR2                  R                  U5        GO['        U5      [4        L aW  [         R6                  " 5       nX8l        [         R,                  R.                  Ul        UR8                  R                  U5        GOU['        U5      [:        L aW  [         R<                  " 5       n	X9l        [         R,                  R.                  U	l        UR@                  R                  U	5        GO['        U5      [B        L aW  [         RD                  " 5       n
X:l        [         R,                  R.                  U
l        URF                  R                  U
5        GO[        SU 35      eUR	                  5        GH`  u  nmUS	;   Gas  [        T[        5      (       d  [        S
U 35      e[        T5      S:X  d  [I        U4S jT 5       5      (       d  [        ST 35      eS nUS:X  a  [         RJ                  RL                  nO[         RJ                  RN                  n['        TS   5      [        L a^  [         RP                  " 5       nT H  nURR                  RU                  U/5        M!     Xl+        URX                  R                  U5        GM  ['        TS   5      [4        L a^  [         RZ                  " 5       nT H  nURR                  RU                  U/5        M!     Xl+        UR\                  R                  U5        GM  ['        TS   5      [:        L a_  [         R^                  " 5       nT H  nURR                  RU                  U/5        M!     UUl+        UR`                  R                  U5        GM  ['        TS   5      [B        L a_  [         Rb                  " 5       nT H  nURR                  RU                  U/5        M!     UUl+        URd                  R                  U5        GMs  [        ST 35      eUS;   Ga  ['        T5      [        L a  [         R(                  " 5       nTUl        US:X  a   [         R,                  R.                  Ul        O4US:X  a   [         R,                  Rf                  Ul        O[        SU 35      eUR2                  R                  U5        GM.  ['        T5      [4        L a  [         R6                  " 5       nTUl        US:X  a   [         R,                  R.                  Ul        O4US:X  a   [         R,                  Rf                  Ul        O[        SU 35      eUR8                  R                  U5        GM  ['        T5      [:        L Ga,  [         R<                  " 5       n	TU	l        US:X  a   [         R,                  R.                  U	l        OUS:X  a   [         R,                  Rf                  U	l        OUS:X  a   [         Rh                  Rj                  U	l6        OUS:X  a   [         Rh                  Rn                  U	l6        OZUS:X  a   [         Rh                  Rp                  U	l6        O4US:X  a   [         Rh                  Rr                  U	l6        O[        SU 35      eUR@                  R                  U	5        GM  ['        T5      [B        L Ga,  [         RD                  " 5       nTUl        US:X  a   [         R,                  R.                  Ul        OUS:X  a   [         R,                  Rf                  Ul        OUS:X  a   [         Rh                  Rj                  Ul6        OUS:X  a   [         Rh                  Rn                  Ul6        OZUS:X  a   [         Rh                  Rp                  Ul6        O4US:X  a   [         Rh                  Rr                  Ul6        O[        SU 35      eURF                  R                  U5        GMR  [        ST 35      eGMc     URt                  R                  U5        G	M`     U$ s  snf )N   z1Expected where to have exactly one operator, got z$Expected where key to be a str, got $and$orzLExpected where value for $and or $or to be a list of where expressions, got childrenz8Expected where value to be a string, int, or float, got )$inz$ninzAExpected where value for $in or $nin to be a list of values, got r   c              3   T   >#    U  H  n[        U[        TS    5      5      v   M     g7f)r   N)r   r   ).0xoperands     r6   	<genexpr>!to_proto_where.<locals>.<genexpr>  s'      4AHA
1d71:&677s   %(z_Expected where operand value to be a non-empty list, and all values to be of the same type got r   zKExpected where operand value to be a list of strings, ints, or floats, got )$eq$ne$gt$lt$gte$lter   r   z.Expected where operator to be $eq or $ne, got r   r   r   r   zIExpected where operator to be one of $eq, $ne, $gt, $lt, $gte, $lte, got z@Expected where operand value to be a string, int, or float, got );rK   r   lenrN   rn   r   r2   listWhereChildrento_proto_whereBooleanOperatorANDoperatorORr   CopyFromDirectComparisonrq   dictr   SingleStringComparisonrr   GenericComparatorEQ
comparatorsingle_string_operandr   SingleBoolComparisonsingle_bool_operandr   SingleIntComparisongeneric_comparatorsingle_int_operandr<   SingleDoubleComparisonsingle_double_operandallListOperatorINNINStringListComparisonvaluesextendlist_operatorstring_list_operandBoolListComparisonbool_list_operandIntListComparisonint_list_operandDoubleListComparisondouble_list_operandNENumberComparatorGTnumber_comparatorLTGTELTEdirect_comparison)r   responserq   rr   wr   dcsscsbcsicsdcr   r   slor   bloilodlosfcr   s                      @r6   r   r   d  s    H
5zQLUGTUUkkm
#s##CC5IJJ&=C5LeT** bchbij  1:0G0G5:;U.+U;1H f}$-$=$=$A$A!$-$=$=$@$@!&&x0O
 '')%&&E{c!668!	!*!<!<!?!?((11#6e$446!	!*!<!<!?!?&&//4e#335!	)2)D)D)G)G&%%..s3e%668!	)2)D)D)G)G&((11#6 NugV  &+[[]!'.%gt44(_`e_fg  7|q( 4AH4 1 1 )##*)-  %)M5((1(>(>(A(A(1(>(>(B(BGAJ'3.'<<>!(AJJ--qc2 "),9)..77<gaj)T1'::<!(AJJ--qc2 "),9),,55c:gaj)S0'99;!(AJJ--qc2 "),9)++44S9gaj)U2'<<>!(AJJ--qc2 "),9)..77<(ijqirs  !MMG}+'>>@$+	#u,-6-H-H-K-KCN%.-6-H-H-K-KCN","PQYPZ [#  0099#>g$.'<<>$+	#u,-6-H-H-K-KCN%.-6-H-H-K-KCN","PQYPZ [#  ..77<g#-';;=$+	#u,5>5P5P5S5SC2%.5>5P5P5S5SC2%.4=4N4N4Q4QC1%.4=4N4N4Q4QC1%/4=4N4N4R4RC1%/4=4N4N4R4RC1","kltku v#  --66s;g%/'>>@$+	#u,5>5P5P5S5SC2%.5>5P5P5S5SC2%.4=4N4N4Q4QC1%.4=4N4N4Q4QC1%/4=4N4N4R4RC1%/4=4N4N4R4RC1","kltku v#  0099#>(^_f^gh  o &3r 	""++B/] $^ OK <s   0f(
where_documentc           	         [         R                  " 5       n[        U 5      S:w  a  [        SU  35      eU R	                  5        GHx  u  p#US:X  d  US:X  a  [        U[        5      (       d  [        SU 35      e[         R                  " U Vs/ s H  n[        U5      PM     snS9nUS:X  a   [         R                  R                  Ul        O[         R                  R                  Ul        UR                  R                  U5        M  [        U[        5      (       d  [        SU 35      e[         R                   " 5       nX6l        US:X  a   [         R$                  R&                  Ul        O4US	:X  a   [         R$                  R(                  Ul        O[        S
U 35      eUR*                  R                  U5        GM{     U$ s  snf )Nr   z:Expected where_document to have exactly one operator, got r   r   z^Expected where_document value for $and or $or to be a list of where_document expressions, got r   z4Expected where_document operand to be a string, got z	$containsz$not_containszLExpected where_document operator to be one of $contains, $not_contains, got )rK   r   r   rN   rn   r   r   WhereDocumentChildrento_proto_where_documentr   r   r   r   r   r   r2   DirectWhereDocumentr*   WhereDocumentOperatorCONTAINSNOT_CONTAINSdirect)r  r  r   r   r  r   dwds          r6   r  r    s   &&(H
>aHHXY
 	
 ,113vU!2gt,, tu|t}~  9B8W8W>EFg1!4gF9H 6!$-$=$=$A$A!$-$=$=$@$@!&&x0 gs++ J7)T  //1C"L;&(>>GG_,(>>KK bckblm  OO$$S)C 4F O7 Gs   G
scanc                     [         R                  " [        U R                  5      [	        U R
                  5      [	        U R                  5      [	        U R                  5      S9$ )N)r   knnr,   r:   )query_pbScanOperatorr   r   r   r  r,   r:   r  s    r6   to_proto_scanr  H  sE      &t7TXX&!$--0,	 r5   filterc                     [         R                  " U R                  b  [        R                  " U R                  S9OS U R
                  (       a  [        U R
                  5      OS U R                  (       a  [        U R                  5      S9$ S S9$ )N)ids)r   r   r  )	r  FilterOperatoruser_idsrK   UserIdsr   r   r  r  )r  s    r6   to_proto_filterr$  Q  sr    ""??& &//2.4llnV\\*   /v/D/DE   r5   r  c           
          [         R                  " U R                   Vs/ s H  n[        U[        R
                  S9PM     snU R                  S9$ s  snf )N)r=   r>   )
embeddingsfetch)r  KNNOperatorr&  rR   r   rF   r'  )r  r+   s     r6   to_proto_knnr)  ]  sQ     !^^
+	 9~7M7MN+
 ii 
s   "Alimitc                 T    [         R                  " U R                  U R                  S9$ )N)offsetr*  )r  LimitOperatorr,  r*  )r*  s    r6   to_proto_limitr.  g  s    !!U[[IIr5   
projectionc                 j    [         R                  " U R                  U R                  U R                  S9$ )N)r*   r+   r,   )r  ProjectionOperatorr*   r+   r,   r/  s    r6   to_proto_projectionr3  k  s0    &&$$&&$$ r5   c                 R    [         R                  " [        U 5      U R                  S9$ )N)r/  r;   )r  KNNProjectionOperatorr3  rankr2  s    r6   to_proto_knn_projectionr7  s  s#    ))&z2Z__ r5   countc                 P    [         R                  " [        U R                  5      S9$ )Nr  )r  r   r  r  r8  s    r6   to_proto_count_planr;  y  s    =#<==r5   resultc                     U R                   $ Nr:  )r<  s    r6   from_proto_count_resultr?  }  s    <<r5   getc                     [         R                  " [        U R                  5      [	        U R
                  5      [        U R                  5      [        U R                  5      S9$ )N)r  r  r*  r/  )
r  r   r  r  r$  r  r.  r*  r3  r/  )r@  s    r6   to_proto_get_planrB    sE    388$szz*SYY'&s~~6	 r5   r:   c                     [        U R                  U R                  (       a  U R                  OS U R                  b  [	        U R                  5      S   OS [        U R                  5      S9$ )Nr   )r)   r*   r+   r,   )r'   r)   r*   r+   rW   re   r,   r:   s    r6   from_proto_projection_recordrE    sU    99$*OO' $F$4$45a8$V__5 r5   c                 X    U R                    Vs/ s H  n[        U5      PM     sn$ s  snf r>  )recordsrE  )r<  r:   s     r6   from_proto_get_resultrH    s$    ?E~~N~V(0~NNNs   'c                     [         R                  " [        U R                  5      [	        U R
                  5      [        U R                  5      [        U R                  5      S9$ )N)r  r  r  r/  )
r  r   r  r  r$  r  r)  r  r7  r/  )r  s    r6   to_proto_knn_planrJ    sE    388$szz*!*3>>:	 r5   c                 P    [        [        U R                  5      U R                  S9$ )N)r:   r;   )r8   rE  r:   r;   rD  s    r6    from_proto_knn_projection_recordrL    s#     +FMM:V__ r5   resultsc           
          U R                    VVs/ s H)  nUR                   Vs/ s H  n[        U5      PM     snPM+     snn$ s  snf s  snnf r>  )rM  rG  rL  )rM  r<  r:   s      r6   from_proto_knn_batch_resultrO    sK    
 oo%F AGOf	)&	1O% Os   A	AA	A	)ktypingr   r   r   r   r   r   r	   uuidr
   r   numpyrG   numpy.typingr   chromadb.proto.chroma_pb2proto
chroma_pb2rK   !chromadb.proto.query_executor_pb2query_executor_pb2r  %chromadb.api.collection_configurationr   chromadb.api.typesr   r   r   &chromadb.execution.expression.operatorr   r   r   r   r   "chromadb.execution.expression.planr   r   r   chromadb.typesr   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r'   r8   rR   rW   ra   re   rg   r   rc   rw   r|   r   r   r   r   r2   r   r<   r   rt   r   r   r   r   r   r   r   r   r   r   r  r  r  r!  r$  r(  r)  r-  r.  r1  r3  r5  r7  r;  CountResultr?  rB  rE  	GetResultrH  rJ  rL  KNNBatchResultrO  r-   r5   r6   <module>ra     s   J J J      - - 4 4 ? >  K J   $!y !) F n AQAQ $$i.. $5N9R3S $$=I$7$7 =I =W)":": Wx?Q W&&n&&37eNH,-.,~ ):R:R //9>"	 1 1 g  g )*;*;  EI,B,B E| EE, E9;Q;Q E
c5$,-
""
0i&:&: z $J 93G3G $
) 
	0C0C 
 "&55+ $$"44&<<2$$t% tIOO tn*M *i>U>U *Z !6!6 	F 	x'>'> 	c h22 J% JH$:$: JJ 83N3N 
 x7U7U >y >X-?-? >H$8$8 S 7 x'7'7 )B)B GW O("4"4 OBR9S O7 x'7'7 (($$h*+,r5   