Skip to content

Commit cb1f8ac

Browse files
feat(api): api update (#501)
1 parent 394d017 commit cb1f8ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3913
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-15f23a9e2e014d2e5d4d72c39ee31c5556060fb37d1490f308ecce5aeb41d5c8.yml
1+
configured_endpoints: 61
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-f4e55467750a460852376c0f037c34548a9b72d438b3484b9db0fa62c2573f03.yml

api.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@
44
from runloop_api_client.types import AfterIdle, CodeMountParameters, LaunchParameters
55
```
66

7+
# Benchmarks
8+
9+
Types:
10+
11+
```python
12+
from runloop_api_client.types import (
13+
BenchmarkCreateParameters,
14+
BenchmarkListView,
15+
BenchmarkRunView,
16+
BenchmarkView,
17+
StartBenchmarkRunParameters,
18+
)
19+
```
20+
21+
Methods:
22+
23+
- <code title="post /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">create</a>(\*\*<a href="src/runloop_api_client/types/benchmark_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">BenchmarkView</a></code>
24+
- <code title="get /v1/benchmarks/{id}">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_view.py">BenchmarkView</a></code>
25+
- <code title="get /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_list_view.py">BenchmarkListView</a></code>
26+
- <code title="post /v1/benchmarks/start_run">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">start_run</a>(\*\*<a href="src/runloop_api_client/types/benchmark_start_run_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
27+
28+
## Runs
29+
30+
Types:
31+
32+
```python
33+
from runloop_api_client.types.benchmarks import RunListResponse
34+
```
35+
36+
Methods:
37+
38+
- <code title="get /v1/benchmarks/runs/{id}">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
39+
- <code title="get /v1/benchmarks/runs">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmarks/run_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmarks/run_list_response.py">RunListResponse</a></code>
40+
- <code title="post /v1/benchmarks/runs/{id}/complete">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">complete</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
41+
742
# Blueprints
843

944
Types:
@@ -173,6 +208,44 @@ Methods:
173208
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
174209
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/kill">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">kill</a>(execution_id, \*, devbox_id) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
175210

211+
# Scenarios
212+
213+
Types:
214+
215+
```python
216+
from runloop_api_client.types import (
217+
InputContextParameters,
218+
RepositoryConnectionListView,
219+
ScenarioCreateParameters,
220+
ScenarioEnvironmentParameters,
221+
ScenarioListView,
222+
ScenarioRunListView,
223+
ScenarioRunView,
224+
ScenarioView,
225+
ScoringContractParameters,
226+
ScoringContractResultView,
227+
ScoringFunctionParameters,
228+
ScoringFunctionResultView,
229+
StartScenarioRunParameters,
230+
)
231+
```
232+
233+
Methods:
234+
235+
- <code title="post /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">create</a>(\*\*<a href="src/runloop_api_client/types/scenario_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
236+
- <code title="get /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
237+
- <code title="get /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_list_view.py">ScenarioListView</a></code>
238+
- <code title="post /v1/scenarios/start_run">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">start_run</a>(\*\*<a href="src/runloop_api_client/types/scenario_start_run_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
239+
240+
## Runs
241+
242+
Methods:
243+
244+
- <code title="get /v1/scenarios/runs/{id}">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
245+
- <code title="get /v1/scenarios/runs">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenarios/run_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_run_list_view.py">ScenarioRunListView</a></code>
246+
- <code title="post /v1/scenarios/runs/{id}/complete">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">complete</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
247+
- <code title="post /v1/scenarios/runs/{id}/score">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">score</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
248+
176249
# Repositories
177250

178251
Types:

src/runloop_api_client/_client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@
3333
AsyncAPIClient,
3434
)
3535
from .resources.devboxes import devboxes
36+
from .resources.scenarios import scenarios
37+
from .resources.benchmarks import benchmarks
3638

3739
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Runloop", "AsyncRunloop", "Client", "AsyncClient"]
3840

3941

4042
class Runloop(SyncAPIClient):
43+
benchmarks: benchmarks.BenchmarksResource
4144
blueprints: blueprints.BlueprintsResource
4245
devboxes: devboxes.DevboxesResource
46+
scenarios: scenarios.ScenariosResource
4347
repositories: repositories.RepositoriesResource
4448
with_raw_response: RunloopWithRawResponse
4549
with_streaming_response: RunloopWithStreamedResponse
@@ -100,8 +104,10 @@ def __init__(
100104

101105
self._idempotency_header = "x-request-id"
102106

107+
self.benchmarks = benchmarks.BenchmarksResource(self)
103108
self.blueprints = blueprints.BlueprintsResource(self)
104109
self.devboxes = devboxes.DevboxesResource(self)
110+
self.scenarios = scenarios.ScenariosResource(self)
105111
self.repositories = repositories.RepositoriesResource(self)
106112
self.with_raw_response = RunloopWithRawResponse(self)
107113
self.with_streaming_response = RunloopWithStreamedResponse(self)
@@ -212,8 +218,10 @@ def _make_status_error(
212218

213219

214220
class AsyncRunloop(AsyncAPIClient):
221+
benchmarks: benchmarks.AsyncBenchmarksResource
215222
blueprints: blueprints.AsyncBlueprintsResource
216223
devboxes: devboxes.AsyncDevboxesResource
224+
scenarios: scenarios.AsyncScenariosResource
217225
repositories: repositories.AsyncRepositoriesResource
218226
with_raw_response: AsyncRunloopWithRawResponse
219227
with_streaming_response: AsyncRunloopWithStreamedResponse
@@ -274,8 +282,10 @@ def __init__(
274282

275283
self._idempotency_header = "x-request-id"
276284

285+
self.benchmarks = benchmarks.AsyncBenchmarksResource(self)
277286
self.blueprints = blueprints.AsyncBlueprintsResource(self)
278287
self.devboxes = devboxes.AsyncDevboxesResource(self)
288+
self.scenarios = scenarios.AsyncScenariosResource(self)
279289
self.repositories = repositories.AsyncRepositoriesResource(self)
280290
self.with_raw_response = AsyncRunloopWithRawResponse(self)
281291
self.with_streaming_response = AsyncRunloopWithStreamedResponse(self)
@@ -387,29 +397,37 @@ def _make_status_error(
387397

388398
class RunloopWithRawResponse:
389399
def __init__(self, client: Runloop) -> None:
400+
self.benchmarks = benchmarks.BenchmarksResourceWithRawResponse(client.benchmarks)
390401
self.blueprints = blueprints.BlueprintsResourceWithRawResponse(client.blueprints)
391402
self.devboxes = devboxes.DevboxesResourceWithRawResponse(client.devboxes)
403+
self.scenarios = scenarios.ScenariosResourceWithRawResponse(client.scenarios)
392404
self.repositories = repositories.RepositoriesResourceWithRawResponse(client.repositories)
393405

394406

395407
class AsyncRunloopWithRawResponse:
396408
def __init__(self, client: AsyncRunloop) -> None:
409+
self.benchmarks = benchmarks.AsyncBenchmarksResourceWithRawResponse(client.benchmarks)
397410
self.blueprints = blueprints.AsyncBlueprintsResourceWithRawResponse(client.blueprints)
398411
self.devboxes = devboxes.AsyncDevboxesResourceWithRawResponse(client.devboxes)
412+
self.scenarios = scenarios.AsyncScenariosResourceWithRawResponse(client.scenarios)
399413
self.repositories = repositories.AsyncRepositoriesResourceWithRawResponse(client.repositories)
400414

401415

402416
class RunloopWithStreamedResponse:
403417
def __init__(self, client: Runloop) -> None:
418+
self.benchmarks = benchmarks.BenchmarksResourceWithStreamingResponse(client.benchmarks)
404419
self.blueprints = blueprints.BlueprintsResourceWithStreamingResponse(client.blueprints)
405420
self.devboxes = devboxes.DevboxesResourceWithStreamingResponse(client.devboxes)
421+
self.scenarios = scenarios.ScenariosResourceWithStreamingResponse(client.scenarios)
406422
self.repositories = repositories.RepositoriesResourceWithStreamingResponse(client.repositories)
407423

408424

409425
class AsyncRunloopWithStreamedResponse:
410426
def __init__(self, client: AsyncRunloop) -> None:
427+
self.benchmarks = benchmarks.AsyncBenchmarksResourceWithStreamingResponse(client.benchmarks)
411428
self.blueprints = blueprints.AsyncBlueprintsResourceWithStreamingResponse(client.blueprints)
412429
self.devboxes = devboxes.AsyncDevboxesResourceWithStreamingResponse(client.devboxes)
430+
self.scenarios = scenarios.AsyncScenariosResourceWithStreamingResponse(client.scenarios)
413431
self.repositories = repositories.AsyncRepositoriesResourceWithStreamingResponse(client.repositories)
414432

415433

src/runloop_api_client/resources/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@
88
DevboxesResourceWithStreamingResponse,
99
AsyncDevboxesResourceWithStreamingResponse,
1010
)
11+
from .scenarios import (
12+
ScenariosResource,
13+
AsyncScenariosResource,
14+
ScenariosResourceWithRawResponse,
15+
AsyncScenariosResourceWithRawResponse,
16+
ScenariosResourceWithStreamingResponse,
17+
AsyncScenariosResourceWithStreamingResponse,
18+
)
19+
from .benchmarks import (
20+
BenchmarksResource,
21+
AsyncBenchmarksResource,
22+
BenchmarksResourceWithRawResponse,
23+
AsyncBenchmarksResourceWithRawResponse,
24+
BenchmarksResourceWithStreamingResponse,
25+
AsyncBenchmarksResourceWithStreamingResponse,
26+
)
1127
from .blueprints import (
1228
BlueprintsResource,
1329
AsyncBlueprintsResource,
@@ -26,6 +42,12 @@
2642
)
2743

2844
__all__ = [
45+
"BenchmarksResource",
46+
"AsyncBenchmarksResource",
47+
"BenchmarksResourceWithRawResponse",
48+
"AsyncBenchmarksResourceWithRawResponse",
49+
"BenchmarksResourceWithStreamingResponse",
50+
"AsyncBenchmarksResourceWithStreamingResponse",
2951
"BlueprintsResource",
3052
"AsyncBlueprintsResource",
3153
"BlueprintsResourceWithRawResponse",
@@ -38,6 +60,12 @@
3860
"AsyncDevboxesResourceWithRawResponse",
3961
"DevboxesResourceWithStreamingResponse",
4062
"AsyncDevboxesResourceWithStreamingResponse",
63+
"ScenariosResource",
64+
"AsyncScenariosResource",
65+
"ScenariosResourceWithRawResponse",
66+
"AsyncScenariosResourceWithRawResponse",
67+
"ScenariosResourceWithStreamingResponse",
68+
"AsyncScenariosResourceWithStreamingResponse",
4169
"RepositoriesResource",
4270
"AsyncRepositoriesResource",
4371
"RepositoriesResourceWithRawResponse",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .runs import (
4+
RunsResource,
5+
AsyncRunsResource,
6+
RunsResourceWithRawResponse,
7+
AsyncRunsResourceWithRawResponse,
8+
RunsResourceWithStreamingResponse,
9+
AsyncRunsResourceWithStreamingResponse,
10+
)
11+
from .benchmarks import (
12+
BenchmarksResource,
13+
AsyncBenchmarksResource,
14+
BenchmarksResourceWithRawResponse,
15+
AsyncBenchmarksResourceWithRawResponse,
16+
BenchmarksResourceWithStreamingResponse,
17+
AsyncBenchmarksResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"RunsResource",
22+
"AsyncRunsResource",
23+
"RunsResourceWithRawResponse",
24+
"AsyncRunsResourceWithRawResponse",
25+
"RunsResourceWithStreamingResponse",
26+
"AsyncRunsResourceWithStreamingResponse",
27+
"BenchmarksResource",
28+
"AsyncBenchmarksResource",
29+
"BenchmarksResourceWithRawResponse",
30+
"AsyncBenchmarksResourceWithRawResponse",
31+
"BenchmarksResourceWithStreamingResponse",
32+
"AsyncBenchmarksResourceWithStreamingResponse",
33+
]

0 commit comments

Comments
 (0)