Ë
    uPêjb  ã                   ó€   — U d Z ddlmZmZmZ ddlmZ ddlmZ h d£Z	ee
d<   	 dded	edz  d
edz  fd„Z G d„ d«      Zy)z)
Utility functions for Interactions API.
é    )ÚAnyÚFinalÚcast)ÚBaseInteractionsAPIConfig)Ú$InteractionsAPIOptionalRequestParams>   ÚstoreÚtoolsÚstreamÚ
backgroundÚenvironmentÚagent_configÚresponse_formatÚgeneration_configÚresponse_mime_typeÚsystem_instructionÚresponse_modalitiesÚprevious_interaction_idÚ INTERACTIONS_API_OPTIONAL_PARAMSNÚproviderÚmodelÚreturnc                 óÜ   — ddl m} | |j                  j                  k(  s| dk(  rddlm}  |«       S | |j                  j                  |j                  j                  fv rddlm	}  |«       S y)zõ
    Get the interactions API config for the given provider.

    Args:
        provider: The LLM provider name
        model: Optional model name

    Returns:
        The provider-specific interactions API config, or None if not supported
    r   )ÚLlmProvidersÚgemini)Ú GoogleAIStudioInteractionsConfig)ÚVertexAIInteractionsConfigN)
Úlitellm.types.utilsr   ÚGEMINIÚvalueÚ/litellm.llms.gemini.interactions.transformationr   Ú	VERTEX_AIÚVERTEX_AI_BETAÚ2litellm.llms.vertex_ai.interactions.transformationr   )r   r   r   r   r   s        ú_/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/interactions/utils.pyÚ$get_provider_interactions_api_configr%      sj   € õ 1à�<×&Ñ&×,Ñ,Ò,°¸HÒ0Dõ	
ñ 0Ó1Ð1à�L×*Ñ*×0Ñ0°,×2MÑ2M×2SÑ2SÐTÑTõ	
ñ *Ó+Ð+àó    c                   ó4   — e Zd ZdZedeeef   defd„«       Z	y)ÚInteractionsAPIRequestUtilsz8Helper utils for constructing Interactions API requests.Úparamsr   c                 óü   — ddl m} | j                  dd«      }| j                  di «      }| j                  dd«      }|j                  | |||t        D �ci c]  }|d“Œ c}g d¢¬«      }t        t        |«      S c c}w )	a  
        Filter parameters to only include valid optional params per OpenAPI spec.

        Args:
            params: Dictionary of parameters to filter (typically from locals())

        Returns:
            Dict with only the valid optional parameters
        r   )ÚPreProcessNonDefaultParamsÚcustom_llm_providerNÚkwargsÚadditional_drop_params)Úinputr   Úagent)Úpassed_paramsÚspecial_paramsr,   r.   Údefault_param_valuesÚ#additional_endpoint_specific_params)Úlitellm.utilsr+   ÚpopÚ#base_pre_process_non_default_paramsr   r   r   )r)   r+   r,   r2   r.   ÚkÚnon_default_paramss          r$   Ú.get_requested_interactions_api_optional_paramszJInteractionsAPIRequestUtils.get_requested_interactions_api_optional_params?   sŠ   € õ 	=à%+§Z¡ZÐ0EÀtÓ%LÐØ &§
¡
¨8°RÓ 8ˆØ(.¯
©
Ð3KÈTÓ(RÐà$>×$bÑ$bØ Ø)Ø 3Ø#9Ü3SÖ!T¨a ! T¡'Ò!TÚ0Kð %có %
Ðô Ô8Ð:LÓMÐMùò	 "Us   Á
A9N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstaticmethodÚdictÚstrr   r   r:   © r&   r$   r(   r(   <   s3   „ ÙBàðNØ�S˜#�X‘ðNà	-òNó ñNr&   r(   )N)r>   Útypingr   r   r   Ú1litellm.llms.base_llm.interactions.transformationr   Úlitellm.types.interactionsr   r   Ú__annotations__rA   r%   r(   rB   r&   r$   ú<module>rG      sa   ðò÷ $Ñ #å WÝ Kò+Ð   %ó ð$ ñØðà�‰:ðð  Ñ%ó÷BNò Nr&   