
    dh]	                         S SK JrJrJr  S SKJr  S SKJr  S SKJ	r	J
r
  \(       a  S SKrO S SKr " S S\	5      r " S S	\5      rg! \ a     Nf = f)
    )TYPE_CHECKINGOptionalType)CallbackManagerForToolRun)BaseTool)	BaseModelFieldNc                   b    \ rS rSr% Sr\" SSS9r\\S'   \" SSS9r	\\S'   \" S	S
S9r
\\S'   Srg)UpdateSessionSchema   zInput for UpdateSessionTool..zJThe sessionID, 
        received from one of the createSessions run before)description	sessionIdz"The query to run in multion agent.queryhttps://www.google.com/zTThe Url to run the agent at.         Note: accepts only secure links having https://url N)__name__
__module____qualname____firstlineno____doc__r	   r   str__annotations__r   r   __static_attributes__r       h/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/tools/multion/update_session.pyr   r      sR    &>Is 
 8E3  !;C r   r   c                       \ rS rSr% SrSr\\S'   Sr\\S'   \	r
\\	   \S'   Sr\\S	'     SS	\S\S\\   S\\   S\4
S jjrSrg
)MultionUpdateSession'   a  Tool that updates an existing Multion Browser Window with provided fields.

Attributes:
    name: The name of the tool. Default: "update_multion_session"
    description: The description of the tool.
    args_schema: The schema for the tool's arguments. Default: UpdateSessionSchema
update_multion_sessionnamezUse this tool to update an existing corresponding Multion Browser Window with provided fields. Note: sessionId must be received from previous Browser window creation.r   args_schema r   Nr   r   run_managerreturnc                       [         R                  " XUS.5      nXS   S.nXl        U$ ! [         a  n[	        U S35        U SS.s S nA$ S nAff = f! [         a  n[        SU 35      eS nAff = f)N)inputr   message)r   Responsez, retrying...zretrying...)errorr)   zAn error occurred: )multionupdate_sessionr   	Exceptionprint)selfr   r   r   r$   responsecontentes           r   _runMultionUpdateSession._run7   s    	7	D"11s; )2	?RS!* D=)*$%3]CCD  	71!566	7s8   '+ 
AAA	A AA 
A3 A..A3)r   )r   N)r   r   r   r   r   r!   r   r   r   r   r"   r   r   r   r   dictr3   r   r   r   r   r   r   '   s     )D#(KK K .AK)*@Is 7;?77 7 c]	7
 787 
7 7r   r   )typingr   r   r   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   r	   r+   ImportErrorr   r   r   r   r   <module>r;      sR    0 0 * %
) &#78 #7/  s   A AA