Ë
    7 |hL  ã                   óF   — d dl mZmZ defd„Zdedefd„Zdedee   fd„Zy)é    )ÚAnyÚListÚreturnc                  ó\   — 	 dd l } | j                  «       S # t        $ r t        d«      ‚w xY w)Nr   z¨Could not import anthropic python package. This is needed in order to accurately tokenize the text for anthropic models. Please install it with `pip install anthropic`.)Ú	anthropicÚImportErrorÚ	Anthropic)r   s    úf/var/www/html/test/engine/venv/lib/python3.12/site-packages/langchain_community/utilities/anthropic.pyÚ_get_anthropic_clientr      s?   € ð
Ûð ×ÑÓ Ð øô ò 
ÜðTó
ð 	
ð
ús   ‚ –+Útextc                 ó:   — t        «       }|j                  | ¬«      S )z-Get the number of tokens in a string of text.)r   )r   Úcount_tokens)r   Úclients     r
   Úget_num_tokens_anthropicr      s   € ä"Ó$€FØ×Ñ DÐÓ)Ð)ó    c                 óp   — t        «       }|j                  «       }|j                  | «      }|j                  S )z'Get the token ids for a string of text.)r   Úget_tokenizerÚencodeÚids)r   r   Ú	tokenizerÚencoded_texts       r
   Úget_token_ids_anthropicr      s4   € ä"Ó$€FØ×$Ñ$Ó&€IØ×#Ñ# DÓ)€LØ×ÑÐr   N)Útypingr   r   r   ÚstrÚintr   r   © r   r
   ú<module>r      s>   ðß ð	!˜só 	!ð* 3ð *¨3ó *ð #ð ¨$¨s©)ô r   