o
    is                     @   s"   d dl mZ dedefddZdS )    )Anyschema_nodereturnc                 C   s   t | ttfs| du r| S t | tr1d| v r | d dkr d| d< |  D ]
\}}t|| |< q$| S t | trGt| D ]
\}}t|| |< q:| S td|  )z
    Recursively set the additionalProperties property to False for all objects in the JSON Schema.
    This makes the JSON Schema strict (i.e. no additional properties are allowed).
    NtypeobjectFadditionalPropertieszUnexpected type: )	
isinstancestrbooldictitemsrec_strict_json_schemalist	enumerate
ValueError)r   keyvaluei r   l/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/mistralai/extra/utils/_pydantic_helper.pyr      s   

r   N)typingr   r   r   r   r   r   <module>   s    