mirror of
https://github.com/browser-use/browser-use.git
synced 2025-02-18 01:18:20 +03:00
26 lines
422 B
Python
26 lines
422 B
Python
import asyncio
|
|
|
|
from dotenv import load_dotenv
|
|
from langchain_openai import ChatOpenAI
|
|
|
|
from browser_use import Agent
|
|
|
|
load_dotenv()
|
|
|
|
# Initialize the model
|
|
llm = ChatOpenAI(
|
|
model='gpt-4o',
|
|
temperature=0.0,
|
|
)
|
|
task = 'Find the founders of browser-use and draft them a short personalized message'
|
|
|
|
agent = Agent(task=task, llm=llm)
|
|
|
|
|
|
async def main():
|
|
await agent.run()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
asyncio.run(main())
|