Ë
    µŒjS
  ã                  óh   — d dl mZ d dlZd dlmZmZmZmZ d dlm	Z	 d dl
mZ d	d„Z G d„ de	e«      Zy)
é    )ÚannotationsN)ÚAnyÚIteratorÚListÚOptional)Ú
Embeddings)Ú	BaseModelc              #  óV   K  — t        dt        | «      |«      D ]  }| |||z    –— Œ y ­w©Nr   )ÚrangeÚlen)ÚtextsÚsizeÚis      úw/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/langchain_community/embeddings/mlflow_gateway.pyÚ_chunkr   
   s.   è ø€ Ü�1”c˜%“j $Ö'ˆØ�A˜˜D™Ð!Ó!ñ (ùs   ‚')c                  óZ   ‡ — e Zd ZU dZded<   	 dZded<   	 dˆ fd„Zdd„Zdd	„Zdd
„Z	ˆ xZ
S )ÚMlflowAIGatewayEmbeddingsa  MLflow AI Gateway embeddings.

    To use, you should have the ``mlflow[gateway]`` python package installed.
    For more information, see https://mlflow.org/docs/latest/gateway/index.html.

    Example:
        .. code-block:: python

            from langchain_community.embeddings import MlflowAIGatewayEmbeddings

            embeddings = MlflowAIGatewayEmbeddings(
                gateway_uri="<your-mlflow-ai-gateway-uri>",
                route="<your-mlflow-ai-gateway-embeddings-route>"
            )
    ÚstrÚrouteNzOptional[str]Úgateway_uric                ó   •— t        j                  dt        «       	 dd l}t        ‰| �  di |¤Ž | j                  r&|j                  j                  | j                  «       y y # t        $ r}t	        d«      |‚d }~ww xY w)Nzd`MlflowAIGatewayEmbeddings` is deprecated. Use `MlflowEmbeddings` or `DatabricksEmbeddings` instead.r   ú_Could not import `mlflow.gateway` module. Please install it with `pip install mlflow[gateway]`.© )
ÚwarningsÚwarnÚDeprecationWarningÚmlflow.gatewayÚImportErrorÚsuperÚ__init__r   ÚgatewayÚset_gateway_uri)ÚselfÚkwargsÚmlflowÚeÚ	__class__s       €r   r!   z"MlflowAIGatewayEmbeddings.__init__%   s�   ø€ Ü�‰ð.äô	
ð
	Û!ô 	‰ÑÑ"˜6Ò"Ø×ÒØ�N‰N×*Ñ*¨4×+;Ñ+;Õ<ð øô ò 	ÜðHóð ðûð	ús   �A# Á#	A=Á,A8Á8A=c                ó@  — 	 dd l }g }t        |d«      D ]j  }|j                  j	                  | j
                  d|i¬«      }t        |d   d   t        «      r|j                  |d   «       ŒW|j                  |d   «       Œl |S # t        $ r}t        d«      |‚d }~ww xY w)Nr   r   é   Útext)ÚdataÚ
embeddings)
r   r   r   r"   Úqueryr   Ú
isinstancer   ÚextendÚappend)r$   r   r&   r'   r-   ÚtxtÚresps          r   Ú_queryz MlflowAIGatewayEmbeddings._query7   s±   € ð	Û!ð ˆ
Ü˜% Ö$ˆCØ—>‘>×'Ñ'¨¯
©
¸&À#¸Ð'ÓGˆDä˜$˜|Ñ,¨QÑ/´Ô6Ø×!Ñ! $ |Ñ"4Õ5ð ×!Ñ! $ |Ñ"4Õ5ð %ð Ðøô ò 	ÜðHóð ðûð	ús   ‚B Â	BÂBÂBc                ó$   — | j                  |«      S )N©r4   )r$   r   s     r   Úembed_documentsz)MlflowAIGatewayEmbeddings.embed_documentsK   s   € Ø�{‰{˜5Ó!Ð!ó    c                ó,   — | j                  |g«      d   S r   r6   )r$   r+   s     r   Úembed_queryz%MlflowAIGatewayEmbeddings.embed_queryN   s   € Ø�{‰{˜D˜6Ó" 1Ñ%Ð%r8   )r%   r   )r   ú	List[str]ÚreturnzList[List[float]])r+   r   r<   zList[float])Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r   r!   r4   r7   r:   Ú__classcell__)r(   s   @r   r   r      s3   ø… ñð  ƒJØ9Ø!%€K�Ó%Ø0õ=ó$ó("÷&r8   r   )r   r;   r   Úintr<   zIterator[List[str]])Ú
__future__r   r   Útypingr   r   r   r   Úlangchain_core.embeddingsr   Úpydanticr	   r   r   r   r8   r   Ú<module>rH      s,   ðÝ "ã ß 0Ó 0å 0Ý ó"ô
@& 
¨Iõ @&r8   