
    i                         d dl Zd dlZd dlmZmZmZmZ d dlm	Z	 d dl
mZ  ededef         ZdZd	Zd
gZdedefdZdedefdZy)    N)CallableTypeVarAnycast)wraps)MistralClientExceptionF.)bound)   
   z3.10mcpmodule_namereturnc                 H    t         j                  j                  |       }|d uS )N)	importlibutil	find_spec)r   specs     W/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/mistralai/extra/run/utils.pyis_module_installedr      s!    >>##K0Dt    funcc                 J     t                fd       }t        t        |      S )Nc            
      H   t         j                  t        k  rUt        j                   dt
         dt         j                  j                   dt         j                  j                   d      t        D ]%  }t        |      rt        j                   d        | i |S )Nz' requires a Python version higher than z.You are using Python .zC requires the sdk to be installed with 'agents' extra dependencies.)
sysversion_infoREQUIRED_PYTHON_VERSIONr   __name__REQUIRED_PYTHON_VERSION_STRmajorminorREQUIRED_PACKAGESr   )argskwargspackager   s      r   wrapperz!run_requirements.<locals>.wrapper   s    55(==/!HIdHe f((+(8(8(>(>'?qAQAQAWAW@XXY[  ) 	G&w/,}}o%hi 	
 T$V$$r   )r   r   r	   )r   r'   s   ` r   run_requirementsr(      s(    
4[% % 7r   )importlib.utilr   r   typingr   r   r   r   	functoolsr   mistralai.extra.exceptionsr   r	   r   r    r#   strboolr   r(    r   r   <module>r0      sh     
 / /  =CxS)* " $ G S T 
1  r   