Files
browser-use/examples/simple.py
Gregor Žunič 121aef0371 gpt 5 support
2025-08-07 14:40:19 -07:00

32 lines
477 B
Python

import asyncio
import os
import sys
from browser_use.llm.openai.chat import ChatOpenAI
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from dotenv import load_dotenv
load_dotenv()
from browser_use import Agent
# Initialize the model
llm = ChatOpenAI(
model='gpt-5-mini',
)
task = 'Find the founders of browser-use'
agent = Agent(task=task, llm=llm)
async def main():
await agent.run()
if __name__ == '__main__':
asyncio.run(main())