Ë
    Ýªg¶  ã                   ó\   — d dl mZmZ d dlZd dlmZ d dlmZmZ  G d„ de«      Z	 e	«       Z
y)é    )ÚLiteralÚOptionalN)ÚCustomLogger)Ú	DualCacheÚUserAPIKeyAuthc            	       ó~   — e Zd Zd„ Zdedededed   fd„Zded	e	defd
„Z
dedefd„Zdededed   fd„Zdedefd„Zy)ÚMyCustomHandlerc                  ó   — y ©N© )Úselfs    úh/var/www/openai/venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_callbacks1.pyÚ__init__zMyCustomHandler.__init__   s   € Øó    Úuser_api_key_dictÚcacheÚdataÚ	call_type)Ú
completionÚtext_completionÚ
embeddingsÚimage_generationÚ
moderationÚaudio_transcriptionÚpass_through_endpointÚrerankc              ƒ   ó   K  — |S ­wr   r   )r   r   r   r   r   s        r   Úasync_pre_call_hookz#MyCustomHandler.async_pre_call_hook   s   è ø€ ð  ˆùs   ‚Úrequest_dataÚoriginal_exceptionc              ƒ   ó   K  — y ­wr   r   )r   r   r    r   s       r   Úasync_post_call_failure_hookz,MyCustomHandler.async_post_call_failure_hook%   ó   è ø€ ð 	ùó   ‚c              ƒ   ó   K  — y ­wr   r   )r   r   r   Úresponses       r   Úasync_post_call_success_hookz,MyCustomHandler.async_post_call_success_hook-   s   è ø€ ð 	ùr$   )r   r   r   r   r   c              ƒ   ó   K  — y ­wr   r   )r   r   r   r   s       r   Úasync_moderation_hookz%MyCustomHandler.async_moderation_hook6   s   è ø€ ð 	ùr$   r&   c              ƒ   ó   K  — y ­wr   r   )r   r   r&   s      r   Úasync_post_call_streaming_hookz.MyCustomHandler.async_post_call_streaming_hookD   r#   r$   N)Ú__name__Ú
__module__Ú__qualname__r   r   r   Údictr   r   Ú	Exceptionr"   r'   r)   Ústrr+   r   r   r   r	   r	   
   s¶   „ òð
à)ðð ðð ð	ð
 ðñ	
óð$àðð &ðð *ó	ðàðð *óðàðð *ðð ð#ñ
ó	ðà)ðð ôr   r	   )Útypingr   r   ÚlitellmÚ"litellm.integrations.custom_loggerr   Úlitellm.proxy.proxy_serverr   r   r	   Úproxy_handler_instancer   r   r   Ú<module>r7      s,   ðß $ã Ý ;ß @ô
@Øô@ñF )Ó*Ñ r   