@roarkanalytics/sdk 3.11.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/client.d.mts +12 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -6
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-prompt.d.mts +129 -0
- package/resources/agent-prompt.d.mts.map +1 -0
- package/resources/agent-prompt.d.ts +129 -0
- package/resources/agent-prompt.d.ts.map +1 -0
- package/resources/agent-prompt.js +58 -0
- package/resources/agent-prompt.js.map +1 -0
- package/resources/agent-prompt.mjs +54 -0
- package/resources/agent-prompt.mjs.map +1 -0
- package/resources/benchmark.d.mts +547 -0
- package/resources/benchmark.d.mts.map +1 -0
- package/resources/benchmark.d.ts +547 -0
- package/resources/benchmark.d.ts.map +1 -0
- package/resources/benchmark.js +110 -0
- package/resources/benchmark.js.map +1 -0
- package/resources/benchmark.mjs +106 -0
- package/resources/benchmark.mjs.map +1 -0
- package/resources/call.d.mts +1 -1
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +1 -1
- package/resources/call.d.ts.map +1 -1
- package/resources/config.d.mts +169 -21
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +169 -21
- package/resources/config.d.ts.map +1 -1
- package/resources/customer-flow-edge-case.d.mts +99 -27
- package/resources/customer-flow-edge-case.d.mts.map +1 -1
- package/resources/customer-flow-edge-case.d.ts +99 -27
- package/resources/customer-flow-edge-case.d.ts.map +1 -1
- package/resources/customer-flow.d.mts +2110 -138
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +2110 -138
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/customer-flow.js +18 -0
- package/resources/customer-flow.js.map +1 -1
- package/resources/customer-flow.mjs +18 -0
- package/resources/customer-flow.mjs.map +1 -1
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/simulation-environment.d.mts +163 -1
- package/resources/simulation-environment.d.mts.map +1 -1
- package/resources/simulation-environment.d.ts +163 -1
- package/resources/simulation-environment.d.ts.map +1 -1
- package/resources/simulation-environment.js +51 -0
- package/resources/simulation-environment.js.map +1 -1
- package/resources/simulation-environment.mjs +51 -0
- package/resources/simulation-environment.mjs.map +1 -1
- package/resources/simulation-job.d.mts +68 -6
- package/resources/simulation-job.d.mts.map +1 -1
- package/resources/simulation-job.d.ts +68 -6
- package/resources/simulation-job.d.ts.map +1 -1
- package/resources/simulation-persona.d.mts +60 -18
- package/resources/simulation-persona.d.mts.map +1 -1
- package/resources/simulation-persona.d.ts +60 -18
- package/resources/simulation-persona.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.d.mts +172 -4
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +172 -4
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.js +16 -0
- package/resources/simulation-run-plan-job.js.map +1 -1
- package/resources/simulation-run-plan-job.mjs +16 -0
- package/resources/simulation-run-plan-job.mjs.map +1 -1
- package/resources/simulation-run-plan.d.mts +102 -0
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +102 -0
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/simulation-template.d.mts +10 -0
- package/resources/simulation-template.d.mts.map +1 -1
- package/resources/simulation-template.d.ts +10 -0
- package/resources/simulation-template.d.ts.map +1 -1
- package/resources/simulation.d.mts +26 -1
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +26 -1
- package/resources/simulation.d.ts.map +1 -1
- package/src/client.ts +66 -0
- package/src/resources/agent-prompt.ts +183 -0
- package/src/resources/benchmark.ts +740 -0
- package/src/resources/call.ts +1 -1
- package/src/resources/config.ts +313 -23
- package/src/resources/customer-flow-edge-case.ts +207 -27
- package/src/resources/customer-flow.ts +3198 -123
- package/src/resources/index.ts +30 -0
- package/src/resources/simulation-environment.ts +244 -0
- package/src/resources/simulation-job.ts +98 -6
- package/src/resources/simulation-persona.ts +126 -18
- package/src/resources/simulation-run-plan-job.ts +240 -3
- package/src/resources/simulation-run-plan.ts +118 -0
- package/src/resources/simulation-template.ts +11 -0
- package/src/resources/simulation.ts +28 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,740 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Benchmark extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns one ranked page of a suite version’s published targets, each with the
|
|
11
|
+
* metric cells it is judged on. Ranking happens in the database, so paging through
|
|
12
|
+
* the board is consistent. Every default the server applies (suite version,
|
|
13
|
+
* condition, sort metric, sort direction) is echoed on the response, so a page can
|
|
14
|
+
* be cited without guessing how it was ordered.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const response = await client.benchmark.getLeaderboard({
|
|
19
|
+
* suite: 'x',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
getLeaderboard(
|
|
24
|
+
query: BenchmarkGetLeaderboardParams,
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): APIPromise<BenchmarkGetLeaderboardResponse> {
|
|
27
|
+
return this._client.get('/v1/benchmark/leaderboard', { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns a target’s published sweep and every one of its aggregate cells: the
|
|
32
|
+
* overall rollup plus a set per condition. Defaults to the current sweep; pass
|
|
33
|
+
* `publicationId` from the history endpoint to read a superseded one, which is how
|
|
34
|
+
* a regression is compared generation to generation. Numbers only — no transcript
|
|
35
|
+
* and no audio.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const response = await client.benchmark.getTarget(
|
|
40
|
+
* 'targetKey',
|
|
41
|
+
* { suite: 'x' },
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
getTarget(
|
|
46
|
+
targetKey: string,
|
|
47
|
+
query: BenchmarkGetTargetParams,
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): APIPromise<BenchmarkGetTargetResponse> {
|
|
50
|
+
return this._client.get(path`/v1/benchmark/target/${targetKey}`, { query, ...options });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Returns the metrics a suite version published, each with the direction that
|
|
55
|
+
* counts as better. Use it to pick a valid `sortBy` for the leaderboard: a metric
|
|
56
|
+
* key outside this list is rejected rather than silently ranking every target
|
|
57
|
+
* null.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response = await client.benchmark.listMetrics({
|
|
62
|
+
* suite: 'x',
|
|
63
|
+
* });
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
listMetrics(
|
|
67
|
+
query: BenchmarkListMetricsParams,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): APIPromise<BenchmarkListMetricsResponse> {
|
|
70
|
+
return this._client.get('/v1/benchmark/metric', { query, ...options });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Returns every benchmark suite with published results, along with the suite
|
|
75
|
+
* version the other endpoints default to. Start here: the suite name is a required
|
|
76
|
+
* parameter everywhere else and there is no other way to discover it.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const response = await client.benchmark.listSuites();
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
listSuites(options?: RequestOptions): APIPromise<BenchmarkListSuitesResponse> {
|
|
84
|
+
return this._client.get('/v1/benchmark/suite', options);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Returns every sweep published for a target, newest first, including superseded
|
|
89
|
+
* ones. This is the trend read: it answers "did this model regress?" from Roark’s
|
|
90
|
+
* own published record. Metadata only — pass a row’s `publicationId` to GET
|
|
91
|
+
* /v1/benchmark/target/{targetKey} for that generation’s numbers.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response = await client.benchmark.listTargetHistory(
|
|
96
|
+
* 'targetKey',
|
|
97
|
+
* { suite: 'x' },
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
listTargetHistory(
|
|
102
|
+
targetKey: string,
|
|
103
|
+
query: BenchmarkListTargetHistoryParams,
|
|
104
|
+
options?: RequestOptions,
|
|
105
|
+
): APIPromise<BenchmarkListTargetHistoryResponse> {
|
|
106
|
+
return this._client.get(path`/v1/benchmark/target/${targetKey}/history`, { query, ...options });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns the individual scored calls behind a target’s aggregate cells, each with
|
|
111
|
+
* the scorer’s rationale — the "why is this number what it is" read. Filter to one
|
|
112
|
+
* cell with `conditionKey` and `metricKey`. Metrics computed without a rationale
|
|
113
|
+
* (latencies, counts) contribute no samples. Returns reasoning only: no transcript
|
|
114
|
+
* and no audio.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```ts
|
|
118
|
+
* const response =
|
|
119
|
+
* await client.benchmark.listTargetScoreSamples(
|
|
120
|
+
* 'targetKey',
|
|
121
|
+
* { suite: 'x' },
|
|
122
|
+
* );
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
listTargetScoreSamples(
|
|
126
|
+
targetKey: string,
|
|
127
|
+
query: BenchmarkListTargetScoreSamplesParams,
|
|
128
|
+
options?: RequestOptions,
|
|
129
|
+
): APIPromise<BenchmarkListTargetScoreSamplesResponse> {
|
|
130
|
+
return this._client.get(path`/v1/benchmark/target/${targetKey}/score-sample`, { query, ...options });
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface BenchmarkGetLeaderboardResponse {
|
|
135
|
+
conditionKey: string;
|
|
136
|
+
|
|
137
|
+
data: Array<BenchmarkGetLeaderboardResponse.Data>;
|
|
138
|
+
|
|
139
|
+
pagination: BenchmarkGetLeaderboardResponse.Pagination;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The ranking this page was produced under
|
|
143
|
+
*/
|
|
144
|
+
sortedBy: BenchmarkGetLeaderboardResponse.SortedBy;
|
|
145
|
+
|
|
146
|
+
suite: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The version actually read, after defaulting.
|
|
150
|
+
*/
|
|
151
|
+
suiteVersion: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export namespace BenchmarkGetLeaderboardResponse {
|
|
155
|
+
export interface Data {
|
|
156
|
+
/**
|
|
157
|
+
* The projected cells for this row, measured under the requested condition.
|
|
158
|
+
*/
|
|
159
|
+
metrics: Array<Data.Metric>;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* A model or stack with a published result on a benchmark suite
|
|
163
|
+
*/
|
|
164
|
+
target: Data.Target;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export namespace Data {
|
|
168
|
+
/**
|
|
169
|
+
* One aggregate cell: a metric measured for one target under one condition
|
|
170
|
+
*/
|
|
171
|
+
export interface Metric {
|
|
172
|
+
ciHigh: number | null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Low bound of the 95% CI of the mean (NUMERIC metrics).
|
|
176
|
+
*/
|
|
177
|
+
ciLow: number | null;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The flow variant these numbers were measured under. The empty string is the
|
|
181
|
+
* overall rollup across all conditions.
|
|
182
|
+
*/
|
|
183
|
+
conditionKey: string;
|
|
184
|
+
|
|
185
|
+
conditionLabel: string;
|
|
186
|
+
|
|
187
|
+
mean: number | null;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Stable metric id, e.g. `response_time`.
|
|
191
|
+
*/
|
|
192
|
+
metricKey: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Which statistics are populated on a result. NUMERIC fills p50/p95/mean/ci;
|
|
196
|
+
* BOOLEAN fills passRate and its interval.
|
|
197
|
+
*/
|
|
198
|
+
metricKind: 'NUMERIC' | 'BOOLEAN';
|
|
199
|
+
|
|
200
|
+
metricName: string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Scored samples behind this aggregate.
|
|
204
|
+
*/
|
|
205
|
+
n: number;
|
|
206
|
+
|
|
207
|
+
p50: number | null;
|
|
208
|
+
|
|
209
|
+
p95: number | null;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Fraction passed, 0..1 (BOOLEAN metrics).
|
|
213
|
+
*/
|
|
214
|
+
passRate: number | null;
|
|
215
|
+
|
|
216
|
+
passRateCiHigh: number | null;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Low bound of the 95% Wilson interval on the pass rate.
|
|
220
|
+
*/
|
|
221
|
+
passRateCiLow: number | null;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Display unit for numeric metrics, e.g. `ms`.
|
|
225
|
+
*/
|
|
226
|
+
unitSymbol: string | null;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* A model or stack with a published result on a benchmark suite
|
|
231
|
+
*/
|
|
232
|
+
export interface Target {
|
|
233
|
+
/**
|
|
234
|
+
* Whether these are the numbers Roark publishes for this target today.
|
|
235
|
+
*/
|
|
236
|
+
isCurrent: boolean;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Calls the sweep requested per condition.
|
|
240
|
+
*/
|
|
241
|
+
iterations: number;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Id of this one sweep. Changes every time the target is re-published, so it is a
|
|
245
|
+
* render key, not an identity.
|
|
246
|
+
*/
|
|
247
|
+
publicationId: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* When this sweep was published (ISO-8601), i.e. data freshness.
|
|
251
|
+
*/
|
|
252
|
+
publishedAt: string;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Executed calls that contributed at least one score to these numbers.
|
|
256
|
+
*/
|
|
257
|
+
sampleCallCount: number;
|
|
258
|
+
|
|
259
|
+
suite: string;
|
|
260
|
+
|
|
261
|
+
suiteVersion: string;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* When a later sweep replaced this one. Null means it is the current generation.
|
|
265
|
+
*/
|
|
266
|
+
supersededAt: string | null;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Stable identity of the model/stack across sweeps. Cite this, and pass it to the
|
|
270
|
+
* target endpoints.
|
|
271
|
+
*/
|
|
272
|
+
targetKey: string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Human-readable name of the model/stack.
|
|
276
|
+
*/
|
|
277
|
+
targetName: string;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface Pagination {
|
|
282
|
+
hasMore: boolean;
|
|
283
|
+
|
|
284
|
+
limit: number;
|
|
285
|
+
|
|
286
|
+
offset: number;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Total matching records, ignoring this page.
|
|
290
|
+
*/
|
|
291
|
+
total: number;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* The ranking this page was produced under
|
|
296
|
+
*/
|
|
297
|
+
export interface SortedBy {
|
|
298
|
+
metricKey: string;
|
|
299
|
+
|
|
300
|
+
order: 'asc' | 'desc';
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface BenchmarkGetTargetResponse {
|
|
305
|
+
data: BenchmarkGetTargetResponse.Data;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export namespace BenchmarkGetTargetResponse {
|
|
309
|
+
export interface Data {
|
|
310
|
+
/**
|
|
311
|
+
* Every cell of this sweep: the overall rollup plus one set per condition.
|
|
312
|
+
*/
|
|
313
|
+
results: Array<Data.Result>;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* A model or stack with a published result on a benchmark suite
|
|
317
|
+
*/
|
|
318
|
+
target: Data.Target;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export namespace Data {
|
|
322
|
+
/**
|
|
323
|
+
* One aggregate cell: a metric measured for one target under one condition
|
|
324
|
+
*/
|
|
325
|
+
export interface Result {
|
|
326
|
+
ciHigh: number | null;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Low bound of the 95% CI of the mean (NUMERIC metrics).
|
|
330
|
+
*/
|
|
331
|
+
ciLow: number | null;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* The flow variant these numbers were measured under. The empty string is the
|
|
335
|
+
* overall rollup across all conditions.
|
|
336
|
+
*/
|
|
337
|
+
conditionKey: string;
|
|
338
|
+
|
|
339
|
+
conditionLabel: string;
|
|
340
|
+
|
|
341
|
+
mean: number | null;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Stable metric id, e.g. `response_time`.
|
|
345
|
+
*/
|
|
346
|
+
metricKey: string;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Which statistics are populated on a result. NUMERIC fills p50/p95/mean/ci;
|
|
350
|
+
* BOOLEAN fills passRate and its interval.
|
|
351
|
+
*/
|
|
352
|
+
metricKind: 'NUMERIC' | 'BOOLEAN';
|
|
353
|
+
|
|
354
|
+
metricName: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Scored samples behind this aggregate.
|
|
358
|
+
*/
|
|
359
|
+
n: number;
|
|
360
|
+
|
|
361
|
+
p50: number | null;
|
|
362
|
+
|
|
363
|
+
p95: number | null;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Fraction passed, 0..1 (BOOLEAN metrics).
|
|
367
|
+
*/
|
|
368
|
+
passRate: number | null;
|
|
369
|
+
|
|
370
|
+
passRateCiHigh: number | null;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Low bound of the 95% Wilson interval on the pass rate.
|
|
374
|
+
*/
|
|
375
|
+
passRateCiLow: number | null;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Display unit for numeric metrics, e.g. `ms`.
|
|
379
|
+
*/
|
|
380
|
+
unitSymbol: string | null;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* A model or stack with a published result on a benchmark suite
|
|
385
|
+
*/
|
|
386
|
+
export interface Target {
|
|
387
|
+
/**
|
|
388
|
+
* Whether these are the numbers Roark publishes for this target today.
|
|
389
|
+
*/
|
|
390
|
+
isCurrent: boolean;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Calls the sweep requested per condition.
|
|
394
|
+
*/
|
|
395
|
+
iterations: number;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Id of this one sweep. Changes every time the target is re-published, so it is a
|
|
399
|
+
* render key, not an identity.
|
|
400
|
+
*/
|
|
401
|
+
publicationId: string;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* When this sweep was published (ISO-8601), i.e. data freshness.
|
|
405
|
+
*/
|
|
406
|
+
publishedAt: string;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Executed calls that contributed at least one score to these numbers.
|
|
410
|
+
*/
|
|
411
|
+
sampleCallCount: number;
|
|
412
|
+
|
|
413
|
+
suite: string;
|
|
414
|
+
|
|
415
|
+
suiteVersion: string;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* When a later sweep replaced this one. Null means it is the current generation.
|
|
419
|
+
*/
|
|
420
|
+
supersededAt: string | null;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Stable identity of the model/stack across sweeps. Cite this, and pass it to the
|
|
424
|
+
* target endpoints.
|
|
425
|
+
*/
|
|
426
|
+
targetKey: string;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Human-readable name of the model/stack.
|
|
430
|
+
*/
|
|
431
|
+
targetName: string;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export interface BenchmarkListMetricsResponse {
|
|
437
|
+
data: Array<BenchmarkListMetricsResponse.Data>;
|
|
438
|
+
|
|
439
|
+
suite: string;
|
|
440
|
+
|
|
441
|
+
suiteVersion: string;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export namespace BenchmarkListMetricsResponse {
|
|
445
|
+
/**
|
|
446
|
+
* A metric a suite version published, and the direction that counts as better
|
|
447
|
+
*/
|
|
448
|
+
export interface Data {
|
|
449
|
+
/**
|
|
450
|
+
* Which end of the scale is better. `higher` and `lower` can be ranked; `neutral`
|
|
451
|
+
* is an observational metric that describes a conversation rather than grading it,
|
|
452
|
+
* so sorting on it names no winner.
|
|
453
|
+
*/
|
|
454
|
+
goal: 'higher' | 'lower' | 'neutral';
|
|
455
|
+
|
|
456
|
+
metricKey: string;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Which statistics are populated on a result. NUMERIC fills p50/p95/mean/ci;
|
|
460
|
+
* BOOLEAN fills passRate and its interval.
|
|
461
|
+
*/
|
|
462
|
+
metricKind: 'NUMERIC' | 'BOOLEAN';
|
|
463
|
+
|
|
464
|
+
metricName: string;
|
|
465
|
+
|
|
466
|
+
unitSymbol: string | null;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export interface BenchmarkListSuitesResponse {
|
|
471
|
+
data: Array<BenchmarkListSuitesResponse.Data>;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export namespace BenchmarkListSuitesResponse {
|
|
475
|
+
/**
|
|
476
|
+
* A benchmark suite with published results
|
|
477
|
+
*/
|
|
478
|
+
export interface Data {
|
|
479
|
+
latestPublishedAt: string;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* The version every endpoint defaults to for this suite.
|
|
483
|
+
*/
|
|
484
|
+
latestSuiteVersion: string;
|
|
485
|
+
|
|
486
|
+
suite: string;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Targets currently published under the latest version.
|
|
490
|
+
*/
|
|
491
|
+
targetCount: number;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export interface BenchmarkListTargetHistoryResponse {
|
|
496
|
+
data: Array<BenchmarkListTargetHistoryResponse.Data>;
|
|
497
|
+
|
|
498
|
+
pagination: BenchmarkListTargetHistoryResponse.Pagination;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export namespace BenchmarkListTargetHistoryResponse {
|
|
502
|
+
/**
|
|
503
|
+
* One published sweep of a target, current or superseded — an entry in its history
|
|
504
|
+
*/
|
|
505
|
+
export interface Data {
|
|
506
|
+
/**
|
|
507
|
+
* Whether this is the generation the other endpoints return.
|
|
508
|
+
*/
|
|
509
|
+
isCurrent: boolean;
|
|
510
|
+
|
|
511
|
+
iterations: number;
|
|
512
|
+
|
|
513
|
+
publicationId: string;
|
|
514
|
+
|
|
515
|
+
publishedAt: string;
|
|
516
|
+
|
|
517
|
+
sampleCallCount: number;
|
|
518
|
+
|
|
519
|
+
suite: string;
|
|
520
|
+
|
|
521
|
+
suiteVersion: string;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* When a later sweep replaced this generation. Null means it is the current one.
|
|
525
|
+
*/
|
|
526
|
+
supersededAt: string | null;
|
|
527
|
+
|
|
528
|
+
targetKey: string;
|
|
529
|
+
|
|
530
|
+
targetName: string;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export interface Pagination {
|
|
534
|
+
hasMore: boolean;
|
|
535
|
+
|
|
536
|
+
limit: number;
|
|
537
|
+
|
|
538
|
+
offset: number;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Total matching records, ignoring this page.
|
|
542
|
+
*/
|
|
543
|
+
total: number;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export interface BenchmarkListTargetScoreSamplesResponse {
|
|
548
|
+
data: Array<BenchmarkListTargetScoreSamplesResponse.Data>;
|
|
549
|
+
|
|
550
|
+
pagination: BenchmarkListTargetScoreSamplesResponse.Pagination;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* A model or stack with a published result on a benchmark suite
|
|
554
|
+
*/
|
|
555
|
+
target: BenchmarkListTargetScoreSamplesResponse.Target;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export namespace BenchmarkListTargetScoreSamplesResponse {
|
|
559
|
+
/**
|
|
560
|
+
* One un-aggregated score behind a result cell, with the reasoning that produced
|
|
561
|
+
* it
|
|
562
|
+
*/
|
|
563
|
+
export interface Data {
|
|
564
|
+
booleanValue: boolean | null;
|
|
565
|
+
|
|
566
|
+
conditionKey: string;
|
|
567
|
+
|
|
568
|
+
metricKey: string;
|
|
569
|
+
|
|
570
|
+
numericValue: number | null;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* The scorer's rationale for this individual score.
|
|
574
|
+
*/
|
|
575
|
+
reasoning: string;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Opaque id of the call this single score came from. Groups samples that share a
|
|
579
|
+
* call; it is not resolvable through this API.
|
|
580
|
+
*/
|
|
581
|
+
sourceCallId: string;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export interface Pagination {
|
|
585
|
+
hasMore: boolean;
|
|
586
|
+
|
|
587
|
+
limit: number;
|
|
588
|
+
|
|
589
|
+
offset: number;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Total matching records, ignoring this page.
|
|
593
|
+
*/
|
|
594
|
+
total: number;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* A model or stack with a published result on a benchmark suite
|
|
599
|
+
*/
|
|
600
|
+
export interface Target {
|
|
601
|
+
/**
|
|
602
|
+
* Whether these are the numbers Roark publishes for this target today.
|
|
603
|
+
*/
|
|
604
|
+
isCurrent: boolean;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Calls the sweep requested per condition.
|
|
608
|
+
*/
|
|
609
|
+
iterations: number;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Id of this one sweep. Changes every time the target is re-published, so it is a
|
|
613
|
+
* render key, not an identity.
|
|
614
|
+
*/
|
|
615
|
+
publicationId: string;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* When this sweep was published (ISO-8601), i.e. data freshness.
|
|
619
|
+
*/
|
|
620
|
+
publishedAt: string;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Executed calls that contributed at least one score to these numbers.
|
|
624
|
+
*/
|
|
625
|
+
sampleCallCount: number;
|
|
626
|
+
|
|
627
|
+
suite: string;
|
|
628
|
+
|
|
629
|
+
suiteVersion: string;
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* When a later sweep replaced this one. Null means it is the current generation.
|
|
633
|
+
*/
|
|
634
|
+
supersededAt: string | null;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Stable identity of the model/stack across sweeps. Cite this, and pass it to the
|
|
638
|
+
* target endpoints.
|
|
639
|
+
*/
|
|
640
|
+
targetKey: string;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Human-readable name of the model/stack.
|
|
644
|
+
*/
|
|
645
|
+
targetName: string;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export interface BenchmarkGetLeaderboardParams {
|
|
650
|
+
suite: string;
|
|
651
|
+
|
|
652
|
+
conditionKey?: string;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Maximum number of records to return (default: 20, max: 100)
|
|
656
|
+
*/
|
|
657
|
+
limit?: number;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Comma-separated metric keys to project per row. Defaults to the headline set.
|
|
661
|
+
*/
|
|
662
|
+
metrics?: string;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Pagination offset
|
|
666
|
+
*/
|
|
667
|
+
offset?: number;
|
|
668
|
+
|
|
669
|
+
order?: 'asc' | 'desc';
|
|
670
|
+
|
|
671
|
+
sortBy?: string;
|
|
672
|
+
|
|
673
|
+
suiteVersion?: string;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export interface BenchmarkGetTargetParams {
|
|
677
|
+
suite: string;
|
|
678
|
+
|
|
679
|
+
publicationId?: string;
|
|
680
|
+
|
|
681
|
+
suiteVersion?: string;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
export interface BenchmarkListMetricsParams {
|
|
685
|
+
suite: string;
|
|
686
|
+
|
|
687
|
+
suiteVersion?: string;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export interface BenchmarkListTargetHistoryParams {
|
|
691
|
+
suite: string;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Maximum number of records to return (default: 20, max: 100)
|
|
695
|
+
*/
|
|
696
|
+
limit?: number;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Pagination offset
|
|
700
|
+
*/
|
|
701
|
+
offset?: number;
|
|
702
|
+
|
|
703
|
+
suiteVersion?: string;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export interface BenchmarkListTargetScoreSamplesParams {
|
|
707
|
+
suite: string;
|
|
708
|
+
|
|
709
|
+
conditionKey?: string;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Maximum number of records to return (default: 20, max: 100)
|
|
713
|
+
*/
|
|
714
|
+
limit?: number;
|
|
715
|
+
|
|
716
|
+
metricKey?: string;
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Pagination offset
|
|
720
|
+
*/
|
|
721
|
+
offset?: number;
|
|
722
|
+
|
|
723
|
+
suiteVersion?: string;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export declare namespace Benchmark {
|
|
727
|
+
export {
|
|
728
|
+
type BenchmarkGetLeaderboardResponse as BenchmarkGetLeaderboardResponse,
|
|
729
|
+
type BenchmarkGetTargetResponse as BenchmarkGetTargetResponse,
|
|
730
|
+
type BenchmarkListMetricsResponse as BenchmarkListMetricsResponse,
|
|
731
|
+
type BenchmarkListSuitesResponse as BenchmarkListSuitesResponse,
|
|
732
|
+
type BenchmarkListTargetHistoryResponse as BenchmarkListTargetHistoryResponse,
|
|
733
|
+
type BenchmarkListTargetScoreSamplesResponse as BenchmarkListTargetScoreSamplesResponse,
|
|
734
|
+
type BenchmarkGetLeaderboardParams as BenchmarkGetLeaderboardParams,
|
|
735
|
+
type BenchmarkGetTargetParams as BenchmarkGetTargetParams,
|
|
736
|
+
type BenchmarkListMetricsParams as BenchmarkListMetricsParams,
|
|
737
|
+
type BenchmarkListTargetHistoryParams as BenchmarkListTargetHistoryParams,
|
|
738
|
+
type BenchmarkListTargetScoreSamplesParams as BenchmarkListTargetScoreSamplesParams,
|
|
739
|
+
};
|
|
740
|
+
}
|