Ë
    uPêj…	  ã                   óŽ   — d 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 ddlmZ d	d
lmZ d	dlmZ  G d„ de«      Zy)z.
Handles the chat completion request for groq
é    )ÚCallable)Úcast)ÚTimeout)ÚAsyncHTTPHandlerÚHTTPHandler)ÚAllMessageValues)ÚCustomStreamingDecoder)ÚModelResponseé   )ÚGroqChatConfig)ÚOpenAILikeChatHandlerc                   ó¬   ‡ — e Zd Zˆ fd„Zddddddddddœ	dedededed	ed
edededz  dededz  de	e
z  dz  deez  dz  dedz  dedz  defˆ fd„Zˆ xZS )ÚGroqChatCompletionc                 ó$   •— t        ‰| �  di |¤Ž y )N© )ÚsuperÚ__init__)ÚselfÚkwargsÚ	__class__s     €úc/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/llms/groq/chat/handler.pyr   zGroqChatCompletion.__init__   s   ø€ Ü‰ÑÑ"˜6Ó"ó    NF)	ÚacompletionÚlitellm_paramsÚ	logger_fnÚheadersÚtimeoutÚclientÚcustom_endpointÚstreaming_decoderÚfake_streamÚmodelÚmessagesÚapi_baseÚcustom_llm_providerÚcustom_prompt_dictÚmodel_responseÚprint_verboseÚapi_keyÚoptional_paramsr   r   r   r   r    r!   c                ó  •— t        «       j                  t        t        t           |«      |¬«      }|j                  d«      du rt        «       j                  |«      }nd}t        ‰| �!  |||||||||	|
||||||||||¬«      S )N)r#   r"   ÚstreamTF)r"   r#   r$   r%   r&   r'   r(   Úencodingr)   Úlogging_objr*   r   r   r   r   r   r   r   r    r!   )	r   Ú_transform_messagesr   Úlistr   ÚgetÚ_should_fake_streamr   Ú
completion)r   r"   r#   r$   r%   r&   r'   r(   r-   r)   r.   r*   r   r   r   r   r   r   r   r    r!   r   s                        €r   r3   zGroqChatCompletion.completion   sª   ø€ ô0 "Ó#×7Ñ7ÄÄdÔK[ÑF\Ð^fÓAgÐotÐ7Óuˆà×Ñ˜xÓ(¨DÑ0Ü(Ó*×>Ñ>¸ÓO‰KàˆKä‰wÑ!ØØØØ 3Ø1Ø)Ø'ØØØ#Ø+Ø#Ø)ØØØØØ+Ø/Ø#ð) "ó 
ð 	
r   )Ú__name__Ú
__module__Ú__qualname__r   Ústrr0   Údictr
   r   Úfloatr   r   r   Úboolr	   r3   Ú__classcell__)r   s   @r   r   r      sê   ø„ ô#ð" ØØØ#Ø*.Ø8<Ø'+Ø;?Ø!ò-4
ð ð4
ð ð	4
ð
 ð4
ð !ð4
ð !ð4
ð &ð4
ð  ð4
ð �t‘ð4
ð ð4
ð" ˜‘ð#4
ð$ ˜‘ 4Ñ'ð%4
ð& Ð.Ñ.°Ñ5ð'4
ð(  ™ð)4
ð* 2°DÑ8ð+4
ð, ÷-4
ñ 4
r   r   N)Ú__doc__Úcollections.abcr   Útypingr   Úhttpx._configr   Ú&litellm.llms.custom_httpx.http_handlerr   r   Úlitellm.types.llms.openair   Úlitellm.types.utilsr	   Úlitellm.utilsr
   Úgroq.chat.transformationr   Úopenai_like.chat.handlerr   r   r   r   r   ú<module>rF      s4   ðñõ %Ý å !ç PÝ 6Ý 6Ý 'å 6Ý =ô8
Ð.õ 8
r   