HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/openai/lib/__pycache__/_tools.cpython-310.pyc
o

���g��@szddlmZddlmZmZmZddlZddlmZddl	m
Z
ddlmZGd	d
�d
ee
ef�Zddd�ddd�ZdS)�)�annotations)�Any�Dict�castN�)�to_strict_json_schema�)�ChatCompletionToolParam)�FunctionDefinitioncs6eZdZUdZded<d�fdd	�Zd
d
d�Z�ZS)�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]�model�defnr
�return�Nonecst��|�||_dS�N)�super�__init__r
)�selfrr
��	__class__��</usr/local/lib/python3.10/dist-packages/openai/lib/_tools.pyrs
zPydanticFunctionTool.__init__cCs
tt|�Sr)rr
)rrrrrs
zPydanticFunctionTool.cast)rr
r
rrr)rr
)�__name__�
__module__�__qualname__�__doc__�__annotations__rr�
__classcell__rrrrrs

r)�name�descriptionr
rr�
str | Noner rr	cCsH|dur|j}t|p|jdt|�d�|���}|dur||d<d|d�S)NT)r�strict�
parametersr �function)�typer$)rrrrr)r
rr r$rrr�pydantic_function_tools ���	�r&)r
rrr!r r!rr	)�
__future__r�typingrrr�pydantic�	_pydanticr�
types.chatr	�types.shared_paramsr
�strrr&rrrr�<module>s�