@@ -113,14 +113,12 @@ if (file_exists(__DIR__ . '/../.env')) {
113113// Initialize the Stagehand client with API keys from environment variables
114114$client = new Client(
115115 browserbaseAPIKey: getenv('BROWSERBASE_API_KEY') ?: throw new Exception('BROWSERBASE_API_KEY environment variable is required'),
116- browserbaseProjectID: getenv('BROWSERBASE_PROJECT_ID') ?: throw new Exception('BROWSERBASE_PROJECT_ID environment variable is required'),
117116 modelAPIKey: getenv('MODEL_API_KEY') ?: throw new Exception('MODEL_API_KEY environment variable is required'),
118117);
119118
120119// Start a new session
121120$startResponse = $client->sessions->start(
122121 browserbaseAPIKey: getenv('BROWSERBASE_API_KEY'),
123- browserbaseProjectID: getenv('BROWSERBASE_PROJECT_ID'),
124122 model: 'openai/gpt-4o',
125123);
126124echo "Session started: {$startResponse->data->sessionID}\n";
@@ -217,12 +215,11 @@ echo "Session ended\n";
217215
218216### Running the Example
219217
220- Set the required environment variables and run the example script:
218+ Set the environment variables and run the example script:
221219
222220``` bash
223221# Set your credentials
224222export BROWSERBASE_API_KEY=" your-browserbase-api-key"
225- export BROWSERBASE_PROJECT_ID=" your-browserbase-project-id"
226223export MODEL_API_KEY=" your-openai-api-key"
227224
228225# Install dependencies and run
@@ -248,9 +245,6 @@ use Stagehand\Client;
248245
249246$client = new Client(
250247 browserbaseAPIKey: getenv('BROWSERBASE_API_KEY') ?: 'My Browserbase API Key',
251- browserbaseProjectID: getenv(
252- 'BROWSERBASE_PROJECT_ID'
253- ) ?: 'My Browserbase Project ID',
254248 modelAPIKey: getenv('MODEL_API_KEY') ?: 'My Model API Key',
255249);
256250
0 commit comments