Skip to content

Commit 695b29a

Browse files
feat(api): api update
1 parent 1d815d4 commit 695b29a

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 91
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-86c4a065b1820b26c7afd40bbc374e87dd5e9c2ffa0abad26e7fd4ebec1cf72b.yml
3-
openapi_spec_hash: 6c6a44548177464033f3c174c89ba06a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-32aaecf1da425c37d534ed04df36003ab9d766a7755cd18f96541929a2a3ea59.yml
3+
openapi_spec_hash: e326c47b99943cbbab473fde3b257221
44
config_hash: 421e8d0e71c7ef71fdfebede08ea7271

src/runloop_api_client/resources/scenarios/scenarios.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ def update(
256256
def list(
257257
self,
258258
*,
259+
benchmark_id: str | NotGiven = NOT_GIVEN,
259260
limit: int | NotGiven = NOT_GIVEN,
260261
name: str | NotGiven = NOT_GIVEN,
261262
starting_after: str | NotGiven = NOT_GIVEN,
@@ -266,12 +267,13 @@ def list(
266267
extra_body: Body | None = None,
267268
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
268269
) -> SyncScenariosCursorIDPage[ScenarioView]:
269-
"""List all Scenarios matching filter.
270+
"""
271+
List all Scenarios matching filter.
270272
271273
Args:
272-
limit: The limit of items to return.
274+
benchmark_id: Filter scenarios by benchmark ID.
273275
274-
Default is 20.
276+
limit: The limit of items to return. Default is 20.
275277
276278
name: Query for Scenarios with a given name.
277279
@@ -295,6 +297,7 @@ def list(
295297
timeout=timeout,
296298
query=maybe_transform(
297299
{
300+
"benchmark_id": benchmark_id,
298301
"limit": limit,
299302
"name": name,
300303
"starting_after": starting_after,
@@ -679,6 +682,7 @@ async def update(
679682
def list(
680683
self,
681684
*,
685+
benchmark_id: str | NotGiven = NOT_GIVEN,
682686
limit: int | NotGiven = NOT_GIVEN,
683687
name: str | NotGiven = NOT_GIVEN,
684688
starting_after: str | NotGiven = NOT_GIVEN,
@@ -689,12 +693,13 @@ def list(
689693
extra_body: Body | None = None,
690694
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
691695
) -> AsyncPaginator[ScenarioView, AsyncScenariosCursorIDPage[ScenarioView]]:
692-
"""List all Scenarios matching filter.
696+
"""
697+
List all Scenarios matching filter.
693698
694699
Args:
695-
limit: The limit of items to return.
700+
benchmark_id: Filter scenarios by benchmark ID.
696701
697-
Default is 20.
702+
limit: The limit of items to return. Default is 20.
698703
699704
name: Query for Scenarios with a given name.
700705
@@ -718,6 +723,7 @@ def list(
718723
timeout=timeout,
719724
query=maybe_transform(
720725
{
726+
"benchmark_id": benchmark_id,
721727
"limit": limit,
722728
"name": name,
723729
"starting_after": starting_after,

src/runloop_api_client/types/scenario_list_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99

1010
class ScenarioListParams(TypedDict, total=False):
11+
benchmark_id: str
12+
"""Filter scenarios by benchmark ID."""
13+
1114
limit: int
1215
"""The limit of items to return. Default is 20."""
1316

tests/api_resources/test_scenarios.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ def test_method_list(self, client: Runloop) -> None:
339339
@parametrize
340340
def test_method_list_with_all_params(self, client: Runloop) -> None:
341341
scenario = client.scenarios.list(
342+
benchmark_id="benchmark_id",
342343
limit=0,
343344
name="name",
344345
starting_after="starting_after",
@@ -762,6 +763,7 @@ async def test_method_list(self, async_client: AsyncRunloop) -> None:
762763
@parametrize
763764
async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
764765
scenario = await async_client.scenarios.list(
766+
benchmark_id="benchmark_id",
765767
limit=0,
766768
name="name",
767769
starting_after="starting_after",

0 commit comments

Comments
 (0)