Skip to content

Commit 0ecfb1f

Browse files
committed
api key fix added
1 parent 4046725 commit 0ecfb1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/gpt-oss-browser-tool.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
def main() -> None:
1212
api_key = os.getenv('OLLAMA_API_KEY')
13-
client = Client(headers={'Authorization': f'Bearer {api_key}'}) if api_key else Client()
13+
if not api_key:
14+
raise RuntimeError('OLLAMA_API_KEY is required to run this example')
15+
client = Client(host='https://ollama.com', headers={'Authorization': f'Bearer {api_key}'})
1416
browser = Browser(initial_state=None, client=client)
1517

1618
# Tool schemas

0 commit comments

Comments
 (0)