@ -44,10 +44,10 @@ class MultionUpdateSession(BaseTool):
name : str = " update_multion_session "
name : str = " update_multion_session "
description : str = """ Use this tool to update \
description : str = """ Use this tool to update \
a existing corresponding \
an existing corresponding Multion Browser Window with provided fields . \
Multion Browser Window with provided fields . \
Note : TabId must be received from previous Browser window creation . """
Note : TabId is got from one of the previous Browser window creation . """
args_schema : Type [ UpdateSessionSchema ] = UpdateSessionSchema
args_schema : Type [ UpdateSessionSchema ] = UpdateSessionSchema
tabId : str = " "
def _run (
def _run (
self ,
self ,
@ -63,9 +63,10 @@ class MultionUpdateSession(BaseTool):
self . tabId = tabId
self . tabId = tabId
return content
return content
except Exception as e :
except Exception as e :
print ( f " { e } , creating a new session " )
print ( f " { e } , retrying... " )
response = multion . new_session ( { " input " : query , " url " : url } )
return { " error " : f " { e } " , " Response " : " retrying... " }
self . tabID = response [ " tabId " ]
# response = multion.new_session({"input": query, "url": url})
return { " tabId " : response [ " tabId " ] , " Response " : response [ " message " ] }
# self.tabID = response["tabId"]
# return {"tabId": response["tabId"], "Response": response["message"]}
except Exception as e :
except Exception as e :
raise Exception ( f " An error occurred: { e } " )
raise Exception ( f " An error occurred: { e } " )