) -> dict:
        try:
            try:
                response = multion.update_session(tabId, {"input": query, "url": url})
                content = {"tabId": tabId, "Response": response["message"]}
                self.tabId = tabId
                return content
            except Exception as e:
                print(f"{e}, creating a new session")
                response = multion.new_session({"input": query, "url": url})
                self.tabID = response["tabId"]
                return {"tabId": response["tabId"], "Response": response["message"]}
        except Exception as e:
            raise Exception(f"An error occurred: {e}")