From 8dd1d7cb02ba3014f7e85823bec157a840892552 Mon Sep 17 00:00:00 2001 From: nicole pardal Date: Wed, 24 Sep 2025 11:49:19 -0700 Subject: [PATCH] removed comments --- examples/gpt-oss-browser-tool.py | 1 - examples/gpt_oss_browser_tool_helper.py | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/examples/gpt-oss-browser-tool.py b/examples/gpt-oss-browser-tool.py index bcaefe8..e213fbd 100644 --- a/examples/gpt-oss-browser-tool.py +++ b/examples/gpt-oss-browser-tool.py @@ -11,7 +11,6 @@ def main() -> None: client = Client() browser = Browser(initial_state=None, client=client) - # Tool schemas browser_search_schema = { 'type': 'function', 'function': { diff --git a/examples/gpt_oss_browser_tool_helper.py b/examples/gpt_oss_browser_tool_helper.py index e3e064c..40bdb5b 100644 --- a/examples/gpt_oss_browser_tool_helper.py +++ b/examples/gpt_oss_browser_tool_helper.py @@ -41,13 +41,9 @@ class CrawlClient(Protocol): def crawl(self, urls: List[str]): ... -# ---- Constants --------------------------------------------------------------- - DEFAULT_VIEW_TOKENS = 1024 CAPPED_TOOL_CONTENT_LEN = 8000 -# ---- Helpers ---------------------------------------------------------------- - def cap_tool_content(text: str) -> str: if not text: @@ -68,9 +64,6 @@ def _safe_domain(u: str) -> str: return u -# ---- BrowserState ------------------------------------------------------------ - - class BrowserState: def __init__(self, initial_state: Optional[BrowserStateData] = None): self._data = initial_state or BrowserStateData(view_tokens=DEFAULT_VIEW_TOKENS) @@ -82,9 +75,6 @@ class BrowserState: self._data = data -# ---- Browser ---------------------------------------------------------------- - - class Browser: def __init__( self, @@ -203,8 +193,6 @@ class Browser: return header + '\n'.join(body_lines) - # ---- page builders ---- - def _build_search_results_page_collection(self, query: str, results: Dict[str, Any]) -> Page: page = Page( url=f'search_results_{query}', @@ -338,8 +326,6 @@ class Browser: find_page.lines = self._wrap_lines(find_page.text, 80) return find_page - # ---- public API: search / open / find ------------------------------------ - def search(self, *, query: str, topn: int = 5) -> Dict[str, Any]: if not self._client: raise RuntimeError('Client not provided')