
    2h                        S SK Jr  S SKJrJrJr  S SKrSSKJr  SSK	J
r
  SSKJr  SS	KJr   " S
 S\\\4   5      r " S S\\\4   5      rSSS.       SS jjrg)    )annotations)AnyDictcastN   )to_strict_json_schema   )ChatCompletionToolParam)FunctionDefinition)FunctionToolParamc                  F   ^  \ rS rSr% SrS\S'   SU 4S jjrS	S jrSrU =r	$ )
PydanticFunctionTool   z~Dictionary wrapper so we can pass the given base model
throughout the entire request stack without having to special
case it.
type[pydantic.BaseModel]modelc                0   > [         TU ]  U5        X l        g Nsuper__init__r   )selfdefnr   	__class__s      I/var/www/auris/envauris/lib/python3.13/site-packages/openai/lib/_tools.pyr   PydanticFunctionTool.__init__       
    c                "    [        [        U 5      $ r   )r   r   r   s    r   r   PydanticFunctionTool.cast   s    &--r   r   )r   r   r   r   returnNone)r"   r   )
__name__
__module____qualname____firstlineno____doc____annotations__r   r   __static_attributes____classcell__r   s   @r   r   r      s    
 $#. .r   r   c                  B   ^  \ rS rSr% S\S'   SU 4S jjrSS jrSrU =r$ )	ResponsesPydanticFunctionTool   r   r   c                0   > [         TU ]  U5        X l        g r   r   )r   toolr   r   s      r   r   &ResponsesPydanticFunctionTool.__init__    r   r   c                "    [        [        U 5      $ r   )r   ResponsesFunctionToolParamr   s    r   r   "ResponsesPydanticFunctionTool.cast$   s    .55r   r!   )r1   r4   r   r   r"   r#   )r"   r4   )	r$   r%   r&   r'   r)   r   r   r*   r+   r,   s   @r   r.   r.      s    ##6 6r   r.   )namedescriptionc                   Uc  U R                   n[        U=(       d    U R                  S[        U 5      S.U 5      R	                  5       nUb  X#S'   SUS.$ )NT)r6   strict
parametersr7   function)typer;   )r(   r   r$   r   r   )r   r6   r7   r;   s       r   pydantic_function_toolr=   (   sn      mm#*ENN/6	

 	 df  "-  r   )r   r   r6   
str | Noner7   r>   r"   r
   )
__future__r   typingr   r   r   pydantic	_pydanticr   
types.chatr
   types.shared_paramsr   #types.responses.function_tool_paramr   r4   strr   r.   r=    r   r   <module>rH      sx    " " "  , 0 4 a.4S> . 6DcN 6 "	#  	
 r   