§
    ¦ìNgL  ã                   óN   — 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dS )é    )ÚAnyÚListÚreturnc                  óp   — 	 dd l } n# t          $ r t          d¦  «        ‚w xY w|                      ¦   «         S )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    úc/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/utilities/anthropic.pyÚ_get_anthropic_clientr      s]   € ð
ØÐÐÐÐøÝð 
ð 
ð 
ÝðTñ
ô 
ð 	
ð
øøøð ×ÒÑ Ô Ð s   ‚ ‡!Útextc                 óJ   — t          ¦   «         }|                     | ¬¦  «        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                 ó~   — t          ¦   «         }|                     ¦   «         }|                     | ¦  «        }|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      s:   € å"Ñ$Ô$€FØ×$Ò$Ñ&Ô&€IØ×#Ò# DÑ)Ô)€LØÔÐr   N)Útypingr   r   r   ÚstrÚintr   r   © r   r
   ú<module>r      sŠ   ðØ Ð Ð Ð Ð Ð Ð Ð ð	!˜sð 	!ð 	!ð 	!ð 	!ð* 3ð *¨3ð *ð *ð *ð *ð #ð ¨$¨s¬)ð ð ð ð ð ð r   