
    ^h'	                     6    S r SSKJr  SSKJr   " S S\5      rg)z[
Cerebras Chat Completions API

this is OpenAI compatible - no translation needed / occurs
    )Optional)OpenAIGPTConfigc                     ^  \ rS rSr% SrSr\\   \S'   Sr	\\
   \S'   Sr\\   \S'   Sr\\   \S'   Sr\\   \S'   Sr\\   \S	'   Sr\\   \S
'   Sr\\   \S'             SS\\   S\\
   S\\   S\\   S\\   S\\   S\\   S	\\   S
\\   S\\   SS4S jjr\U 4S j5       rS\S\4S jrS\
S\
S\S\S\
4
S jrSrU =r$ )CerebrasConfig   zi
Reference: https://inference-docs.cerebras.ai/api-reference/chat-completions

Below are the parameters:
N
max_tokensresponse_formatseedstreamtop_ptool_choicetoolsuserstoptemperaturereturnc                     [        5       R                  5       nUR                  5        H(  u  pUS:w  d  M  Uc  M  [        U R                  X5        M*     g )Nself)localscopyitemssetattr	__class__)r   r   r	   r
   r   r   r   r   r   r   r   locals_keyvalues                 T/home/james-whalen/.local/lib/python3.13/site-packages/litellm/llms/cerebras/chat.py__init__CerebrasConfig.__init__   s=     (--/!--/JCf}!23 *    c                     > [         TU ]  5       $ )N)super
get_config)clsr   s    r   r#   CerebrasConfig.get_config.   s    w!##r    modelc                 
    / SQ$ )z6
Get the supported OpenAI params for the given model

)r   max_completion_tokensr	   r
   r   r   r   r   r   r   r    )r   r&   s     r   get_supported_openai_params*CerebrasConfig.get_supported_openai_params2   s    
 	
r    non_default_paramsoptional_paramsdrop_paramsc                     U R                  US9nUR                  5        H  u  pgUS:X  a  XrS'   M  Xe;   d  M  XrU'   M     U$ )N)r&   r(   r   )r*   r   )r   r,   r-   r&   r.   supported_openai_paramsparamr   s           r   map_openai_params CerebrasConfig.map_openai_paramsF   sT     #'"B"B"B"O.446LE//05-1).&	 7
 r    r)   )
NNNNNNNNNN)__name__
__module____qualname____firstlineno____doc__r   r   int__annotations__r	   dictr
   r   boolr   r   strr   listr   floatr   classmethodr#   r*   r2   __static_attributes____classcell__)r   s   @r   r   r      s    !%J$&*OXd^*D(3-!FHTN!E8C=!%K#% E8D> D(3- %)*.""!%'+#%) $"4SM4 "$4 sm	4
 sm4 4 e_4 }4 c]4 ~4 sm4 
4$ $ $
 
 
(   	
  
 r    r   N)r8   typingr   +litellm.llms.openai.chat.gpt_transformationr   r   r)   r    r   <module>rE      s      GG_ Gr    