
    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                   0    e Zd ZU dZ edd      Zeed<   y)CloseSessionSchemazInput for UpdateSessionTool..z\The sessionId, received from one of the createSessions 
        or updateSessions run before)description	sessionIdN)__name__
__module____qualname____doc__r	   r   str__annotations__     m/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/langchain_community/tools/multion/close_session.pyr   r      s    &(Is r   r   c                   n    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e   dd	fdZy	)MultionCloseSessiona-  Tool that closes an existing Multion Browser Window with provided fields.

    Attributes:
        name: The name of the tool. Default: "close_multion_session"
        description: The description of the tool.
        args_schema: The schema for the tool's arguments. Default: UpdateSessionSchema
    close_multion_sessionnamezUse this tool to close an existing corresponding Multion Browser Window with provided fields. Note: SessionId must be received from previous Browser window creation.r   args_schema r   Nrun_managerreturnc                     	 	 t        j                  |       y # t        $ r}t        | d       Y d }~y d }~ww xY w# t        $ r}t        d|       d }~ww xY w)Nz, retrying...zAn error occurred: )multionclose_session	Exceptionprint)selfr   r   es       r   _runzMultionCloseSession._run.   s^    
	7+%%i0 +=)**+ 	71!566	7s)    	:5= := 	AAA)N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r&   r   r   r   r   r      sl     (D#'KK K -?K()>Is
 <@77 78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 * %
 7( 7  s   A A
	A
