
    dh                    x    S r SSKJr  SSKrSSKrSSKJr  \(       a  SSKJr  \R                  " \
5      rSS jrg)zO365 tool utils.    )annotationsN)TYPE_CHECKINGClientc                 z    SSK Jn   S[        R                  ;   a;  S[        R                  ;   a'  [        R                  S   n[        R                  S   nO[
        R                  S5        gSnS	[        R                  ;   a  [        R                  S	   nU " X#US
9nU$ ! [         a  n[        S5      UeSnAff = f)z"Authenticate using the Amadeus APIr   r   zMCannot import amadeus. Please install the package with `pip install amadeus`.NAMADEUS_CLIENT_IDAMADEUS_CLIENT_SECRETzError: The AMADEUS_CLIENT_ID and AMADEUS_CLIENT_SECRET environmental variables have not been set. Visit the following link on how to acquire these authorization tokens: https://developers.amadeus.com/registertestAMADEUS_HOSTNAME)	client_idclient_secrethostname)amadeusr   ImportErrorosenvironloggererror)r   er   r   r   clients         _/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/tools/amadeus/utils.pyauthenticater      s    " bjj(-D

-RJJ23	

#:;6	
 HRZZ'::01ixXFM1  %
 	s   B 
B:)B55B:)returnr   )__doc__
__future__r   loggingr   typingr   r   r   	getLogger__name__r   r        r   <module>r"      s/     "  	  			8	$r!   