
    AHji                         d dl mZ d dlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ dd
lmZ  G d d      Zy)    )Optional)get_litellm_gateway_api_key   )
ChatClient)CredentialsManagementClient)
HTTPClient)KeysManagementClient)ModelGroupsManagementClient)ModelsManagementClient)TeamsManagementClientc                   0    e Zd ZdZ	 	 ddedee   defdZy)Clientz7Main client for interacting with the LiteLLM proxy API.Nbase_urlapi_keytimeoutc                 D   |j                  d      | _        t               xs || _        t	        |||      | _        t        | j                  | j                        | _        t        | j                  | j                        | _	        t        | j                  | j                        | _        t        | j                  | j                        | _        t        | j                  | j                        | _        t!        | j                  | j                        | _        y)aY  
        Initialize the LiteLLM proxy client.

        Args:
            base_url (str): The base URL of the LiteLLM proxy server (e.g., "http://localhost:4000")
            api_key (Optional[str]): API key for authentication. If provided, it will be sent as a Bearer token.
            timeout: Request timeout in seconds (default: 30)
        /)r   r   r   )r   r   N)rstrip	_base_urlr   _api_keyr   httpr   modelsr
   model_groupsr   chatr	   keysr   credentialsr   teams)selfr   r   r   s       S/root/tools/cai/cai_env/lib/python3.12/site-packages/litellm/proxy/client/client.py__init__zClient.__init__   s     "-35@ '7S	,^^T]]
 8^^T]]
 N	($..$--X	6^^T]]
 +^^T]]

    )N   )__name__
__module____qualname____doc__strr   intr     r!   r   r   r      s2    A
 "&	!
!
 #!
 	!
r!   r   N)typingr   *litellm.litellm_core_utils.cli_token_utilsr   r   r   r   r   http_clientr   r   r	   r   r
   r   r   r   r   r   r)   r!   r   <module>r-      s*     R  4 # & 5 * ($
 $
r!   