o
    %Âif&  ã                   @  s>  U d dl mZ ddlmZ ddlmZ ddddddddœZded< i d	d“d
d“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd“i dd“dd“dd“dd“d d“d!d"“d#d"“d$d“d%d“d&d“d'd“d(d“d)d“d*d“d+d“d,d“d-d“¥d.d.i¥Zded/< d9d3d4„Z	d:d6d7„Z
d8S );é    )Úannotationsé   )ÚEncoding)Úget_encodingÚcl100k_base)zgpt-4-zgpt-3.5-turbo-zgpt-35-turbo-zft:gpt-4zft:gpt-3.5-turbozft:davinci-002zft:babbage-002zdict[str, str]ÚMODEL_PREFIX_TO_ENCODINGzgpt-4zgpt-3.5-turbozgpt-35-turbozdavinci-002zbabbage-002ztext-embedding-ada-002ztext-davinci-003Ú	p50k_baseztext-davinci-002ztext-davinci-001Ú	r50k_baseztext-curie-001ztext-babbage-001ztext-ada-001ÚdavinciÚcurieÚbabbageÚadazcode-davinci-002zcode-davinci-001zcode-cushman-002zcode-cushman-001zdavinci-codexzcushman-codexztext-davinci-edit-001Ú	p50k_editzcode-davinci-edit-001ztext-similarity-davinci-001ztext-similarity-curie-001ztext-similarity-babbage-001ztext-similarity-ada-001ztext-search-davinci-doc-001ztext-search-curie-doc-001ztext-search-babbage-doc-001ztext-search-ada-doc-001zcode-search-babbage-code-001zcode-search-ada-code-001Úgpt2ÚMODEL_TO_ENCODINGÚ
model_nameÚstrÚreturnc                 C  sX   d}| t v rt |  }nt ¡ D ]\}}|  |¡r|  S q|du r*td| › dƒd‚|S )zrReturns the name of the encoding used by a model.

    Raises a KeyError if the model name is not recognised.
    NzCould not automatically map z_ to a tokeniser. Please use `tiktoken.get_encoding` to explicitly get the tokeniser you expect.)r   r   ÚitemsÚ
startswithÚKeyError)r   Úencoding_nameÚmodel_prefixÚmodel_encoding_name© r   úG/var/www/html/corbot_env/lib/python3.10/site-packages/tiktoken/model.pyÚencoding_name_for_modelC   s   

ÿ
ÿýr   r   c                 C  s   t t| ƒƒS )zfReturns the encoding used by a model.

    Raises a KeyError if the model name is not recognised.
    )r   r   )r   r   r   r   Úencoding_for_model\   s   r   N)r   r   r   r   )r   r   r   r   )Ú
__future__r   Úcorer   Úregistryr   r   Ú__annotations__r   r   r   r   r   r   r   Ú<module>   s¨    ÷þýüúù	÷ôóòñðïîíìëéèçæåäâá!ß"Þ#Ý$Ü%Û&Ú'Ù(Ø)×*Ö,Ô
0