diff --git a/examples/gpt-oss-browser-tool.py b/examples/gpt-oss-browser-tool.py index 119c451..2713dd7 100644 --- a/examples/gpt-oss-browser-tool.py +++ b/examples/gpt-oss-browser-tool.py @@ -10,10 +10,7 @@ from ollama import Client def main() -> None: api_key = os.getenv('OLLAMA_API_KEY') - if api_key: - client = Client(headers={'Authorization': f'Bearer {api_key}'}) - else: - client = Client() + client = Client(headers={'Authorization': f'Bearer {api_key}'}) if api_key else Client() browser = Browser(initial_state=None, client=client) # Tool schemas diff --git a/examples/gpt_oss_browser_tool_helper.py b/examples/gpt_oss_browser_tool_helper.py index a33d90c..040d6d7 100644 --- a/examples/gpt_oss_browser_tool_helper.py +++ b/examples/gpt_oss_browser_tool_helper.py @@ -1,8 +1,8 @@ from __future__ import annotations +import re from dataclasses import dataclass, field from datetime import datetime -import re from typing import Any, Dict, List, Optional, Protocol, Tuple from urllib.parse import urlparse