Skip to content

Commit f8c0f21

Browse files
feat(api): api update
1 parent 7df6775 commit f8c0f21

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

.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
@@ -255,6 +255,7 @@ def update(
255255
def list(
256256
self,
257257
*,
258+
benchmark_id: str | NotGiven = NOT_GIVEN,
258259
limit: int | NotGiven = NOT_GIVEN,
259260
name: str | NotGiven = NOT_GIVEN,
260261
starting_after: str | NotGiven = NOT_GIVEN,
@@ -265,12 +266,13 @@ def list(
265266
extra_body: Body | None = None,
266267
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
267268
) -> SyncScenariosCursorIDPage[ScenarioView]:
268-
"""List all Scenarios matching filter.
269+
"""
270+
List all Scenarios matching filter.
269271
270272
Args:
271-
limit: The limit of items to return.
273+
benchmark_id: Filter scenarios by benchmark ID.
272274
273-
Default is 20.
275+
limit: The limit of items to return. Default is 20.
274276
275277
name: Query for Scenarios with a given name.
276278
@@ -294,6 +296,7 @@ def list(
294296
timeout=timeout,
295297
query=maybe_transform(
296298
{
299+
"benchmark_id": benchmark_id,
297300
"limit": limit,
298301
"name": name,
299302
"starting_after": starting_after,
@@ -619,6 +622,7 @@ async def update(
619622
def list(
620623
self,
621624
*,
625+
benchmark_id: str | NotGiven = NOT_GIVEN,
622626
limit: int | NotGiven = NOT_GIVEN,
623627
name: str | NotGiven = NOT_GIVEN,
624628
starting_after: str | NotGiven = NOT_GIVEN,
@@ -629,12 +633,13 @@ def list(
629633
extra_body: Body | None = None,
630634
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
631635
) -> AsyncPaginator[ScenarioView, AsyncScenariosCursorIDPage[ScenarioView]]:
632-
"""List all Scenarios matching filter.
636+
"""
637+
List all Scenarios matching filter.
633638
634639
Args:
635-
limit: The limit of items to return.
640+
benchmark_id: Filter scenarios by benchmark ID.
636641
637-
Default is 20.
642+
limit: The limit of items to return. Default is 20.
638643
639644
name: Query for Scenarios with a given name.
640645
@@ -658,6 +663,7 @@ def list(
658663
timeout=timeout,
659664
query=maybe_transform(
660665
{
666+
"benchmark_id": benchmark_id,
661667
"limit": limit,
662668
"name": name,
663669
"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)