Skip to content

Instantly share code, notes, and snippets.

@pascscha
Created January 5, 2025 16:45
Show Gist options
  • Save pascscha/221127dbf53faff92d7f17b7bae60c9b to your computer and use it in GitHub Desktop.
Save pascscha/221127dbf53faff92d7f17b7bae60c9b to your computer and use it in GitHub Desktop.
Browser Use PoC
import os
# Disable telemetry
os.environ["ANONYMIZED_TELEMETRY"] = "false"
import asyncio
from browser_use import Agent
from langchain_ollama import ChatOllama
async def run_search() -> str:
agent = Agent(
task="Search for a 'browser use' post on the r/LocalLLaMA subreddit and open it."
"Scroll down and tell me which comment you find funniest.",
llm=ChatOllama(
model="qwen2.5:32b-instruct-q4_K_M",
num_ctx=16000,
),
)
result = await agent.run()
return result
async def main():
result = await run_search()
print("\n\n", result)
if __name__ == "__main__":
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment