Skip to content

Commit 8dd1d7c

Browse files
committed
removed comments
1 parent d3afa37 commit 8dd1d7c

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

examples/gpt-oss-browser-tool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ def main() -> None:
1111
client = Client()
1212
browser = Browser(initial_state=None, client=client)
1313

14-
# Tool schemas
1514
browser_search_schema = {
1615
'type': 'function',
1716
'function': {

examples/gpt_oss_browser_tool_helper.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,9 @@ class CrawlClient(Protocol):
4141
def crawl(self, urls: List[str]): ...
4242

4343

44-
# ---- Constants ---------------------------------------------------------------
45-
4644
DEFAULT_VIEW_TOKENS = 1024
4745
CAPPED_TOOL_CONTENT_LEN = 8000
4846

49-
# ---- Helpers ----------------------------------------------------------------
50-
5147

5248
def cap_tool_content(text: str) -> str:
5349
if not text:
@@ -68,9 +64,6 @@ def _safe_domain(u: str) -> str:
6864
return u
6965

7066

71-
# ---- BrowserState ------------------------------------------------------------
72-
73-
7467
class BrowserState:
7568
def __init__(self, initial_state: Optional[BrowserStateData] = None):
7669
self._data = initial_state or BrowserStateData(view_tokens=DEFAULT_VIEW_TOKENS)
@@ -82,9 +75,6 @@ def set_data(self, data: BrowserStateData) -> None:
8275
self._data = data
8376

8477

85-
# ---- Browser ----------------------------------------------------------------
86-
87-
8878
class Browser:
8979
def __init__(
9080
self,
@@ -203,8 +193,6 @@ def _display_page(self, page: Page, cursor: int, loc: int, num_lines: int) -> st
203193

204194
return header + '\n'.join(body_lines)
205195

206-
# ---- page builders ----
207-
208196
def _build_search_results_page_collection(self, query: str, results: Dict[str, Any]) -> Page:
209197
page = Page(
210198
url=f'search_results_{query}',
@@ -338,8 +326,6 @@ def _build_find_results_page(self, pattern: str, page: Page) -> Page:
338326
find_page.lines = self._wrap_lines(find_page.text, 80)
339327
return find_page
340328

341-
# ---- public API: search / open / find ------------------------------------
342-
343329
def search(self, *, query: str, topn: int = 5) -> Dict[str, Any]:
344330
if not self._client:
345331
raise RuntimeError('Client not provided')

0 commit comments

Comments
 (0)