Skip to content

Commit ecb87bd

Browse files
feat(api): api update
1 parent 6a8ad11 commit ecb87bd

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
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: 86
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-141cac5a78c04271425090df61bb3f19446c1c065ae66a5b7a6329c53628aafa.yml
3-
openapi_spec_hash: 2380917eddc78d715847c7ef6bfa3b4a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-4cd38d2f4180cc9bd949f182a221d6221c44e7e0ec1ddc110dd7677ba822b51a.yml
3+
openapi_spec_hash: e186fd7fd5f09ba496f0b7bb87365f3b
44
config_hash: 5b50498887b4fdca175b8377a9cb675f

src/runloop_api_client/resources/benchmarks/runs.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing_extensions import Literal
6+
57
import httpx
68

79
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
@@ -213,6 +215,8 @@ def list_scenario_runs(
213215
*,
214216
limit: int | NotGiven = NOT_GIVEN,
215217
starting_after: str | NotGiven = NOT_GIVEN,
218+
state: Literal["running", "scoring", "scored", "completed", "canceled", "timeout", "failed"]
219+
| NotGiven = NOT_GIVEN,
216220
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
217221
# The extra values given here take precedence over values defined on the client or passed to this method.
218222
extra_headers: Headers | None = None,
@@ -228,6 +232,8 @@ def list_scenario_runs(
228232
229233
starting_after: Load the next page of data starting after the item with the given ID.
230234
235+
state: Filter by Scenario Run state
236+
231237
extra_headers: Send extra headers
232238
233239
extra_query: Add additional query parameters to the request
@@ -250,6 +256,7 @@ def list_scenario_runs(
250256
{
251257
"limit": limit,
252258
"starting_after": starting_after,
259+
"state": state,
253260
},
254261
run_list_scenario_runs_params.RunListScenarioRunsParams,
255262
),
@@ -448,6 +455,8 @@ def list_scenario_runs(
448455
*,
449456
limit: int | NotGiven = NOT_GIVEN,
450457
starting_after: str | NotGiven = NOT_GIVEN,
458+
state: Literal["running", "scoring", "scored", "completed", "canceled", "timeout", "failed"]
459+
| NotGiven = NOT_GIVEN,
451460
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
452461
# The extra values given here take precedence over values defined on the client or passed to this method.
453462
extra_headers: Headers | None = None,
@@ -463,6 +472,8 @@ def list_scenario_runs(
463472
464473
starting_after: Load the next page of data starting after the item with the given ID.
465474
475+
state: Filter by Scenario Run state
476+
466477
extra_headers: Send extra headers
467478
468479
extra_query: Add additional query parameters to the request
@@ -485,6 +496,7 @@ def list_scenario_runs(
485496
{
486497
"limit": limit,
487498
"starting_after": starting_after,
499+
"state": state,
488500
},
489501
run_list_scenario_runs_params.RunListScenarioRunsParams,
490502
),

src/runloop_api_client/types/benchmarks/run_list_scenario_runs_params.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import TypedDict
5+
from typing_extensions import Literal, TypedDict
66

77
__all__ = ["RunListScenarioRunsParams"]
88

@@ -13,3 +13,6 @@ class RunListScenarioRunsParams(TypedDict, total=False):
1313

1414
starting_after: str
1515
"""Load the next page of data starting after the item with the given ID."""
16+
17+
state: Literal["running", "scoring", "scored", "completed", "canceled", "timeout", "failed"]
18+
"""Filter by Scenario Run state"""

tests/api_resources/benchmarks/test_runs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def test_method_list_scenario_runs_with_all_params(self, client: Runloop) -> Non
179179
id="id",
180180
limit=0,
181181
starting_after="starting_after",
182+
state="running",
182183
)
183184
assert_matches_type(SyncBenchmarkRunsCursorIDPage[ScenarioRunView], run, path=["response"])
184185

@@ -378,6 +379,7 @@ async def test_method_list_scenario_runs_with_all_params(self, async_client: Asy
378379
id="id",
379380
limit=0,
380381
starting_after="starting_after",
382+
state="running",
381383
)
382384
assert_matches_type(AsyncBenchmarkRunsCursorIDPage[ScenarioRunView], run, path=["response"])
383385

0 commit comments

Comments
 (0)