[Add] browser-use and main.py
This commit is contained in:
parent
08e64bdf45
commit
96914d44ac
221 changed files with 30952 additions and 1 deletions
34
browser-use/examples/models/qwen.py
Normal file
34
browser-use/examples/models/qwen.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
from langchain_ollama import ChatOllama
|
||||
|
||||
from browser_use import Agent
|
||||
|
||||
|
||||
async def run_search():
|
||||
agent = Agent(
|
||||
task=(
|
||||
"1. Go to https://www.reddit.com/r/LocalLLaMA2. Search for 'browser use' in the search bar3. Click search4. Call done"
|
||||
),
|
||||
llm=ChatOllama(
|
||||
# model='qwen2.5:32b-instruct-q4_K_M',
|
||||
# model='qwen2.5:14b',
|
||||
model='qwen2.5:latest',
|
||||
num_ctx=128000,
|
||||
),
|
||||
max_actions_per_step=1,
|
||||
)
|
||||
|
||||
await agent.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(run_search())
|
||||
Loading…
Add table
Add a link
Reference in a new issue