@@ -65,24 +65,30 @@ export interface EvaluationAssertion {
6565
6666 evaluationId : string ;
6767
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 ;
6973
70- target : string ;
71- }
74+ targetValue : string ;
7275
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' ;
8692}
8793
8894export type EvaluationAssertionListResponse = Array < EvaluationAssertion > ;
@@ -94,47 +100,59 @@ export interface EvaluationAssertionDeleteResponse {
94100export interface EvaluationAssertionCreateParams {
95101 evaluationId : string ;
96102
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 ;
98108
99- target : string ;
100- }
109+ targetValue : string ;
101110
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' ;
115127}
116128
117129export interface EvaluationAssertionUpdateParams {
118130 evaluationId : string ;
119131
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 ;
121137
122- target : string ;
123- }
138+ targetValue : string ;
124139
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' ;
138156}
139157
140158export interface EvaluationAssertionListParams {
0 commit comments