
    i	                     x    d Z ddlmZ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 er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.
    )TYPE_CHECKINGAnyCallableOptionalUnionN)ModelResponse   )OpenAIChatCompletion   )BaseAzureLLM)ClientSessionc            *            e Zd Zdddddddddddi d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   de
d   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_paramsshared_sessionr   c                 |    | 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"   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"   r#   	__class__s                          y/Users/manta/Documents/Projects/TheRoad-I1/.venv/lib/python3.12/site-packages/litellm/llms/azure/chat/o_series_handler.pyr*   z&AzureOpenAIO1ChatCompletion.completion   s    2 --)#! . 
 w!)+)#'#))#1% 3#)- " 
 	
    )__name__
__module____qualname__r   r   floathttpxTimeoutdictr   r   strlistr   boolr*   __classcell__)r,   s   @r-   r   r      sL     $#',0!%"&%))-(,!"&#%&*-1&*48/8
%8
 uemm+,8
 	8

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