@@ -185,12 +185,12 @@ def update(
185
185
self ,
186
186
id : str ,
187
187
* ,
188
- input_context : InputContextParam ,
189
- name : str ,
190
- scoring_contract : ScoringContractParam ,
191
188
environment_parameters : Optional [ScenarioEnvironmentParam ] | NotGiven = NOT_GIVEN ,
189
+ input_context : Optional [InputContextParam ] | NotGiven = NOT_GIVEN ,
192
190
metadata : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
191
+ name : Optional [str ] | NotGiven = NOT_GIVEN ,
193
192
reference_output : Optional [str ] | NotGiven = NOT_GIVEN ,
193
+ scoring_contract : Optional [ScoringContractParam ] | NotGiven = NOT_GIVEN ,
194
194
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
195
195
# The extra values given here take precedence over values defined on the client or passed to this method.
196
196
extra_headers : Headers | None = None ,
@@ -201,23 +201,24 @@ def update(
201
201
) -> ScenarioView :
202
202
"""
203
203
Update a Scenario, a repeatable AI coding evaluation test that defines the
204
- starting environment as well as evaluation success criteria.
204
+ starting environment as well as evaluation success criteria. Only provided
205
+ fields will be updated.
205
206
206
207
Args:
207
- input_context: The input context for the Scenario.
208
-
209
- name: Name of the scenario.
210
-
211
- scoring_contract: The scoring contract for the Scenario.
212
-
213
208
environment_parameters: The Environment in which the Scenario will run.
214
209
210
+ input_context: The input context for the Scenario.
211
+
215
212
metadata: User defined metadata to attach to the scenario for organization.
216
213
214
+ name: Name of the scenario.
215
+
217
216
reference_output: A string representation of the reference output to solve the scenario. Commonly
218
217
can be the result of a git diff or a sequence of command actions to apply to the
219
218
environment.
220
219
220
+ scoring_contract: The scoring contract for the Scenario.
221
+
221
222
extra_headers: Send extra headers
222
223
223
224
extra_query: Add additional query parameters to the request
@@ -234,12 +235,12 @@ def update(
234
235
f"/v1/scenarios/{ id } " ,
235
236
body = maybe_transform (
236
237
{
237
- "input_context" : input_context ,
238
- "name" : name ,
239
- "scoring_contract" : scoring_contract ,
240
238
"environment_parameters" : environment_parameters ,
239
+ "input_context" : input_context ,
241
240
"metadata" : metadata ,
241
+ "name" : name ,
242
242
"reference_output" : reference_output ,
243
+ "scoring_contract" : scoring_contract ,
243
244
},
244
245
scenario_update_params .ScenarioUpdateParams ,
245
246
),
@@ -611,12 +612,12 @@ async def update(
611
612
self ,
612
613
id : str ,
613
614
* ,
614
- input_context : InputContextParam ,
615
- name : str ,
616
- scoring_contract : ScoringContractParam ,
617
615
environment_parameters : Optional [ScenarioEnvironmentParam ] | NotGiven = NOT_GIVEN ,
616
+ input_context : Optional [InputContextParam ] | NotGiven = NOT_GIVEN ,
618
617
metadata : Optional [Dict [str , str ]] | NotGiven = NOT_GIVEN ,
618
+ name : Optional [str ] | NotGiven = NOT_GIVEN ,
619
619
reference_output : Optional [str ] | NotGiven = NOT_GIVEN ,
620
+ scoring_contract : Optional [ScoringContractParam ] | NotGiven = NOT_GIVEN ,
620
621
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
621
622
# The extra values given here take precedence over values defined on the client or passed to this method.
622
623
extra_headers : Headers | None = None ,
@@ -627,23 +628,24 @@ async def update(
627
628
) -> ScenarioView :
628
629
"""
629
630
Update a Scenario, a repeatable AI coding evaluation test that defines the
630
- starting environment as well as evaluation success criteria.
631
+ starting environment as well as evaluation success criteria. Only provided
632
+ fields will be updated.
631
633
632
634
Args:
633
- input_context: The input context for the Scenario.
634
-
635
- name: Name of the scenario.
636
-
637
- scoring_contract: The scoring contract for the Scenario.
638
-
639
635
environment_parameters: The Environment in which the Scenario will run.
640
636
637
+ input_context: The input context for the Scenario.
638
+
641
639
metadata: User defined metadata to attach to the scenario for organization.
642
640
641
+ name: Name of the scenario.
642
+
643
643
reference_output: A string representation of the reference output to solve the scenario. Commonly
644
644
can be the result of a git diff or a sequence of command actions to apply to the
645
645
environment.
646
646
647
+ scoring_contract: The scoring contract for the Scenario.
648
+
647
649
extra_headers: Send extra headers
648
650
649
651
extra_query: Add additional query parameters to the request
@@ -660,12 +662,12 @@ async def update(
660
662
f"/v1/scenarios/{ id } " ,
661
663
body = await async_maybe_transform (
662
664
{
663
- "input_context" : input_context ,
664
- "name" : name ,
665
- "scoring_contract" : scoring_contract ,
666
665
"environment_parameters" : environment_parameters ,
666
+ "input_context" : input_context ,
667
667
"metadata" : metadata ,
668
+ "name" : name ,
668
669
"reference_output" : reference_output ,
670
+ "scoring_contract" : scoring_contract ,
669
671
},
670
672
scenario_update_params .ScenarioUpdateParams ,
671
673
),
0 commit comments