[Add] browser-use and main.py
This commit is contained in:
parent
08e64bdf45
commit
96914d44ac
221 changed files with 30952 additions and 1 deletions
22
browser-use/main.py
Normal file
22
browser-use/main.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import asyncio
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
from browser_use import Agent, Browser, BrowserConfig
|
||||
from langchain_openai import ChatOpenAI
|
||||
|
||||
config = BrowserConfig(
|
||||
proxy={"server": "http://127.0.0.1:3000"},
|
||||
disable_security=True
|
||||
)
|
||||
|
||||
browser = Browser(config=config)
|
||||
|
||||
async def main():
|
||||
agent = Agent(
|
||||
task="go to the website https://supabase.com and extract the client login URL and click github login button",
|
||||
llm=ChatOpenAI(model="gpt-4o"),
|
||||
browser=browser,
|
||||
)
|
||||
await agent.run()
|
||||
|
||||
asyncio.run(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue