
    ^h                     F    S r SSKJr  SSKJrJr  SSKJr   " S S\5      rg)	z
Support for OpenAI's `/v1/chat/completions` endpoint. 

Calls done in OpenAI/openai.py as TogetherAI is openai-compatible.

Docs: https://docs.together.ai/reference/completions-1
    )Optional)get_model_infoverbose_logger   )OpenAIGPTConfigc            
       X   ^  \ rS rSrS\S\4U 4S jjrS\S\S\S\S\4
U 4S jjr	S	r
U =r$ )
TogetherAIConfig   modelreturnc                   > Sn [        USS9nUR                  SS5      n[
        TU ]  U5      nUSLaZ  [        R                  " S5        UR                  S	5        UR                  S
5        UR                  S5        UR                  S5        U$ ! [         a#  n[        R                  " SU 35         SnANSnAff = f)zq
Only some together models support response_format / tool calling

Docs: https://docs.together.ai/docs/json-mode
Ntogether_ai)custom_llm_providersupports_function_callingFz'Error getting supported openai params: TzyOnly some together models support function calling/response_format. Docs - https://docs.together.ai/docs/function-callingtoolstool_choicefunction_callresponse_format)	r   get	Exceptionr   debugsuperget_supported_openai_paramswarningremove)selfr   r   
model_infoeoptional_params	__class__s         W/home/james-whalen/.local/lib/python3.13/site-packages/litellm/llms/together_ai/chat.pyr   ,TogetherAIConfig.get_supported_openai_params   s     59!	'=QJ(2+U)%  '=eD$D0"" L ""7+""=1""?3""#45  	  #J1#!NO	s   B 
B>B99B>non_default_paramsr   drop_paramsc                 l   > [         TU ]  XX45      nSU;   a  US   SS0:X  a  UR                  S5        U$ )Nr   typetext)r   map_openai_paramspop)r   r#   r   r   r$   mapped_openai_paramsr    s         r!   r(   "TogetherAIConfig.map_openai_params,   sT      %w8 
  449M:
f: !$$%67##     )__name__
__module____qualname____firstlineno__strlistr   dictboolr(   __static_attributes____classcell__)r    s   @r!   r	   r	      sP      6$ $ $ 	$
 $ 
$ $r,   r	   N)	__doc__typingr   litellmr   r   openai.chat.gpt_transformationr   r	   r-   r,   r!   <module>r<      s!     2 <+$ +$r,   