Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Merge pull request #603 from GODCREATOR333/main

Magnus Müller1bfbb90f8b47
diff --cc docs/customize/supported-models.mdx
index be88e802c,c2a25ea92..1798cfbfb
--- a/docs/customize/supported-models.mdx
+++ b/docs/customize/supported-models.mdx
@@@ -115,9 -115,13 +115,13 @@@ from langchain_google_genai import Chat
from browser_use import Agent
from pydantic import SecretStr
import os
+ from dotenv import load_dotenv
+ load_dotenv()
+
+ api_key = os.getenv("GEMINI_API_KEY")
# Initialize the model
-llm = ChatGoogleGenerativeAI(model='gemini-2.0-flash-exp', api_key=SecretStr(api_key))
+llm = ChatGoogleGenerativeAI(model='gemini-2.0-flash-exp', api_key=SecretStr(os.getenv('GEMINI_API_KEY')))
# Create agent with the model
agent = Agent(