
    g`                         d Z ddlmZmZmZmZmZ ddlZddlm	Z	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mZ ddlmZ ddlmZmZ ddlmZ  G d de      Zy)zDCode generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.    )AnyCallableDictOptionalUnionN)modelsutils)SDKHooks)Chat)Nullable   )BaseSDK)AsyncHttpClient
HttpClient)SDKConfiguration)Logger
NoOpLogger)RetryConfigc                       e Zd ZU dZeed<   	 	 	 	 	 	 ddeeeg ef   f   dede	e
eef      de	e   de	e   d	e	ee      d
e	e   ddfdZd Zy)MistralAzurezMistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.chatNazure_api_keyazure_endpoint
url_paramsclientasync_clientretry_configdebug_loggerreturnc                 ^   |j                  d      s|dz  }|j                  d      s|dz  }|}|t        j                         }t        t	        |      t
              sJ d       |t        j                         }t        t	        |      t              sJ d       |
t               }d}	t              rfd}	nt        j                        }	||t        j                  ||      }t        j                  | t!        |||	|d||             t#               }
| j$                  j'                         ^}}|
j)                  || j$                  j*                        \  }| j$                  _        ||k7  r|| j$                  _        |
| j$                  j.                  d	<   | j1                          y)
a/  Instantiates the SDK configuring it with the provided parameters.

        :param azure_api_key: The azure_api_key required for authentication
        :param azure_endpoint: The Azure AI endpoint URL to use for all methods
        :param url_params: Parameters to optionally template the server URL with
        :param client: The HTTP client to use for all synchronous methods
        :param async_client: The Async HTTP client to use for all asynchronous methods
        :param retry_config: The retry configuration to use for all supported methods
        /zv1/Nz;The provided client must implement the HttpClient protocol.zFThe provided async_client must implement the AsyncHttpClient protocol.c                  :    t        j                                 S )Napi_key)r   Security)r   s   H/var/www/openai/venv/lib/python3.12/site-packages/mistralai_azure/sdk.py<lambda>z'MistralAzure.__init__.<locals>.<lambda>E   s    v%     r#   )r   r   security
server_urlserverr   r   _hooks)endswithhttpxClient
issubclasstyper   AsyncClientr   r   callabler   r%   r	   template_urlr   __init__r   r
   sdk_configurationget_server_detailssdk_initr   r*   __dict__
_init_sdks)selfr   r   r   r   r   r   r   r*   r)   hookscurrent_server_url_s    `           r&   r5   zMistralAzure.__init__   s   ( &&s+c!N&&u-e#N#
>\\^FL*
 	IH	I 
  ,,.L
 	TS	T 
 %<LM"H }=H!%"//
JG
)!%))	
 
!%!7!7!J!J!LQ49NN 6 6 = =5
1
D**1 +0:D""- 5:''1r(   c                 8    t        | j                        | _        y )N)r   r6   r   )r;   s    r&   r:   zMistralAzure._init_sdksj   s    //0	r(   )NNNNN)__name__
__module____qualname____doc__r   __annotations__r   strr   r   r   r   r   r   r   r   r5   r:    r(   r&   r   r      s     h
J 04'+268<)-PS(2s7"334P P T#s(^,	P
 $P /P x45P v&P 
Pd1r(   r   )rC   typingr   r   r   r   r   r.   mistralai_azurer   r	   mistralai_azure._hooksr
   mistralai_azure.chatr   mistralai_azure.typesr   basesdkr   
httpclientr   r   sdkconfigurationr   utils.loggerr   r   utils.retriesr   r   rF   r(   r&   <module>rQ      s:    J 7 7  ) + % *  3 . , &Y17 Y1r(   