@@ -55,7 +55,10 @@ $client = new Client(
5555 modelAPIKey: getenv('MODEL_API_KEY') ?: 'My Model API Key',
5656);
5757
58- $response = $client->sessions->act('c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123');
58+ $response = $client->sessions->act(
59+ 'c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123',
60+ input: 'click the first link on the page',
61+ );
5962
6063var_dump($response->data);
6164```
@@ -77,7 +80,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
7780use Stagehand\Core\Exceptions\APIConnectionException;
7881
7982try {
80- $response = $client->sessions->act('c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123 ');
83+ $response = $client->sessions->start(modelName: 'gpt-4o ');
8184} catch (APIConnectionException $e) {
8285 echo "The server could not be reached", PHP_EOL;
8386 var_dump($e->getPrevious());
@@ -123,9 +126,8 @@ use Stagehand\RequestOptions;
123126$client = new Client(maxRetries: 0);
124127
125128// Or, configure per-request:
126- $result = $client->sessions->act(
127- 'c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123',
128- requestOptions: RequestOptions::with(maxRetries: 5),
129+ $result = $client->sessions->start(
130+ modelName: 'gpt-4o', requestOptions: RequestOptions::with(maxRetries: 5)
129131);
130132```
131133
@@ -144,8 +146,8 @@ Note: the `extra*` parameters of the same name overrides the documented paramete
144146
145147use Stagehand\RequestOptions;
146148
147- $response = $client->sessions->act (
148- 'c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123 ',
149+ $response = $client->sessions->start (
150+ modelName: 'gpt-4o ',
149151 requestOptions: RequestOptions::with(
150152 extraQueryParams: ['my_query_parameter' => 'value'],
151153 extraBodyParams: ['my_body_parameter' => 'value'],
0 commit comments