diff --git a/examples/browser_tool.py b/examples/browser_tool.py index 180b851..b2eb982 100644 --- a/examples/browser_tool.py +++ b/examples/browser_tool.py @@ -1,6 +1,5 @@ from __future__ import annotations -import json import os from typing import Any, Dict, List diff --git a/examples/browser_tool_helpers.py b/examples/browser_tool_helpers.py index 20281ef..5a7d987 100644 --- a/examples/browser_tool_helpers.py +++ b/examples/browser_tool_helpers.py @@ -1,12 +1,14 @@ from __future__ import annotations +import re from dataclasses import dataclass, field from datetime import datetime -from typing import Dict, List, Optional, Protocol, Any, Tuple +from typing import Any, Dict, List, Optional, Protocol, Tuple from urllib.parse import urlparse -import re + from ollama import Client + @dataclass class Page: url: str @@ -192,7 +194,7 @@ class Browser: page.lines = [""] total_lines = 1 - if loc != loc or loc < 0: + if loc != loc or loc < 0: loc = 0 elif loc >= total_lines: loc = max(0, total_lines - 1)