Ë
    Ýªgú  ã                   ó<   — d Z ddlZddlZddlmZ ddlmZ defd„Zy)z2
Functions to create audit logs for LiteLLM Proxy
é    N)Úverbose_proxy_logger)ÚLiteLLM_AuditLogsÚrequest_datac              ƒ   óp  K  — ddl m}m} |dury t        j                  dury |€t        d«      ‚t        j                  d| «       t        | j                  t        «      r$t        j                  | j                  «      | _	        t        | j                  t        «      r$t        j                  | j                  «      | _        | j                  d¬«      }	 |j                  j                   j#                  i |¥¬«      ƒ d {  –—†  y 7 Œ# t
        $ r"}t        j$                  d|› «       Y d }~y d }~ww xY w­w)	Nr   )Úpremium_userÚprisma_clientTz&prisma_client is None, no DB connectedzcreating audit log for %s)Úexclude_none)ÚdatazFailed Creating audit log )Úlitellm.proxy.proxy_serverr   r   ÚlitellmÚstore_audit_logsÚ	Exceptionr   ÚdebugÚ
isinstanceÚupdated_valuesÚdictÚjsonÚdumpsÚbefore_valueÚ
model_dumpÚdbÚlitellm_auditlogÚcreateÚerror)r   r   r   Ú_request_dataÚes        ú`/var/www/openai/venv/lib/python3.12/site-packages/litellm/proxy/management_helpers/audit_logs.pyÚcreate_audit_log_for_updater      s  è ø€ ßFà˜4ÑØä×Ñ tÑ+ØØÐÜÐ@ÓAÐAä×ÑÐ:¸LÔIä,×-Ñ-¬tÔ4Ü&*§j¡j°×1LÑ1LÓ&MˆÔ#ä,×+Ñ+¬TÔ2Ü$(§J¡J¨|×/HÑ/HÓ$IˆÔ!à ×+Ñ+¸Ð+Ó>€MðEØ×Ñ×/Ñ/×6Ñ6ðØðð 7ó 
÷ 	
ð 	
ð ð	
ùô
 ò Eä×"Ñ"Ð%?À¸sÐ#C×DÐDà
ûð	EüsB   ‚CD6Ã+D Ä DÄD ÄD6ÄD Ä	D3ÄD.Ä)D6Ä.D3Ä3D6)Ú__doc__r   r   Úlitellm._loggingr   Úlitellm.proxy._typesr   r   © ó    r   Ú<module>r$      s%   ðñó ã Ý 1Ý 2ðÐ4Eô r#   