
    h6	                     d    d Z ddlmZmZmZmZ ddlZddlmZ ddl	m
Z
 ddlmZ  G d	 d
ee
      Zy)z
Handler file for calls to Azure OpenAI's o1/o3 family of models

Written separately to handle faking streaming for o1 and o3 models.
    )AnyCallableOptionalUnionN)ModelResponse   )OpenAIChatCompletion   )BaseAzureLLMc            (            e Zd Zdddddddddddi ddddfdedeeej                  f   dedede	de
e   d	e
e   d
e
e   de
e   de
e   de
e   de
e   de
e   dede
e   dede
e   de
e   de
e   f& fdZ xZS )AzureOpenAIO1ChatCompletionNFmodel_responsetimeoutoptional_paramslitellm_paramslogging_objmodelmessagesprint_verboseapi_keyapi_baseapi_versiondynamic_paramsazure_ad_tokenacompletionheaderscustom_prompt_dictorganizationcustom_llm_providerdrop_paramsc                 z    | j                  ||	|
|||      }t        | 	  |||||||||	|
|||||||||||      S )N)r   r   r   r   client	_is_async)r   r   r   r   r   r   r   r   r   r   r   r   r   r   	logger_fnr   r   r"   r   r   r    )get_azure_openai_clientsuper
completion)selfr   r   r   r   r   r   r   r   r   r   r   r   r   r   r$   r   r   r"   r   r   r    	__class__s                         d/var/www/Befach/backend/env/lib/python3.12/site-packages/litellm/llms/azure/chat/o_series_handler.pyr'   z&AzureOpenAIO1ChatCompletion.completion   s    0 --)#! . 
 w!)+)#'#))#1% 3#+ " 
 	
    )__name__
__module____qualname__r   r   floathttpxTimeoutdictr   r   strlistr   boolr'   __classcell__)r)   s   @r*   r   r      s:     $#',0!%"&%))-(,!"&#%&*-1&*-6
%6
 uemm+,6
 	6

 6
 6
 }6
 4.6
  )6
 #6
 3-6
 c]6
 !6
 !6
 6
" $#6
$ !%6
( sm)6
* &c]+6
, d^-6
 6
r+   r   )__doc__typingr   r   r   r   r0   litellm.types.utilsr   openai.openair	   common_utilsr   r    r+   r*   <module>r=      s-    2 1  - 1 '7
,0D 7
r+   