@@ -65,24 +65,30 @@ export interface EvaluationAssertion {
65
65
66
66
evaluationId : string ;
67
67
68
- matcher : EvaluationAssertion . Matcher ;
68
+ /**
69
+ * A JSON path to use when matching the response. Only required when type is
70
+ * `JSON_EXACT_MATCH` or `JSON_CONTAINS`.
71
+ */
72
+ jsonPath : string | null ;
69
73
70
- target : string ;
71
- }
74
+ targetValue : string ;
72
75
73
- export namespace EvaluationAssertion {
74
- export interface Matcher {
75
- /**
76
- * A JSON path to use when matching the response. Only required when type is
77
- * `jsonPath`.
78
- */
79
- jsonPath : string | null ;
80
-
81
- /**
82
- * The type of evaluation matcher to use.
83
- */
84
- type : 'CONTAINS' | 'EQUALS' | 'JSON' ;
85
- }
76
+ /**
77
+ * The name of the tool to match. Only required when type is `TOOL_CALLED` or
78
+ * `TOOL_CALLED_WITH`.
79
+ */
80
+ toolName : string | null ;
81
+
82
+ /**
83
+ * The type of evaluation matcher to use.
84
+ */
85
+ type :
86
+ | 'EXACT_MATCH'
87
+ | 'CONTAINS'
88
+ | 'JSON_EXACT_MATCH'
89
+ | 'JSON_CONTAINS'
90
+ | 'TOOL_CALLED'
91
+ | 'TOOL_CALLED_WITH' ;
86
92
}
87
93
88
94
export type EvaluationAssertionListResponse = Array < EvaluationAssertion > ;
@@ -94,47 +100,59 @@ export interface EvaluationAssertionDeleteResponse {
94
100
export interface EvaluationAssertionCreateParams {
95
101
evaluationId : string ;
96
102
97
- matcher : EvaluationAssertionCreateParams . Matcher ;
103
+ /**
104
+ * A JSON path to use when matching the response. Only required when type is
105
+ * `JSON_EXACT_MATCH` or `JSON_CONTAINS`.
106
+ */
107
+ jsonPath : string | null ;
98
108
99
- target : string ;
100
- }
109
+ targetValue : string ;
101
110
102
- export namespace EvaluationAssertionCreateParams {
103
- export interface Matcher {
104
- /**
105
- * A JSON path to use when matching the response. Only required when type is
106
- * `jsonPath`.
107
- */
108
- jsonPath : string | null ;
109
-
110
- /**
111
- * The type of evaluation matcher to use.
112
- */
113
- type : 'CONTAINS' | 'EQUALS' | 'JSON' ;
114
- }
111
+ /**
112
+ * The name of the tool to match. Only required when type is `TOOL_CALLED` or
113
+ * `TOOL_CALLED_WITH`.
114
+ */
115
+ toolName : string | null ;
116
+
117
+ /**
118
+ * The type of evaluation matcher to use.
119
+ */
120
+ type :
121
+ | 'EXACT_MATCH'
122
+ | 'CONTAINS'
123
+ | 'JSON_EXACT_MATCH'
124
+ | 'JSON_CONTAINS'
125
+ | 'TOOL_CALLED'
126
+ | 'TOOL_CALLED_WITH' ;
115
127
}
116
128
117
129
export interface EvaluationAssertionUpdateParams {
118
130
evaluationId : string ;
119
131
120
- matcher : EvaluationAssertionUpdateParams . Matcher ;
132
+ /**
133
+ * A JSON path to use when matching the response. Only required when type is
134
+ * `JSON_EXACT_MATCH` or `JSON_CONTAINS`.
135
+ */
136
+ jsonPath : string | null ;
121
137
122
- target : string ;
123
- }
138
+ targetValue : string ;
124
139
125
- export namespace EvaluationAssertionUpdateParams {
126
- export interface Matcher {
127
- /**
128
- * A JSON path to use when matching the response. Only required when type is
129
- * `jsonPath`.
130
- */
131
- jsonPath : string | null ;
132
-
133
- /**
134
- * The type of evaluation matcher to use.
135
- */
136
- type : 'CONTAINS' | 'EQUALS' | 'JSON' ;
137
- }
140
+ /**
141
+ * The name of the tool to match. Only required when type is `TOOL_CALLED` or
142
+ * `TOOL_CALLED_WITH`.
143
+ */
144
+ toolName : string | null ;
145
+
146
+ /**
147
+ * The type of evaluation matcher to use.
148
+ */
149
+ type :
150
+ | 'EXACT_MATCH'
151
+ | 'CONTAINS'
152
+ | 'JSON_EXACT_MATCH'
153
+ | 'JSON_CONTAINS'
154
+ | 'TOOL_CALLED'
155
+ | 'TOOL_CALLED_WITH' ;
138
156
}
139
157
140
158
export interface EvaluationAssertionListParams {
0 commit comments