Skip to content

Commit 77aeeea

Browse files
feat(api): manual updates
1 parent b47581e commit 77aeeea

3 files changed

Lines changed: 12 additions & 40 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-2c88c6d890406ff8a5f1bca692264fb9af4bc4fe64df0986e06d3386fc6d6fcb.yml
3-
openapi_spec_hash: dc6ea17f8152708dc0a390c7f86b1a5d
4-
config_hash: a17b6052ac65237b7b8e145f4f692d3c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-e52e8d3513159931200e5d4bd32cfdc475fe6e7db6b8015c394f5625b5a3ce1f.yml
3+
openapi_spec_hash: fa597eb985cd1c3ba03acf68d6416857
4+
config_hash: b138dc33d4d0880499266048be517958

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ use Stagehand\Core\Exceptions\APIConnectionException;
8181

8282
try {
8383
$response = $client->sessions->start(
84-
browserbaseAPIKey: '<your API key here>',
85-
browserbaseProjectID: '<your project ID here>',
84+
browserbaseAPIKey: 'BROWSERBASE_API_KEY',
85+
browserbaseProjectID: 'BROWSERBASE_PROJECT_ID',
8686
);
8787
} catch (APIConnectionException $e) {
8888
echo "The server could not be reached", PHP_EOL;
@@ -130,8 +130,8 @@ $client = new Client(maxRetries: 0);
130130

131131
// Or, configure per-request:
132132
$result = $client->sessions->start(
133-
browserbaseAPIKey: '<your API key here>',
134-
browserbaseProjectID: '<your project ID here>',
133+
browserbaseAPIKey: 'BROWSERBASE_API_KEY',
134+
browserbaseProjectID: 'BROWSERBASE_PROJECT_ID',
135135
requestOptions: RequestOptions::with(maxRetries: 5),
136136
);
137137
```
@@ -152,8 +152,8 @@ Note: the `extra*` parameters of the same name overrides the documented paramete
152152
use Stagehand\RequestOptions;
153153

154154
$response = $client->sessions->start(
155-
browserbaseAPIKey: '<your API key here>',
156-
browserbaseProjectID: '<your project ID here>',
155+
browserbaseAPIKey: 'BROWSERBASE_API_KEY',
156+
browserbaseProjectID: 'BROWSERBASE_PROJECT_ID',
157157
requestOptions: RequestOptions::with(
158158
extraQueryParams: ['my_query_parameter' => 'value'],
159159
extraBodyParams: ['my_body_parameter' => 'value'],

src/Sessions/SessionExecuteAgentResponse.php

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
use Stagehand\Core\Contracts\BaseModel;
1010

1111
/**
12-
* @phpstan-type SessionExecuteAgentResponseShape = array{
13-
* message?: string|null, steps?: list<mixed>|null
14-
* }
12+
* @phpstan-type SessionExecuteAgentResponseShape = array{message?: string|null}
1513
*/
1614
final class SessionExecuteAgentResponse implements BaseModel
1715
{
@@ -24,14 +22,6 @@ final class SessionExecuteAgentResponse implements BaseModel
2422
#[Optional]
2523
public ?string $message;
2624

27-
/**
28-
* Steps taken by the agent.
29-
*
30-
* @var list<mixed>|null $steps
31-
*/
32-
#[Optional(list: 'mixed')]
33-
public ?array $steps;
34-
3525
public function __construct()
3626
{
3727
$this->initialize();
@@ -41,17 +31,12 @@ public function __construct()
4131
* Construct an instance from the required parameters.
4232
*
4333
* You must use named parameters to construct any parameters with a default value.
44-
*
45-
* @param list<mixed> $steps
4634
*/
47-
public static function with(
48-
?string $message = null,
49-
?array $steps = null
50-
): self {
35+
public static function with(?string $message = null): self
36+
{
5137
$self = new self;
5238

5339
null !== $message && $self['message'] = $message;
54-
null !== $steps && $self['steps'] = $steps;
5540

5641
return $self;
5742
}
@@ -66,17 +51,4 @@ public function withMessage(string $message): self
6651

6752
return $self;
6853
}
69-
70-
/**
71-
* Steps taken by the agent.
72-
*
73-
* @param list<mixed> $steps
74-
*/
75-
public function withSteps(array $steps): self
76-
{
77-
$self = clone $this;
78-
$self['steps'] = $steps;
79-
80-
return $self;
81-
}
8254
}

0 commit comments

Comments
 (0)