Ë
    Ýªg[  ã                   óZ   — d 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)a=  
Translate from OpenAI's `/v1/chat/completions` to Sagemaker's `/invocations` API

Called if Sagemaker endpoint supports HF Messages API.

LiteLLM Docs: https://docs.litellm.ai/docs/providers/aws_sagemaker#sagemaker-messages-api
Huggingface Docs: https://huggingface.co/docs/text-generation-inference/en/messages_api
é    )ÚUnion)ÚHeaders)ÚBaseLLMExceptioné   )ÚOpenAIGPTConfigé   ©ÚSagemakerErrorc                   ó.   — e Zd Zdededeeef   defd„Z	y)ÚSagemakerChatConfigÚerror_messageÚstatus_codeÚheadersÚreturnc                 ó   — t        |||¬«      S )N)r   Úmessager   r	   )Úselfr   r   r   s       ú_/var/www/openai/venv/lib/python3.12/site-packages/litellm/llms/sagemaker/chat/transformation.pyÚget_error_classz#SagemakerChatConfig.get_error_class   s   € ô Ø#¨]ÀGô
ð 	
ó    N)
Ú__name__Ú
__module__Ú__qualname__ÚstrÚintr   Údictr   r   r   © r   r   r   r      s0   „ ð
Ø ð
Ø/2ð
Ø=BÀ4ÈÀ=Ñ=Qð
à	ô
r   r   N)Ú__doc__Útypingr   Úhttpx._modelsr   Ú)litellm.llms.base_llm.chat.transformationr   Úopenai.chat.gpt_transformationr   Úcommon_utilsr
   r   r   r   r   Ú<module>r$      s'   ðñõ å !å Få =Ý )ô
˜/õ 
r   