From 1d42387585d2e4978ef0c68d87bb1078379c4b21 Mon Sep 17 00:00:00 2001 From: Yuva <64978013+D-Yuva@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:18:04 +0530 Subject: [PATCH] Update abstract_markdown_browser.py 1. extract_tables(self) -> list This method is designed to extract tables from the Markdown content and return them as Python objects. 2. wait_for_render(self, timeout: int) -> None This method ensures that dynamic web content is fully rendered before extracting the page's Markdown. 3. get_logs(self) -> list This method allows developers to retrieve logs of browser activities and errors. --- .../abstract_markdown_browser.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/python/packages/autogen-magentic-one/src/autogen_magentic_one/markdown_browser/abstract_markdown_browser.py b/python/packages/autogen-magentic-one/src/autogen_magentic_one/markdown_browser/abstract_markdown_browser.py index 70417a6ad5a6..eea370b3487b 100644 --- a/python/packages/autogen-magentic-one/src/autogen_magentic_one/markdown_browser/abstract_markdown_browser.py +++ b/python/packages/autogen-magentic-one/src/autogen_magentic_one/markdown_browser/abstract_markdown_browser.py @@ -62,3 +62,26 @@ def find_on_page(self, query: str) -> Union[str, None]: @abstractmethod def find_next(self) -> Union[str, None]: pass + + @abstractmethod + def extract_tables(self) -> list: + """ + Extract tables from the Markdown content and return them as Python objects. + """ + pass + + @abstractmethod + def wait_for_render(self, timeout: int) -> None: + """ + Wait for the dynamic content to render within the specified timeout. + """ + pass + + @abstractmethod + def get_logs(self) -> list: + """ + Retrieve logs of browser activities and errors. + """ + pass + +