Ë
    /æjú
  ã                  óú   — d dl mZ d dlmZmZmZ d dlZddlmZm	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eef   «      Z G d„ deeef   «      Zdddœ	 	 	 	 	 	 	 dd„Zdde	dœ	 	 	 	 	 	 	 	 	 dd„Zy)é    )Úannotations)ÚAnyÚDictÚcastNé   )ÚOmitÚomit)Úis_givené   )Úto_strict_json_schema)ÚChatCompletionFunctionToolParam)ÚFunctionDefinition)ÚFunctionToolParamc                  ó8   ‡ — e Zd ZU dZded<   dˆ fd„Zdd„Zˆ xZS )ÚPydanticFunctionToolzŠ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                ó2   •— t         ‰| �  |«       || _        y ©N©ÚsuperÚ__init__r   )ÚselfÚdefnr   Ú	__class__s      €úT/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/openai/lib/_tools.pyr   zPydanticFunctionTool.__init__   ó   ø€ Ü‰Ñ˜ÔØˆ�
ó    c                ó"   — t        t        | «      S r   )r   r   ©r   s    r   r   zPydanticFunctionTool.cast   s   € ÜÔ&¨Ó-Ð-r   )r   r   r   r   ÚreturnÚNone)r!   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r   r   Ú__classcell__©r   s   @r   r   r      s   ø… ñð
 $Ó#õ÷.r   r   c                  ó4   ‡ — e Zd ZU ded<   dˆ fd„Zdd„Zˆ xZS )ÚResponsesPydanticFunctionToolr   r   c                ó2   •— t         ‰| �  |«       || _        y r   r   )r   Útoolr   r   s      €r   r   z&ResponsesPydanticFunctionTool.__init__"   r   r   c                ó"   — t        t        | «      S r   )r   ÚResponsesFunctionToolParamr    s    r   r   z"ResponsesPydanticFunctionTool.cast&   s   € ÜÔ.°Ó5Ð5r   )r-   r/   r   r   r!   r"   )r!   r/   )r#   r$   r%   r'   r   r   r(   r)   s   @r   r+   r+      s   ø… Ø#Ó#õ÷6r   r+   ©ÚnameÚdescriptionc               ó    — |€| j                   }t        |xs | j                  dt        | «      dœ| «      j	                  «       }|�||d<   d|dœS )NT)r1   ÚstrictÚ
parametersr2   Úfunction)Útyper6   )r&   r   r#   r   r   )r   r1   r2   r6   s       r   Úpydantic_function_toolr8   *   sp   € ð Ðð —m‘mˆä#àÒ*˜EŸN™NØÜ/°Ó6ñ	
ð
 	ó÷ �dƒfð ð ÐØ"-ˆ�Ñð Øñð r   )r1   r2   Údefer_loadingc               ó    — t        | ||¬«      d   }t        t        t        ddi|¥«      | «      }t	        |«      r||d<   |j                  «       S )zíBuild a Responses function tool with automatic Pydantic argument parsing.

    Use with ``responses.parse`` or ``responses.stream``. Set ``defer_loading``
    alongside a tool-search tool to make the function discoverable on demand.
    r0   r6   r7   r9   )r8   r+   r   r/   r
   )r   r1   r2   r9   r6   r-   s         r   Ú pydantic_responses_function_toolr;   G   sW   € ô & e°$ÀKÔPÐQ[Ñ\€HÜ(¬Ô.HÈ6ÐS]ÐJjÐaiÐJjÓ)kÐmrÓs€DÜ�ÔØ -ˆˆ_ÑØ�9‰9‹;Ðr   )r   r   r1   ú
str | Noner2   r<   r!   r   )
r   r   r1   r<   r2   r<   r9   zbool | Omitr!   r/   )Ú
__future__r   Útypingr   r   r   ÚpydanticÚ_typesr   r	   Ú_utilsr
   Ú	_pydanticr   Ú
types.chatr   Útypes.shared_paramsr   Ú#types.responses.function_tool_paramr   r/   Ústrr   r+   r8   r;   © r   r   ú<module>rH      s¿   ðÝ "ç "Ñ "ã ç Ý Ý ,Ý 8Ý 4Ý aô.˜4  S ™>ô .ô 6 D¨¨c¨¡Nô 6ð Ø"ñ	Ø#ðð ðð ð	ð
 %óð@ Ø"Ø!%ñØ#ðð ðð ð	ð
 ðð  ôr   