
    {h	                         d dl mZmZmZ d dlmZ d dlmZ d dlm	Z	m
Z
 erd dlZn	 d dlZ G d de	      Z G d d	e      Zy# e$ r Y w xY w)
    )TYPE_CHECKINGOptionalType)CallbackManagerForToolRun)BaseTool)	BaseModelFieldNc                   l    e Zd ZU dZ edd      Zeed<    edd      Zeed<    edd	      Z	eed
<   y)UpdateSessionSchemaz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://urlN)
__name__
__module____qualname____doc__r	   r   str__annotations__r   r        j/var/www/html/engine/venv/lib/python3.12/site-packages/langchain_community/tools/multion/update_session.pyr   r      sR    &>Is 
 8E3  !;C r   r   c                   ~    e Zd ZU dZdZeed<   dZeed<   eZ	e
e   ed<   dZeed<   	 	 dded
edee   dee   def
dZy	)MultionUpdateSessiona/  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                     	 	 t        j                  |||d      }||d   d}|| _        |S # t        $ r}t	        | d       | ddcY d }~S d }~ww xY w# t        $ r}t        d|       d }~ww xY w)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   _runzMultionUpdateSession._run7   s    	7	D"11s; )2x	?RS!* D=)*$%3]CCD  	71!566	7s8   )- 	AA	A
A AA 	A3 A..A3)r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   dictr/   r   r   r   r   r   '   s     )D#(KK K .AK)*@Is 7;?77 7 c]	7
 787 
7r   r   )typingr   r   r   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   r	   r'   ImportErrorr   r   r   r   r   <module>r6      sR    0 0 * %
) &#78 #7/  s   A A
	A
