ó
    Ù^íhµ	  ã                   ó’   • S r SSKJrJrJrJrJr  SSKJr  SSK	J
r
Jr  SSKJr  SSKJr  SSKJr  SS	KJr  SS
KJr   " S S\5      rg)z.
Handles the chat completion request for groq
é    )ÚCallableÚListÚOptionalÚUnionÚcast)ÚTimeout)ÚAsyncHTTPHandlerÚHTTPHandler)ÚAllMessageValues)ÚCustomStreamingDecoder)ÚModelResponseé   )ÚGroqChatConfig)ÚOpenAILikeChatHandlerc                   óÄ   ^ • \ rS rSrU 4S jrSSSSSSSSSS.	S\S\S\S	\S
\S\S\	S\
\   S\S\
\   S\
\\\4      S\
\\\4      S\
\   S\
\   S\4U 4S jjjrSrU =r$ )ÚGroqChatCompletioné   c                 ó&   >• [         TU ]  " S0 UD6  g )N© )ÚsuperÚ__init__)ÚselfÚkwargsÚ	__class__s     €ÚX/home/james-whalen/.local/lib/python3.13/site-packages/litellm/llms/groq/chat/handler.pyr   Ú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                óþ   >• [        5       R                  [        [        [           U5      US9nUR                  S5      SL a  [        5       R                  U5      nOSn[        TU ]!  UUUUUUUUU	U
UUUUUUUUUUS9$ )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   r   r   ÚgetÚ_should_fake_streamr   Ú
completion)r   r'   r(   r)   r*   r+   r,   r-   r2   r.   r3   r/   r   r   r    r!   r"   r#   r$   r%   r&   r   s                        €r   r7   ÚGroqChatCompletion.completion   s¯   ø€ ô0 "Ó#×7Ñ7Üœ$Ô/Ñ0°(Ó;À5ð 8ð 
ˆð ×Ñ˜xÓ(¨DÒ0Ü(Ó*×>Ñ>¸ÓO‰KàˆKä‰wÑ!ØØØØ 3Ø1Ø)Ø'ØØØ#Ø+Ø#Ø)ØØØØØ+Ø/Ø#ð) "ð 
ð 	
r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   ÚstrÚlistÚdictr   r   r   r   Úfloatr   r
   r	   Úboolr   r7   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      sõ   ø† õ#ð" ØØØ"&Ø37ØAEØ*.Ø>BØ!ò-6
ð ð6
ð ð	6
ð
 ð6
ð !ð6
ð !ð6
ð &ð6
ð  ð6
ð ˜#‘ð6
ð ð6
ð" ˜$‘ð#6
ð$ ˜%  w Ñ/Ñ0ð%6
ð& ˜˜{Ð,<Ð<Ñ=Ñ>ð'6
ð( " $™ð)6
ð* $Ð$:Ñ;ð+6
ð, ÷-6
ö 6
r   r   N)Ú__doc__Útypingr   r   r   r   r   Ú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>rM      s4   ðñ÷ 9Õ 8å !ç PÝ 6Ý 6Ý 'å 6Ý =ô:
Ð.õ :
r   