
    ^Nj              
           U d dl mZmZmZ d dlmZ d dlmZ d dlm	Z	m
Z
 d dlmZmZ  edddd	d
 ed      d      gZee   ed<    G d de	      Z G d de
      Zy)    )AnyIterableType)
NumpyArray)OnnxOutputContext)OnnxTextEmbeddingOnnxTextEmbeddingWorker)DenseModelDescriptionModelSourcezQdrant/clip-ViT-B-32-texti   zText embeddings, Multimodal (text&image), English, 77 input tokens truncation, Prefixes for queries/documents: not necessary, 2021 yearmitg      ?)hfz
model.onnx)modeldimdescriptionlicense
size_in_GBsources
model_filesupported_clip_modelsc                   ^    e Zd Zedee   fd       Zedee   fd       Z	de
dedee   fdZy)CLIPOnnxEmbeddingreturnc                     t         S N)CLIPEmbeddingWorkerclss    n/Users/ahmed/devFolder/Ultron/claude-voice/.venv/lib/python3.12/site-packages/fastembed/text/clip_embedding.py_get_worker_classz#CLIPOnnxEmbedding._get_worker_class   s    ""    c                     t         S )zLists the supported models.

        Returns:
            list[DenseModelDescription]: A list of DenseModelDescription objects containing the model information.
        )r   r   s    r   _list_supported_modelsz(CLIPOnnxEmbedding._list_supported_models   s
     %$r    outputkwargsc                     |j                   S r   )model_output)selfr#   r$   s      r   _post_process_onnx_outputz+CLIPOnnxEmbedding._post_process_onnx_output&   s     """r    N)__name__
__module____qualname__classmethodr   r	   r   listr
   r"   r   r   r   r   r(    r    r   r   r      sd    #$'>"? # # %t,A'B % %#'#36#	*	#r    r   c                   $    e Zd ZdedededefdZy)r   
model_name	cache_dirr$   r   c                      t        d||dd|S )N   )r0   r1   threadsr.   )r   )r'   r0   r1   r$   s       r   init_embeddingz"CLIPEmbeddingWorker.init_embedding-   s)     ! 
!
 	
 	
r    N)r)   r*   r+   strr   r   r5   r.   r    r   r   r   ,   s-    

 
 	

 

r    r   N)typingr   r   r   fastembed.common.typesr   fastembed.common.onnx_modelr   fastembed.text.onnx_embeddingr   r	   "fastembed.common.model_descriptionr
   r   r   r-   __annotations__r   r   r.   r    r   <module>r=      sp    & & - 9 T Q )G :;6 t12  #) #(
1 
r    