2
2
3
3
from __future__ import annotations
4
4
5
- from typing import List , Optional
5
+ from typing import Optional
6
6
from typing_extensions import Literal
7
7
8
8
import httpx
@@ -47,21 +47,11 @@ def create(
47
47
* ,
48
48
evaluation_id : str ,
49
49
json_path : Optional [str ],
50
- target_threshold : Optional [float ],
51
- target_values : Optional [List [str ]],
50
+ target_value : Optional [str ],
52
51
tool_name : Optional [str ],
53
52
type : Literal [
54
- "CONTAINS_ALL" ,
55
- "CONTAINS_ANY" ,
56
- "COST" ,
57
- "EXACT_MATCH" ,
58
- "LATENCY" ,
59
- "STARTS_WITH" ,
60
- "TOOL_CALLED" ,
61
- "TOOL_CALLED_WITH" ,
53
+ "CONTAINS" , "EXACT_MATCH" , "JSON_CONTAINS" , "JSON_EXACT_MATCH" , "TOOL_CALLED" , "TOOL_CALLED_WITH"
62
54
],
63
- ignore_case : bool | NotGiven = NOT_GIVEN ,
64
- negate : bool | NotGiven = NOT_GIVEN ,
65
55
weight : float | NotGiven = NOT_GIVEN ,
66
56
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
67
57
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -98,12 +88,9 @@ def create(
98
88
{
99
89
"evaluation_id" : evaluation_id ,
100
90
"json_path" : json_path ,
101
- "target_threshold" : target_threshold ,
102
- "target_values" : target_values ,
91
+ "target_value" : target_value ,
103
92
"tool_name" : tool_name ,
104
93
"type" : type ,
105
- "ignore_case" : ignore_case ,
106
- "negate" : negate ,
107
94
"weight" : weight ,
108
95
},
109
96
evaluation_assertion_create_params .EvaluationAssertionCreateParams ,
@@ -120,21 +107,11 @@ def update(
120
107
* ,
121
108
evaluation_id : str ,
122
109
json_path : Optional [str ],
123
- target_threshold : Optional [float ],
124
- target_values : Optional [List [str ]],
110
+ target_value : Optional [str ],
125
111
tool_name : Optional [str ],
126
112
type : Literal [
127
- "CONTAINS_ALL" ,
128
- "CONTAINS_ANY" ,
129
- "COST" ,
130
- "EXACT_MATCH" ,
131
- "LATENCY" ,
132
- "STARTS_WITH" ,
133
- "TOOL_CALLED" ,
134
- "TOOL_CALLED_WITH" ,
113
+ "CONTAINS" , "EXACT_MATCH" , "JSON_CONTAINS" , "JSON_EXACT_MATCH" , "TOOL_CALLED" , "TOOL_CALLED_WITH"
135
114
],
136
- ignore_case : bool | NotGiven = NOT_GIVEN ,
137
- negate : bool | NotGiven = NOT_GIVEN ,
138
115
weight : float | NotGiven = NOT_GIVEN ,
139
116
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
140
117
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -173,12 +150,9 @@ def update(
173
150
{
174
151
"evaluation_id" : evaluation_id ,
175
152
"json_path" : json_path ,
176
- "target_threshold" : target_threshold ,
177
- "target_values" : target_values ,
153
+ "target_value" : target_value ,
178
154
"tool_name" : tool_name ,
179
155
"type" : type ,
180
- "ignore_case" : ignore_case ,
181
- "negate" : negate ,
182
156
"weight" : weight ,
183
157
},
184
158
evaluation_assertion_update_params .EvaluationAssertionUpdateParams ,
@@ -309,21 +283,11 @@ async def create(
309
283
* ,
310
284
evaluation_id : str ,
311
285
json_path : Optional [str ],
312
- target_threshold : Optional [float ],
313
- target_values : Optional [List [str ]],
286
+ target_value : Optional [str ],
314
287
tool_name : Optional [str ],
315
288
type : Literal [
316
- "CONTAINS_ALL" ,
317
- "CONTAINS_ANY" ,
318
- "COST" ,
319
- "EXACT_MATCH" ,
320
- "LATENCY" ,
321
- "STARTS_WITH" ,
322
- "TOOL_CALLED" ,
323
- "TOOL_CALLED_WITH" ,
289
+ "CONTAINS" , "EXACT_MATCH" , "JSON_CONTAINS" , "JSON_EXACT_MATCH" , "TOOL_CALLED" , "TOOL_CALLED_WITH"
324
290
],
325
- ignore_case : bool | NotGiven = NOT_GIVEN ,
326
- negate : bool | NotGiven = NOT_GIVEN ,
327
291
weight : float | NotGiven = NOT_GIVEN ,
328
292
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
329
293
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -360,12 +324,9 @@ async def create(
360
324
{
361
325
"evaluation_id" : evaluation_id ,
362
326
"json_path" : json_path ,
363
- "target_threshold" : target_threshold ,
364
- "target_values" : target_values ,
327
+ "target_value" : target_value ,
365
328
"tool_name" : tool_name ,
366
329
"type" : type ,
367
- "ignore_case" : ignore_case ,
368
- "negate" : negate ,
369
330
"weight" : weight ,
370
331
},
371
332
evaluation_assertion_create_params .EvaluationAssertionCreateParams ,
@@ -382,21 +343,11 @@ async def update(
382
343
* ,
383
344
evaluation_id : str ,
384
345
json_path : Optional [str ],
385
- target_threshold : Optional [float ],
386
- target_values : Optional [List [str ]],
346
+ target_value : Optional [str ],
387
347
tool_name : Optional [str ],
388
348
type : Literal [
389
- "CONTAINS_ALL" ,
390
- "CONTAINS_ANY" ,
391
- "COST" ,
392
- "EXACT_MATCH" ,
393
- "LATENCY" ,
394
- "STARTS_WITH" ,
395
- "TOOL_CALLED" ,
396
- "TOOL_CALLED_WITH" ,
349
+ "CONTAINS" , "EXACT_MATCH" , "JSON_CONTAINS" , "JSON_EXACT_MATCH" , "TOOL_CALLED" , "TOOL_CALLED_WITH"
397
350
],
398
- ignore_case : bool | NotGiven = NOT_GIVEN ,
399
- negate : bool | NotGiven = NOT_GIVEN ,
400
351
weight : float | NotGiven = NOT_GIVEN ,
401
352
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
402
353
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -435,12 +386,9 @@ async def update(
435
386
{
436
387
"evaluation_id" : evaluation_id ,
437
388
"json_path" : json_path ,
438
- "target_threshold" : target_threshold ,
439
- "target_values" : target_values ,
389
+ "target_value" : target_value ,
440
390
"tool_name" : tool_name ,
441
391
"type" : type ,
442
- "ignore_case" : ignore_case ,
443
- "negate" : negate ,
444
392
"weight" : weight ,
445
393
},
446
394
evaluation_assertion_update_params .EvaluationAssertionUpdateParams ,
0 commit comments