Skip to content

Commit 597df88

Browse files
feat(api): api update
1 parent 0e59a56 commit 597df88

16 files changed

+136
-402
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 79
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-ba1b6db5490b976ad56ecea10d380f462ec5b9f8d47d139f87d7fff3e7df330a.yml
3-
openapi_spec_hash: bf76fd15629ea1a4c134c4af5436c78f
4-
config_hash: 4cb90c87fb61338e46c50cea9c42abd7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8227cc69585fb2b6d4eed5266a60ed91768c97200f52f95fe022417c6e9e91da.yml
3+
openapi_spec_hash: e038f338d187fe1ac41d36ccce67dcc6
4+
config_hash: e9831eba75eecfc502817af80812f6a7

api.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,17 @@ from runloop_api_client.types import (
1313
BenchmarkCreateParameters,
1414
BenchmarkRunListView,
1515
BenchmarkRunView,
16+
BenchmarkView,
1617
StartBenchmarkRunParameters,
17-
BenchmarkCreateResponse,
18-
BenchmarkRetrieveResponse,
19-
BenchmarkListResponse,
20-
BenchmarkListPublicResponse,
2118
)
2219
```
2320

2421
Methods:
2522

26-
- <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_create_response.py">BenchmarkCreateResponse</a></code>
27-
- <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_retrieve_response.py">BenchmarkRetrieveResponse</a></code>
28-
- <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_response.py">SyncBenchmarksCursorIDPage[BenchmarkListResponse]</a></code>
29-
- <code title="get /v1/benchmarks/list_public">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_list_public_response.py">SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]</a></code>
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_view.py">SyncBenchmarksCursorIDPage[BenchmarkView]</a></code>
26+
- <code title="get /v1/benchmarks/list_public">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">SyncBenchmarksCursorIDPage[BenchmarkView]</a></code>
3027
- <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>
3128

3229
## Runs
@@ -269,26 +266,22 @@ from runloop_api_client.types import (
269266
ScenarioEnvironment,
270267
ScenarioRunListView,
271268
ScenarioRunView,
269+
ScenarioView,
272270
ScoringContract,
273271
ScoringContractResultView,
274272
ScoringFunction,
275273
ScoringFunctionResultView,
276274
StartScenarioRunParameters,
277-
ScenarioCreateResponse,
278-
ScenarioRetrieveResponse,
279-
ScenarioUpdateResponse,
280-
ScenarioListResponse,
281-
ScenarioListPublicResponse,
282275
)
283276
```
284277

285278
Methods:
286279

287-
- <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_create_response.py">ScenarioCreateResponse</a></code>
288-
- <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_retrieve_response.py">ScenarioRetrieveResponse</a></code>
289-
- <code title="post /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">update</a>(id, \*\*<a href="src/runloop_api_client/types/scenario_update_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_update_response.py">ScenarioUpdateResponse</a></code>
290-
- <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_response.py">SyncScenariosCursorIDPage[ScenarioListResponse]</a></code>
291-
- <code title="get /v1/scenarios/list_public">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_list_public_response.py">SyncScenariosCursorIDPage[ScenarioListPublicResponse]</a></code>
280+
- <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>
281+
- <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>
282+
- <code title="post /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">update</a>(id, \*\*<a href="src/runloop_api_client/types/scenario_update_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
283+
- <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_view.py">SyncScenariosCursorIDPage[ScenarioView]</a></code>
284+
- <code title="get /v1/scenarios/list_public">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">SyncScenariosCursorIDPage[ScenarioView]</a></code>
292285
- <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>
293286

294287
## Runs

src/runloop_api_client/resources/benchmarks/benchmarks.py

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@
3232
)
3333
from ...pagination import SyncBenchmarksCursorIDPage, AsyncBenchmarksCursorIDPage
3434
from ..._base_client import AsyncPaginator, make_request_options
35+
from ...types.benchmark_view import BenchmarkView
3536
from ...types.benchmark_run_view import BenchmarkRunView
36-
from ...types.benchmark_list_response import BenchmarkListResponse
37-
from ...types.benchmark_create_response import BenchmarkCreateResponse
38-
from ...types.benchmark_retrieve_response import BenchmarkRetrieveResponse
39-
from ...types.benchmark_list_public_response import BenchmarkListPublicResponse
4037

4138
__all__ = ["BenchmarksResource", "AsyncBenchmarksResource"]
4239

@@ -79,7 +76,7 @@ def create(
7976
extra_body: Body | None = None,
8077
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
8178
idempotency_key: str | None = None,
82-
) -> BenchmarkCreateResponse:
79+
) -> BenchmarkView:
8380
"""
8481
Create a Benchmark with a set of Scenarios.
8582
@@ -120,7 +117,7 @@ def create(
120117
timeout=timeout,
121118
idempotency_key=idempotency_key,
122119
),
123-
cast_to=BenchmarkCreateResponse,
120+
cast_to=BenchmarkView,
124121
)
125122

126123
def retrieve(
@@ -133,7 +130,7 @@ def retrieve(
133130
extra_query: Query | None = None,
134131
extra_body: Body | None = None,
135132
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
136-
) -> BenchmarkRetrieveResponse:
133+
) -> BenchmarkView:
137134
"""
138135
Get a previously created Benchmark.
139136
@@ -153,7 +150,7 @@ def retrieve(
153150
options=make_request_options(
154151
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
155152
),
156-
cast_to=BenchmarkRetrieveResponse,
153+
cast_to=BenchmarkView,
157154
)
158155

159156
def list(
@@ -167,7 +164,7 @@ def list(
167164
extra_query: Query | None = None,
168165
extra_body: Body | None = None,
169166
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
170-
) -> SyncBenchmarksCursorIDPage[BenchmarkListResponse]:
167+
) -> SyncBenchmarksCursorIDPage[BenchmarkView]:
171168
"""
172169
List all Benchmarks matching filter.
173170
@@ -186,7 +183,7 @@ def list(
186183
"""
187184
return self._get_api_list(
188185
"/v1/benchmarks",
189-
page=SyncBenchmarksCursorIDPage[BenchmarkListResponse],
186+
page=SyncBenchmarksCursorIDPage[BenchmarkView],
190187
options=make_request_options(
191188
extra_headers=extra_headers,
192189
extra_query=extra_query,
@@ -200,7 +197,7 @@ def list(
200197
benchmark_list_params.BenchmarkListParams,
201198
),
202199
),
203-
model=BenchmarkListResponse,
200+
model=BenchmarkView,
204201
)
205202

206203
def list_public(
@@ -214,7 +211,7 @@ def list_public(
214211
extra_query: Query | None = None,
215212
extra_body: Body | None = None,
216213
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
217-
) -> SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]:
214+
) -> SyncBenchmarksCursorIDPage[BenchmarkView]:
218215
"""
219216
List all public benchmarks matching filter.
220217
@@ -233,7 +230,7 @@ def list_public(
233230
"""
234231
return self._get_api_list(
235232
"/v1/benchmarks/list_public",
236-
page=SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse],
233+
page=SyncBenchmarksCursorIDPage[BenchmarkView],
237234
options=make_request_options(
238235
extra_headers=extra_headers,
239236
extra_query=extra_query,
@@ -247,7 +244,7 @@ def list_public(
247244
benchmark_list_public_params.BenchmarkListPublicParams,
248245
),
249246
),
250-
model=BenchmarkListPublicResponse,
247+
model=BenchmarkView,
251248
)
252249

253250
def start_run(
@@ -343,7 +340,7 @@ async def create(
343340
extra_body: Body | None = None,
344341
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
345342
idempotency_key: str | None = None,
346-
) -> BenchmarkCreateResponse:
343+
) -> BenchmarkView:
347344
"""
348345
Create a Benchmark with a set of Scenarios.
349346
@@ -384,7 +381,7 @@ async def create(
384381
timeout=timeout,
385382
idempotency_key=idempotency_key,
386383
),
387-
cast_to=BenchmarkCreateResponse,
384+
cast_to=BenchmarkView,
388385
)
389386

390387
async def retrieve(
@@ -397,7 +394,7 @@ async def retrieve(
397394
extra_query: Query | None = None,
398395
extra_body: Body | None = None,
399396
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
400-
) -> BenchmarkRetrieveResponse:
397+
) -> BenchmarkView:
401398
"""
402399
Get a previously created Benchmark.
403400
@@ -417,7 +414,7 @@ async def retrieve(
417414
options=make_request_options(
418415
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
419416
),
420-
cast_to=BenchmarkRetrieveResponse,
417+
cast_to=BenchmarkView,
421418
)
422419

423420
def list(
@@ -431,7 +428,7 @@ def list(
431428
extra_query: Query | None = None,
432429
extra_body: Body | None = None,
433430
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
434-
) -> AsyncPaginator[BenchmarkListResponse, AsyncBenchmarksCursorIDPage[BenchmarkListResponse]]:
431+
) -> AsyncPaginator[BenchmarkView, AsyncBenchmarksCursorIDPage[BenchmarkView]]:
435432
"""
436433
List all Benchmarks matching filter.
437434
@@ -450,7 +447,7 @@ def list(
450447
"""
451448
return self._get_api_list(
452449
"/v1/benchmarks",
453-
page=AsyncBenchmarksCursorIDPage[BenchmarkListResponse],
450+
page=AsyncBenchmarksCursorIDPage[BenchmarkView],
454451
options=make_request_options(
455452
extra_headers=extra_headers,
456453
extra_query=extra_query,
@@ -464,7 +461,7 @@ def list(
464461
benchmark_list_params.BenchmarkListParams,
465462
),
466463
),
467-
model=BenchmarkListResponse,
464+
model=BenchmarkView,
468465
)
469466

470467
def list_public(
@@ -478,7 +475,7 @@ def list_public(
478475
extra_query: Query | None = None,
479476
extra_body: Body | None = None,
480477
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
481-
) -> AsyncPaginator[BenchmarkListPublicResponse, AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]]:
478+
) -> AsyncPaginator[BenchmarkView, AsyncBenchmarksCursorIDPage[BenchmarkView]]:
482479
"""
483480
List all public benchmarks matching filter.
484481
@@ -497,7 +494,7 @@ def list_public(
497494
"""
498495
return self._get_api_list(
499496
"/v1/benchmarks/list_public",
500-
page=AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse],
497+
page=AsyncBenchmarksCursorIDPage[BenchmarkView],
501498
options=make_request_options(
502499
extra_headers=extra_headers,
503500
extra_query=extra_query,
@@ -511,7 +508,7 @@ def list_public(
511508
benchmark_list_public_params.BenchmarkListPublicParams,
512509
),
513510
),
514-
model=BenchmarkListPublicResponse,
511+
model=BenchmarkView,
515512
)
516513

517514
async def start_run(

0 commit comments

Comments
 (0)