§
    ˜Štj´  ã                   ó,  — d dl mZmZm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mZ d dlmZmZ d dlmZ d dlmZ  G d„ de¦  «        Z G d	„ d
e¦  «        Z ede¬¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )é    )ÚOptionalÚSequenceÚTypeVar)Úabstractmethod)Ú
CollectionÚMetadataEmbeddingRecordÚ	OperationÚRequestVersionContextÚVectorEmbeddingRecordÚWhereÚWhereDocumentÚVectorQueryÚVectorQueryResultÚSegmentÚSeqIdÚMetadata)Ú	ComponentÚSystem)ÚUUID)ÚEnumc                   ó&   — e Zd ZdZdZdZdZdZdZdS )ÚSegmentTypez"urn:chroma:segment/metadata/sqlitez+urn:chroma:segment/vector/hnsw-local-memoryz.urn:chroma:segment/vector/hnsw-local-persistedz*urn:chroma:segment/vector/hnsw-distributedz#urn:chroma:segment/record/blockfilez%urn:chroma:segment/metadata/blockfileN)	Ú__name__Ú
__module__Ú__qualname__ÚSQLITEÚHNSW_LOCAL_MEMORYÚHNSW_LOCAL_PERSISTEDÚHNSW_DISTRIBUTEDÚBLOCKFILE_RECORDÚBLOCKFILE_METADATA© ó    úW/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/chromadb/segment/__init__.pyr   r      s3   € € € € € Ø1€FØEÐØKÐØCÐØ<ÐØ@ÐÐÐr#   r   c                   ó®   — e Zd Zededefd„¦   «         Zededefd„¦   «         Z	ede
fd„¦   «         Zededee         fd	„¦   «         Zedd„¦   «         Zd
S )ÚSegmentImplementationÚsytstemÚsegmentc                 ó   — d S ©Nr"   )Úselfr'   r(   s      r$   Ú__init__zSegmentImplementation.__init__    s   € àˆr#   Úrequest_version_contextÚreturnc                 ó   — dS )z,Get the number of embeddings in this segmentNr"   )r+   r-   s     r$   ÚcountzSegmentImplementation.count$   ó	   € ð 	ˆr#   c                 ó   — dS )z7Get the maximum SeqID currently indexed by this segmentNr"   ©r+   s    r$   Ú	max_seqidzSegmentImplementation.max_seqid)   r1   r#   Úmetadatac                 ó   — dS )zÛGiven an arbitrary metadata map (e.g, from a collection), validate it and
        return metadata (if any) that is applicable and should be applied to the
        segment. Validation errors will be reported to the user.Nr"   )r5   s    r$   Úpropagate_collection_metadataz3SegmentImplementation.propagate_collection_metadata.   s	   € ð
 ˆtr#   Nc                 ó   — dS )z#Delete the segment and all its dataNr"   r3   s    r$   ÚdeletezSegmentImplementation.delete5   s	   € ð 	ˆr#   )r.   N)r   r   r   r   r   r   r,   r
   Úintr0   r   r4   Ústaticmethodr   r   r7   r9   r"   r#   r$   r&   r&      sé   € € € € € Øð ð °ð ð ð ñ „^ðð ðÐ-Bð Àsð ð ð ñ „^ðð ð˜5ð ð ð ñ „^ðð ð°ð ¸XÀhÔ=Oð ð ð ñ „\ðð ðð ð ñ „^ðð ð r#   r&   ÚS)Úboundc                   ó¬   — e Zd ZdZe	 	 	 	 	 	 ddedee         dee         dee	e
                  dee         d	ee         d
ede	e         fd„¦   «         ZdS )ÚMetadataReaderz$Embedding Metadata segment interfaceNTr-   ÚwhereÚwhere_documentÚidsÚlimitÚoffsetÚinclude_metadatar.   c                 ó   — dS )zQuery for embedding metadata.Nr"   )r+   r-   r@   rA   rB   rC   rD   rE   s           r$   Úget_metadatazMetadataReader.get_metadataA   s	   € ð 	ˆr#   )NNNNNT)r   r   r   Ú__doc__r   r
   r   r   r   r   Ústrr:   Úboolr   rG   r"   r#   r$   r?   r?   >   s¿   € € € € € Ø.Ð.àð "&Ø26Ø'+Ø#Ø $Ø!%ðð à!6ðð ˜Œðð ! Ô/ð	ð
 �h˜s”mÔ$ðð ˜Œ}ðð ˜”ðð ðð 
Ð)Ô	*ðð ð ñ „^ðð ð r#   r?   c            	       ó–   — e Zd ZdZe	 d	dedeee                  dee	         fd„¦   «         Z
ededeee                  fd„¦   «         ZdS )
ÚVectorReaderz"Embedding Vector segment interfaceNr-   rB   r.   c                 ó   — dS )z]Get embeddings from the segment. If no IDs are provided, all embeddings are
        returned.Nr"   )r+   r-   rB   s      r$   Úget_vectorszVectorReader.get_vectorsS   s	   € ð 	ˆr#   Úqueryc                 ó   — dS )zYGiven a vector query, return the top-k nearest neighbors for vector in the
        query.Nr"   )r+   rO   s     r$   Úquery_vectorszVectorReader.query_vectors]   ó	   € ð 	ˆr#   r*   )r   r   r   rH   r   r
   r   r   rI   r   rN   r   r   rQ   r"   r#   r$   rL   rL   P   s¨   € € € € € Ø,Ð,àð (,ðð à!6ðð �h˜s”mÔ$ðð 
Ð'Ô	(ð	ð ð ñ „^ðð ðØ ðà	�(Ð,Ô-Ô	.ðð ð ñ „^ðð ð r#   rL   c                   óŽ   — e Zd ZdZededee         fd„¦   «         Zede	dee	         fd„¦   «         Z
ede	deddfd	„¦   «         ZdS )
ÚSegmentManagerzfInterface for a pluggable strategy for creating, retrieving and instantiating
    segments as requiredÚ
collectionr.   c                 ó   — dS )zsReturn the segments required for a new collection. Returns only segment data,
        does not persist to the SysDBNr"   )r+   rU   s     r$   Ú#prepare_segments_for_new_collectionz2SegmentManager.prepare_segments_for_new_collectionj   rR   r#   Úcollection_idc                 ó   — dS )z‘Delete any local state for all the segments associated with a collection, and
        returns a sequence of their IDs. Does not update the SysDB.Nr"   )r+   rX   s     r$   Údelete_segmentszSegmentManager.delete_segmentsr   s	   € ð 	ˆr#   Ú	hint_typeNc                 ó   — dS )z¿Signal to the segment manager that a collection is about to be used, so that
        it can preload segments as needed. This is only a hint, and implementations are
        free to ignore it.Nr"   )r+   rX   r[   s      r$   Úhint_use_collectionz"SegmentManager.hint_use_collectionx   s	   € ð
 	ˆr#   )r   r   r   rH   r   r   r   r   rW   r   rZ   r	   r]   r"   r#   r$   rT   rT   f   s»   € € € € € ðð ð ðØ$ðà	�'Ô	ðð ð ñ „^ðð ð¨Tð °h¸t´nð ð ð ñ „^ðð
 ð°ð À)ð ÐPTð ð ð ñ „^ðð ð r#   rT   N) Útypingr   r   r   Úabcr   Úchromadb.typesr   r   r	   r
   r   r   r   r   r   r   r   r   Úchromadb.configr   r   Úuuidr   Úenumr   r   r&   r<   r?   rL   rT   r"   r#   r$   ú<module>rd      sü  ðØ .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð .Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ðAð Að Að Að A�$ñ Aô Að Aðð ð ð ð ˜Iñ ô ð ð8 €GˆCÐ,Ð-Ñ-Ô-€ðð ð ð ð Ð*ñ ô ð ð$ð ð ð ð Ð(ñ ô ð ð,ð ð ð ð �Yñ ô ð ð ð r#   