Skip to content

Commit d59a350

Browse files
authored
[GRO-257] flags for advanced stealth and proxies, set default model (#23)
* flags for advanced stealth and proxies, set default model * change to brave search, comment out proxies and advanced stealth
1 parent a71521d commit d59a350

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

examples/integrations/temporal/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ npm install
4343
```
4444
BROWSERBASE_API_KEY=your_api_key
4545
BROWSERBASE_PROJECT_ID=your_project_id
46-
ANTHROPIC_API_KEY=your_anthropic_key # or OPENAI_API_KEY
46+
OPENAI_API_KEY=your_openai_key # or ANTHROPIC_API_KEY depending on the model you choose
4747
```
4848

4949
3. Start Temporal (if not already running):

examples/integrations/temporal/src/research-activities.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,25 @@ export async function initializeBrowser(): Promise<BrowserSession> {
9292
simulateNetworkDisconnect('browser initialization');
9393

9494
const config: ConstructorParams = {
95-
verbose: 1,
95+
verbose: 0,
9696
domSettleTimeoutMs: 8000,
9797
env: "BROWSERBASE",
9898
apiKey: process.env.BROWSERBASE_API_KEY,
99+
modelName: "openai/gpt-4o",
100+
modelClientOptions: {
101+
apiKey: process.env.OPENAI_API_KEY,
102+
},
99103
browserbaseSessionCreateParams: {
100-
proxies: true,
104+
// Only available in paid plans
105+
// proxies: true,
101106
projectId: process.env.BROWSERBASE_PROJECT_ID!,
102107
browserSettings: {
103108
viewport: {
104109
width: 1024,
105110
height: 768
106111
},
107-
advancedStealth: true
112+
// Only available on Scale Plans
113+
// advancedStealth: true
108114
}
109115
},
110116
};
@@ -172,9 +178,9 @@ export async function navigateToSearchPage(session: BrowserSession): Promise<voi
172178

173179
stagehand = await reconnectToSession(session);
174180

175-
console.log(`[${session.attemptId}] Navigating to Google...`);
176-
await stagehand.page.goto('https://www.google.com');
177-
console.log(`[${session.attemptId}] Successfully navigated to Google`);
181+
console.log(`[${session.attemptId}] Navigating to Brave...`);
182+
await stagehand.page.goto('https://search.brave.com/');
183+
console.log(`[${session.attemptId}] Successfully navigated to Brave`);
178184

179185
} catch (error: any) {
180186
console.error(`[${session.attemptId}] Navigation failed:`, error.message);

0 commit comments

Comments
 (0)