@alicloud/agentloop20260520 2.3.1 → 2.3.3
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/dist/client.d.ts +18 -18
- package/dist/client.js +25 -22
- package/dist/client.js.map +1 -1
- package/dist/models/CreateAgentSpaceRequest.d.ts +2 -1
- package/dist/models/CreateAgentSpaceRequest.js +2 -0
- package/dist/models/CreateAgentSpaceRequest.js.map +1 -1
- package/dist/models/CreateEvaluationTaskRequest.d.ts +11 -11
- package/dist/models/CreateExperimentPlanRequest.d.ts +10 -6
- package/dist/models/CreateExperimentPlanRequest.js.map +1 -1
- package/dist/models/CreateExperimentPlanResponseBody.d.ts +2 -2
- package/dist/models/CreatePipelineRequest.d.ts +251 -9
- package/dist/models/CreatePipelineRequest.js +203 -1
- package/dist/models/CreatePipelineRequest.js.map +1 -1
- package/dist/models/Evaluator.d.ts +11 -3
- package/dist/models/Evaluator.js +6 -0
- package/dist/models/Evaluator.js.map +1 -1
- package/dist/models/EvaluatorVariableExtractorMappingValue.d.ts +37 -0
- package/dist/models/EvaluatorVariableExtractorMappingValue.js +62 -0
- package/dist/models/EvaluatorVariableExtractorMappingValue.js.map +1 -0
- package/dist/models/GetAgentSpaceResponseBody.d.ts +4 -3
- package/dist/models/GetAgentSpaceResponseBody.js +2 -0
- package/dist/models/GetAgentSpaceResponseBody.js.map +1 -1
- package/dist/models/GetEvaluationTaskResponseBody.d.ts +3 -3
- package/dist/models/GetExperimentPlanResponseBody.d.ts +8 -4
- package/dist/models/GetExperimentPlanResponseBody.js.map +1 -1
- package/dist/models/GetPipelineResponseBody.d.ts +172 -3
- package/dist/models/GetPipelineResponseBody.js +203 -1
- package/dist/models/GetPipelineResponseBody.js.map +1 -1
- package/dist/models/ListAgentSpacesResponseBody.d.ts +1 -0
- package/dist/models/ListAgentSpacesResponseBody.js +2 -0
- package/dist/models/ListAgentSpacesResponseBody.js.map +1 -1
- package/dist/models/ListExperimentRunsRequest.d.ts +1 -1
- package/dist/models/PreviewPipelineRequest.d.ts +68 -2
- package/dist/models/PreviewPipelineRequest.js +53 -1
- package/dist/models/PreviewPipelineRequest.js.map +1 -1
- package/dist/models/PreviewPipelineResponseBody.d.ts +6 -6
- package/dist/models/RunPipelineRequest.d.ts +16 -0
- package/dist/models/RunPipelineRequest.js.map +1 -1
- package/dist/models/RunPipelineResponseBody.d.ts +15 -0
- package/dist/models/RunPipelineResponseBody.js.map +1 -1
- package/dist/models/RunStrategies.d.ts +14 -0
- package/dist/models/RunStrategies.js.map +1 -1
- package/dist/models/UpdateEvaluationTaskRequest.d.ts +5 -5
- package/dist/models/UpdateExperimentPlanRequest.d.ts +10 -6
- package/dist/models/UpdateExperimentPlanRequest.js.map +1 -1
- package/dist/models/UpdateExperimentPlanResponseBody.d.ts +3 -3
- package/dist/models/UpdatePipelineRequest.d.ts +267 -13
- package/dist/models/UpdatePipelineRequest.js +205 -1
- package/dist/models/UpdatePipelineRequest.js.map +1 -1
- package/dist/models/model.d.ts +27 -0
- package/dist/models/model.js +83 -28
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +26 -22
- package/src/models/CreateAgentSpaceRequest.ts +4 -1
- package/src/models/CreateEvaluationTaskRequest.ts +11 -11
- package/src/models/CreateExperimentPlanRequest.ts +10 -6
- package/src/models/CreateExperimentPlanResponseBody.ts +2 -2
- package/src/models/CreatePipelineRequest.ts +381 -9
- package/src/models/Evaluator.ts +14 -3
- package/src/models/EvaluatorVariableExtractorMappingValue.ts +54 -0
- package/src/models/GetAgentSpaceResponseBody.ts +6 -3
- package/src/models/GetEvaluationTaskResponseBody.ts +3 -3
- package/src/models/GetExperimentPlanResponseBody.ts +8 -4
- package/src/models/GetPipelineResponseBody.ts +302 -3
- package/src/models/ListAgentSpacesResponseBody.ts +3 -0
- package/src/models/ListExperimentRunsRequest.ts +1 -1
- package/src/models/PreviewPipelineRequest.ts +102 -2
- package/src/models/PreviewPipelineResponseBody.ts +6 -6
- package/src/models/RunPipelineRequest.ts +16 -0
- package/src/models/RunPipelineResponseBody.ts +15 -0
- package/src/models/RunStrategies.ts +14 -0
- package/src/models/UpdateEvaluationTaskRequest.ts +5 -5
- package/src/models/UpdateExperimentPlanRequest.ts +10 -6
- package/src/models/UpdateExperimentPlanResponseBody.ts +3 -3
- package/src/models/UpdatePipelineRequest.ts +399 -13
- package/src/models/model.ts +27 -0
|
@@ -18,12 +18,12 @@ export class CreateExperimentPlanRequest extends $dara.Model {
|
|
|
18
18
|
* The description of the experiment plan.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
|
-
* rca_benchmark_eval_experiment offline experiment
|
|
21
|
+
* rca_benchmark_eval_experiment offline experiment
|
|
22
22
|
*/
|
|
23
23
|
description?: string;
|
|
24
24
|
/**
|
|
25
25
|
* @remarks
|
|
26
|
-
* The list of evaluators.
|
|
26
|
+
* The list of evaluators. When configured, evaluation can be automatically triggered upon experiment completion.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* [{"evaluatorRef": "Builtin.agent_correctness", "name": "Builtin.agent_correctness", "type": "AGENT", "resultName": "Builtin.agent_correctness", "resultType": "score", "variableMapping": {"input": "experiment_input", "output": "experiment_output", "expected_output": "dataset.ground_truth_json"}, "filters": {"query": "", "sample": "100"}, "config": {"variables": [], "prompt": ""}}, {"evaluatorRef": "rca-toxicity-safety-accuracy", "name": "rca-toxicity-safety-accuracy", "type": "AGENT", "resultName": "rca-toxicity-safety-accuracy", "resultType": "score", "variableMapping": {"input": "experiment_input", "output": "experiment_output", "question": "dataset.question", "expected_output": "dataset.ground_truth_json", "payload_json": "dataset.payload_json"}, "filters": {"query": "", "sample": "100"}, "config": {"variables": [], "prompt": ""}}]
|
|
@@ -41,7 +41,7 @@ export class CreateExperimentPlanRequest extends $dara.Model {
|
|
|
41
41
|
experimentType?: string;
|
|
42
42
|
/**
|
|
43
43
|
* @remarks
|
|
44
|
-
* The list of experiment configurations. A maximum of
|
|
44
|
+
* The list of experiment configurations. A maximum of five configurations are supported. For offline experiments, this parameter can be omitted or set to an empty array. For online experiments, at least one configuration is required.
|
|
45
45
|
*
|
|
46
46
|
* This parameter is required.
|
|
47
47
|
*
|
|
@@ -54,13 +54,17 @@ export class CreateExperimentPlanRequest extends $dara.Model {
|
|
|
54
54
|
* Optional.
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
|
-
* {"question": "How do I
|
|
57
|
+
* {"question": "How do I request a refund?"}
|
|
58
58
|
*/
|
|
59
59
|
input?: { [key: string]: any };
|
|
60
|
+
/**
|
|
61
|
+
* @remarks
|
|
62
|
+
* The name of the associated data processing pipeline (optional). After association, when the experiment execution under this plan writes results to the experiment result Logstore, the system filters by the traceId of the experiment trace, calls PreviewPipeline, and writes the pipeline-processed results together.
|
|
63
|
+
*/
|
|
60
64
|
pipelineName?: string;
|
|
61
65
|
/**
|
|
62
66
|
* @remarks
|
|
63
|
-
* The experiment plan name. The name must be unique within the same AgentSpace
|
|
67
|
+
* The experiment plan name. The name must be unique within the same AgentSpace under the same account.
|
|
64
68
|
*
|
|
65
69
|
* This parameter is required.
|
|
66
70
|
*
|
|
@@ -78,7 +82,7 @@ export class CreateExperimentPlanRequest extends $dara.Model {
|
|
|
78
82
|
querySql?: string;
|
|
79
83
|
/**
|
|
80
84
|
* @remarks
|
|
81
|
-
* The list of selected data item IDs in partial dataset mode.
|
|
85
|
+
* The list of selected data item IDs in partial dataset mode. Use this parameter together with `datasetId`.
|
|
82
86
|
*
|
|
83
87
|
* @example
|
|
84
88
|
* ["019ef4d5-a0f0-7114-832d-5542d771cd8c", "019f1729-be9b-7769-a006-8e98023ad7ad"]
|
|
@@ -8,7 +8,7 @@ export class CreateExperimentPlanResponseBody extends $dara.Model {
|
|
|
8
8
|
* The message.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
|
-
* Experiment plan created successfully
|
|
11
|
+
* Experiment plan created successfully
|
|
12
12
|
*/
|
|
13
13
|
message?: string;
|
|
14
14
|
/**
|
|
@@ -29,7 +29,7 @@ export class CreateExperimentPlanResponseBody extends $dara.Model {
|
|
|
29
29
|
requestId?: string;
|
|
30
30
|
/**
|
|
31
31
|
* @remarks
|
|
32
|
-
* The creation result.
|
|
32
|
+
* The creation result. A value of `created` indicates success.
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* created
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class CreatePipelineRequestExecutePolicyRunOnce extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The start time of the data processing window, in
|
|
8
|
+
* The start time of the data processing window, in UNIX seconds. The value must be less than toTime.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* 1735660800
|
|
@@ -13,7 +13,7 @@ export class CreatePipelineRequestExecutePolicyRunOnce extends $dara.Model {
|
|
|
13
13
|
fromTime?: number;
|
|
14
14
|
/**
|
|
15
15
|
* @remarks
|
|
16
|
-
* The end time of the data processing window, in
|
|
16
|
+
* The end time of the data processing window, in UNIX seconds. The value must be greater than fromTime.
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* 1735747200
|
|
@@ -45,7 +45,7 @@ export class CreatePipelineRequestExecutePolicyRunOnce extends $dara.Model {
|
|
|
45
45
|
export class CreatePipelineRequestExecutePolicyScheduled extends $dara.Model {
|
|
46
46
|
/**
|
|
47
47
|
* @remarks
|
|
48
|
-
* The scheduling start time, in
|
|
48
|
+
* The scheduling start time, in UNIX milliseconds.
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
51
|
* 1735660800000
|
|
@@ -85,7 +85,9 @@ export class CreatePipelineRequestExecutePolicyScheduled extends $dara.Model {
|
|
|
85
85
|
export class CreatePipelineRequestExecutePolicy extends $dara.Model {
|
|
86
86
|
/**
|
|
87
87
|
* @remarks
|
|
88
|
-
* The scheduling mode. Valid values:
|
|
88
|
+
* The scheduling mode. Valid values:
|
|
89
|
+
* - RunOnce: one-time execution.
|
|
90
|
+
* - Scheduled: periodic scheduling.
|
|
89
91
|
*
|
|
90
92
|
* @example
|
|
91
93
|
* RunOnce
|
|
@@ -143,7 +145,7 @@ export class CreatePipelineRequestPipelineNodes extends $dara.Model {
|
|
|
143
145
|
id?: string;
|
|
144
146
|
/**
|
|
145
147
|
* @remarks
|
|
146
|
-
* The node parameters in key-value format. The parameters vary
|
|
148
|
+
* The node parameters in key-value format. The parameters vary based on the node type.
|
|
147
149
|
*/
|
|
148
150
|
parameters?: { [key: string]: any };
|
|
149
151
|
/**
|
|
@@ -212,6 +214,266 @@ export class CreatePipelineRequestPipeline extends $dara.Model {
|
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
216
|
|
|
217
|
+
export class CreatePipelineRequestSinkConditionDefaultSinkDataset extends $dara.Model {
|
|
218
|
+
/**
|
|
219
|
+
* @remarks
|
|
220
|
+
* The name of the AgentSpace to which the default destination dataset belongs.
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* my-agent-space
|
|
224
|
+
*/
|
|
225
|
+
agentSpace?: string;
|
|
226
|
+
/**
|
|
227
|
+
* @remarks
|
|
228
|
+
* The name of the default destination dataset.
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* other-result
|
|
232
|
+
*/
|
|
233
|
+
dataset?: string;
|
|
234
|
+
static names(): { [key: string]: string } {
|
|
235
|
+
return {
|
|
236
|
+
agentSpace: 'agentSpace',
|
|
237
|
+
dataset: 'dataset',
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
static types(): { [key: string]: any } {
|
|
242
|
+
return {
|
|
243
|
+
agentSpace: 'string',
|
|
244
|
+
dataset: 'string',
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
validate() {
|
|
249
|
+
super.validate();
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
constructor(map?: { [key: string]: any }) {
|
|
253
|
+
super(map);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export class CreatePipelineRequestSinkConditionDefaultSink extends $dara.Model {
|
|
258
|
+
/**
|
|
259
|
+
* @remarks
|
|
260
|
+
* The default destination dataset.
|
|
261
|
+
*/
|
|
262
|
+
dataset?: CreatePipelineRequestSinkConditionDefaultSinkDataset;
|
|
263
|
+
/**
|
|
264
|
+
* @remarks
|
|
265
|
+
* The default destination type. Currently, only dataset is supported.
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* dataset
|
|
269
|
+
*/
|
|
270
|
+
type?: string;
|
|
271
|
+
static names(): { [key: string]: string } {
|
|
272
|
+
return {
|
|
273
|
+
dataset: 'dataset',
|
|
274
|
+
type: 'type',
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
static types(): { [key: string]: any } {
|
|
279
|
+
return {
|
|
280
|
+
dataset: CreatePipelineRequestSinkConditionDefaultSinkDataset,
|
|
281
|
+
type: 'string',
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
validate() {
|
|
286
|
+
if(this.dataset && typeof (this.dataset as any).validate === 'function') {
|
|
287
|
+
(this.dataset as any).validate();
|
|
288
|
+
}
|
|
289
|
+
super.validate();
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
constructor(map?: { [key: string]: any }) {
|
|
293
|
+
super(map);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export class CreatePipelineRequestSinkConditionRoutesSinkDataset extends $dara.Model {
|
|
298
|
+
/**
|
|
299
|
+
* @remarks
|
|
300
|
+
* The name of the AgentSpace to which the destination dataset belongs.
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* my-agent-space
|
|
304
|
+
*/
|
|
305
|
+
agentSpace?: string;
|
|
306
|
+
/**
|
|
307
|
+
* @remarks
|
|
308
|
+
* The name of the destination dataset.
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* refund-result
|
|
312
|
+
*/
|
|
313
|
+
dataset?: string;
|
|
314
|
+
static names(): { [key: string]: string } {
|
|
315
|
+
return {
|
|
316
|
+
agentSpace: 'agentSpace',
|
|
317
|
+
dataset: 'dataset',
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
static types(): { [key: string]: any } {
|
|
322
|
+
return {
|
|
323
|
+
agentSpace: 'string',
|
|
324
|
+
dataset: 'string',
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
validate() {
|
|
329
|
+
super.validate();
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
constructor(map?: { [key: string]: any }) {
|
|
333
|
+
super(map);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export class CreatePipelineRequestSinkConditionRoutesSink extends $dara.Model {
|
|
338
|
+
/**
|
|
339
|
+
* @remarks
|
|
340
|
+
* The route destination dataset.
|
|
341
|
+
*/
|
|
342
|
+
dataset?: CreatePipelineRequestSinkConditionRoutesSinkDataset;
|
|
343
|
+
/**
|
|
344
|
+
* @remarks
|
|
345
|
+
* The route destination type. Currently, only dataset is supported.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* dataset
|
|
349
|
+
*/
|
|
350
|
+
type?: string;
|
|
351
|
+
static names(): { [key: string]: string } {
|
|
352
|
+
return {
|
|
353
|
+
dataset: 'dataset',
|
|
354
|
+
type: 'type',
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
static types(): { [key: string]: any } {
|
|
359
|
+
return {
|
|
360
|
+
dataset: CreatePipelineRequestSinkConditionRoutesSinkDataset,
|
|
361
|
+
type: 'string',
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
validate() {
|
|
366
|
+
if(this.dataset && typeof (this.dataset as any).validate === 'function') {
|
|
367
|
+
(this.dataset as any).validate();
|
|
368
|
+
}
|
|
369
|
+
super.validate();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
constructor(map?: { [key: string]: any }) {
|
|
373
|
+
super(map);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export class CreatePipelineRequestSinkConditionRoutes extends $dara.Model {
|
|
378
|
+
/**
|
|
379
|
+
* @remarks
|
|
380
|
+
* The route expression in SPL. Only where, project, and extend are supported.
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* * | where intent = \\"refund\\"
|
|
384
|
+
*/
|
|
385
|
+
expression?: string;
|
|
386
|
+
/**
|
|
387
|
+
* @remarks
|
|
388
|
+
* The route ID.
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* refund
|
|
392
|
+
*/
|
|
393
|
+
id?: string;
|
|
394
|
+
/**
|
|
395
|
+
* @remarks
|
|
396
|
+
* The route write destination.
|
|
397
|
+
*/
|
|
398
|
+
sink?: CreatePipelineRequestSinkConditionRoutesSink;
|
|
399
|
+
static names(): { [key: string]: string } {
|
|
400
|
+
return {
|
|
401
|
+
expression: 'expression',
|
|
402
|
+
id: 'id',
|
|
403
|
+
sink: 'sink',
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
static types(): { [key: string]: any } {
|
|
408
|
+
return {
|
|
409
|
+
expression: 'string',
|
|
410
|
+
id: 'string',
|
|
411
|
+
sink: CreatePipelineRequestSinkConditionRoutesSink,
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
validate() {
|
|
416
|
+
if(this.sink && typeof (this.sink as any).validate === 'function') {
|
|
417
|
+
(this.sink as any).validate();
|
|
418
|
+
}
|
|
419
|
+
super.validate();
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
constructor(map?: { [key: string]: any }) {
|
|
423
|
+
super(map);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export class CreatePipelineRequestSinkCondition extends $dara.Model {
|
|
428
|
+
/**
|
|
429
|
+
* @remarks
|
|
430
|
+
* The default write destination used when no conditional route is matched.
|
|
431
|
+
*/
|
|
432
|
+
defaultSink?: CreatePipelineRequestSinkConditionDefaultSink;
|
|
433
|
+
/**
|
|
434
|
+
* @remarks
|
|
435
|
+
* The route matching mode. Currently, only all is supported.
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* all
|
|
439
|
+
*/
|
|
440
|
+
matchMode?: string;
|
|
441
|
+
/**
|
|
442
|
+
* @remarks
|
|
443
|
+
* The list of conditional routes.
|
|
444
|
+
*/
|
|
445
|
+
routes?: CreatePipelineRequestSinkConditionRoutes[];
|
|
446
|
+
static names(): { [key: string]: string } {
|
|
447
|
+
return {
|
|
448
|
+
defaultSink: 'defaultSink',
|
|
449
|
+
matchMode: 'matchMode',
|
|
450
|
+
routes: 'routes',
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
static types(): { [key: string]: any } {
|
|
455
|
+
return {
|
|
456
|
+
defaultSink: CreatePipelineRequestSinkConditionDefaultSink,
|
|
457
|
+
matchMode: 'string',
|
|
458
|
+
routes: { 'type': 'array', 'itemType': CreatePipelineRequestSinkConditionRoutes },
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
validate() {
|
|
463
|
+
if(this.defaultSink && typeof (this.defaultSink as any).validate === 'function') {
|
|
464
|
+
(this.defaultSink as any).validate();
|
|
465
|
+
}
|
|
466
|
+
if(Array.isArray(this.routes)) {
|
|
467
|
+
$dara.Model.validateArray(this.routes);
|
|
468
|
+
}
|
|
469
|
+
super.validate();
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
constructor(map?: { [key: string]: any }) {
|
|
473
|
+
super(map);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
215
477
|
export class CreatePipelineRequestSinkDataset extends $dara.Model {
|
|
216
478
|
/**
|
|
217
479
|
* @remarks
|
|
@@ -253,6 +515,11 @@ export class CreatePipelineRequestSinkDataset extends $dara.Model {
|
|
|
253
515
|
}
|
|
254
516
|
|
|
255
517
|
export class CreatePipelineRequestSink extends $dara.Model {
|
|
518
|
+
/**
|
|
519
|
+
* @remarks
|
|
520
|
+
* The conditional routing configuration. This parameter is used only when sink.type is set to condition.
|
|
521
|
+
*/
|
|
522
|
+
condition?: CreatePipelineRequestSinkCondition;
|
|
256
523
|
/**
|
|
257
524
|
* @remarks
|
|
258
525
|
* The destination dataset configuration.
|
|
@@ -260,7 +527,7 @@ export class CreatePipelineRequestSink extends $dara.Model {
|
|
|
260
527
|
dataset?: CreatePipelineRequestSinkDataset;
|
|
261
528
|
/**
|
|
262
529
|
* @remarks
|
|
263
|
-
* The sink type. Currently, Dataset is supported.
|
|
530
|
+
* The sink type. Currently, only Dataset is supported.
|
|
264
531
|
*
|
|
265
532
|
* @example
|
|
266
533
|
* Dataset
|
|
@@ -268,6 +535,7 @@ export class CreatePipelineRequestSink extends $dara.Model {
|
|
|
268
535
|
type?: string;
|
|
269
536
|
static names(): { [key: string]: string } {
|
|
270
537
|
return {
|
|
538
|
+
condition: 'condition',
|
|
271
539
|
dataset: 'dataset',
|
|
272
540
|
type: 'type',
|
|
273
541
|
};
|
|
@@ -275,12 +543,16 @@ export class CreatePipelineRequestSink extends $dara.Model {
|
|
|
275
543
|
|
|
276
544
|
static types(): { [key: string]: any } {
|
|
277
545
|
return {
|
|
546
|
+
condition: CreatePipelineRequestSinkCondition,
|
|
278
547
|
dataset: CreatePipelineRequestSinkDataset,
|
|
279
548
|
type: 'string',
|
|
280
549
|
};
|
|
281
550
|
}
|
|
282
551
|
|
|
283
552
|
validate() {
|
|
553
|
+
if(this.condition && typeof (this.condition as any).validate === 'function') {
|
|
554
|
+
(this.condition as any).validate();
|
|
555
|
+
}
|
|
284
556
|
if(this.dataset && typeof (this.dataset as any).validate === 'function') {
|
|
285
557
|
(this.dataset as any).validate();
|
|
286
558
|
}
|
|
@@ -292,6 +564,86 @@ export class CreatePipelineRequestSink extends $dara.Model {
|
|
|
292
564
|
}
|
|
293
565
|
}
|
|
294
566
|
|
|
567
|
+
export class CreatePipelineRequestSourceDataset extends $dara.Model {
|
|
568
|
+
/**
|
|
569
|
+
* @remarks
|
|
570
|
+
* The name of the source dataset.
|
|
571
|
+
*
|
|
572
|
+
* @example
|
|
573
|
+
* my-dataset
|
|
574
|
+
*/
|
|
575
|
+
dataset?: string;
|
|
576
|
+
/**
|
|
577
|
+
* @remarks
|
|
578
|
+
* The filter condition for the dataset data.
|
|
579
|
+
*
|
|
580
|
+
* @example
|
|
581
|
+
* status = \\"pending\\"
|
|
582
|
+
*/
|
|
583
|
+
filter?: string;
|
|
584
|
+
static names(): { [key: string]: string } {
|
|
585
|
+
return {
|
|
586
|
+
dataset: 'dataset',
|
|
587
|
+
filter: 'filter',
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
static types(): { [key: string]: any } {
|
|
592
|
+
return {
|
|
593
|
+
dataset: 'string',
|
|
594
|
+
filter: 'string',
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
validate() {
|
|
599
|
+
super.validate();
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
constructor(map?: { [key: string]: any }) {
|
|
603
|
+
super(map);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export class CreatePipelineRequestSourceInputFields extends $dara.Model {
|
|
608
|
+
/**
|
|
609
|
+
* @remarks
|
|
610
|
+
* The field name.
|
|
611
|
+
*
|
|
612
|
+
* @example
|
|
613
|
+
* question
|
|
614
|
+
*/
|
|
615
|
+
name?: string;
|
|
616
|
+
/**
|
|
617
|
+
* @remarks
|
|
618
|
+
* The field type. Valid values: text, long, double, and json.
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* text
|
|
622
|
+
*/
|
|
623
|
+
type?: string;
|
|
624
|
+
static names(): { [key: string]: string } {
|
|
625
|
+
return {
|
|
626
|
+
name: 'name',
|
|
627
|
+
type: 'type',
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
static types(): { [key: string]: any } {
|
|
632
|
+
return {
|
|
633
|
+
name: 'string',
|
|
634
|
+
type: 'string',
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
validate() {
|
|
639
|
+
super.validate();
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
constructor(map?: { [key: string]: any }) {
|
|
643
|
+
super(map);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
295
647
|
export class CreatePipelineRequestSourceLogstore extends $dara.Model {
|
|
296
648
|
/**
|
|
297
649
|
* @remarks
|
|
@@ -343,6 +695,16 @@ export class CreatePipelineRequestSourceLogstore extends $dara.Model {
|
|
|
343
695
|
}
|
|
344
696
|
|
|
345
697
|
export class CreatePipelineRequestSource extends $dara.Model {
|
|
698
|
+
/**
|
|
699
|
+
* @remarks
|
|
700
|
+
* The dataset datasource config under the current AgentSpace.
|
|
701
|
+
*/
|
|
702
|
+
dataset?: CreatePipelineRequestSourceDataset;
|
|
703
|
+
/**
|
|
704
|
+
* @remarks
|
|
705
|
+
* The input fields and field types. This parameter applies to all data source types.
|
|
706
|
+
*/
|
|
707
|
+
inputFields?: CreatePipelineRequestSourceInputFields[];
|
|
346
708
|
/**
|
|
347
709
|
* @remarks
|
|
348
710
|
* The SLS Logstore datasource config.
|
|
@@ -358,6 +720,8 @@ export class CreatePipelineRequestSource extends $dara.Model {
|
|
|
358
720
|
type?: string;
|
|
359
721
|
static names(): { [key: string]: string } {
|
|
360
722
|
return {
|
|
723
|
+
dataset: 'dataset',
|
|
724
|
+
inputFields: 'inputFields',
|
|
361
725
|
logstore: 'logstore',
|
|
362
726
|
type: 'type',
|
|
363
727
|
};
|
|
@@ -365,12 +729,20 @@ export class CreatePipelineRequestSource extends $dara.Model {
|
|
|
365
729
|
|
|
366
730
|
static types(): { [key: string]: any } {
|
|
367
731
|
return {
|
|
732
|
+
dataset: CreatePipelineRequestSourceDataset,
|
|
733
|
+
inputFields: { 'type': 'array', 'itemType': CreatePipelineRequestSourceInputFields },
|
|
368
734
|
logstore: CreatePipelineRequestSourceLogstore,
|
|
369
735
|
type: 'string',
|
|
370
736
|
};
|
|
371
737
|
}
|
|
372
738
|
|
|
373
739
|
validate() {
|
|
740
|
+
if(this.dataset && typeof (this.dataset as any).validate === 'function') {
|
|
741
|
+
(this.dataset as any).validate();
|
|
742
|
+
}
|
|
743
|
+
if(Array.isArray(this.inputFields)) {
|
|
744
|
+
$dara.Model.validateArray(this.inputFields);
|
|
745
|
+
}
|
|
374
746
|
if(this.logstore && typeof (this.logstore as any).validate === 'function') {
|
|
375
747
|
(this.logstore as any).validate();
|
|
376
748
|
}
|
|
@@ -388,7 +760,7 @@ export class CreatePipelineRequest extends $dara.Model {
|
|
|
388
760
|
* The pipeline description. The description can be up to 256 characters in length.
|
|
389
761
|
*
|
|
390
762
|
* @example
|
|
391
|
-
*
|
|
763
|
+
* Collect trace data from SLS, perform data cleaning, and ingest it into a dataset
|
|
392
764
|
*/
|
|
393
765
|
description?: string;
|
|
394
766
|
/**
|
|
@@ -403,7 +775,7 @@ export class CreatePipelineRequest extends $dara.Model {
|
|
|
403
775
|
pipeline?: CreatePipelineRequestPipeline;
|
|
404
776
|
/**
|
|
405
777
|
* @remarks
|
|
406
|
-
* The pipeline name. The name must be 3 to 63 characters in length and can contain only lowercase letters, digits, and hyphens.
|
|
778
|
+
* The pipeline name. The name must be 3 to 63 characters in length and can contain only lowercase letters, digits, and hyphens (-).
|
|
407
779
|
*
|
|
408
780
|
* @example
|
|
409
781
|
* my-pipeline
|
|
@@ -421,7 +793,7 @@ export class CreatePipelineRequest extends $dara.Model {
|
|
|
421
793
|
source?: CreatePipelineRequestSource;
|
|
422
794
|
/**
|
|
423
795
|
* @remarks
|
|
424
|
-
* The idempotency token. A unique string generated by the client to ensure the
|
|
796
|
+
* The idempotency token. A unique string generated by the client to ensure the idempotency of the create operation.
|
|
425
797
|
*
|
|
426
798
|
* @example
|
|
427
799
|
* a1b2c3d4-1234-5678-90ab-cdef12345678
|
package/src/models/Evaluator.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// This file is auto-generated, don't edit it
|
|
2
2
|
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { EvaluatorVariableExtractorMappingValue } from "./EvaluatorVariableExtractorMappingValue";
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
export class Evaluator extends $dara.Model {
|
|
6
7
|
/**
|
|
7
8
|
* @remarks
|
|
8
|
-
* The
|
|
9
|
+
* The runtime configuration of the evaluator. For inline LLM evaluators, this must include configurations such as prompt. When referencing an existing evaluator, this parameter is typically not required and should only be specified when runtime parameters such as version need to be set.
|
|
9
10
|
*
|
|
10
11
|
* @example
|
|
11
12
|
* {"version":"1.0.0"}
|
|
@@ -45,7 +46,7 @@ export class Evaluator extends $dara.Model {
|
|
|
45
46
|
resultName?: string;
|
|
46
47
|
/**
|
|
47
48
|
* @remarks
|
|
48
|
-
* The evaluation result type. Required for inline evaluators.
|
|
49
|
+
* The evaluation result type. Required for inline evaluators. When referencing an existing evaluator, defaults to score if not specified.
|
|
49
50
|
*
|
|
50
51
|
* @example
|
|
51
52
|
* score
|
|
@@ -53,12 +54,17 @@ export class Evaluator extends $dara.Model {
|
|
|
53
54
|
resultType?: string;
|
|
54
55
|
/**
|
|
55
56
|
* @remarks
|
|
56
|
-
* The evaluator type. Defaults to LLM if not specified. Inline CODE evaluators are currently
|
|
57
|
+
* The evaluator type. Defaults to LLM if not specified. Inline CODE evaluators are not currently supported. For the CODE type, reference a previously created evaluator by using evaluatorRef.
|
|
57
58
|
*
|
|
58
59
|
* @example
|
|
59
60
|
* AGENT
|
|
60
61
|
*/
|
|
61
62
|
type?: string;
|
|
63
|
+
/**
|
|
64
|
+
* @remarks
|
|
65
|
+
* The variable extraction rule mapping that maps evaluator variables to a portion of the content within an evaluation data field. This is applicable when the variable value is not the entire field but a subset of the field content. This parameter shares the same variable name key space as variableMapping. Each variable can use only one of the two. Duplicate configurations cause an error. When referencing an existing evaluator, the variable names must exist in the evaluator definition. Call ListTraceFieldExtractionsPreview to perform a trial run for validation before saving.
|
|
66
|
+
*/
|
|
67
|
+
variableExtractorMapping?: { [key: string]: EvaluatorVariableExtractorMappingValue };
|
|
62
68
|
/**
|
|
63
69
|
* @remarks
|
|
64
70
|
* The variable mapping that maps evaluator variables to evaluation data fields. Required for LLM/AGENT inline evaluators. When referencing an existing evaluator, the variable names must exist in the evaluator definition.
|
|
@@ -76,6 +82,7 @@ export class Evaluator extends $dara.Model {
|
|
|
76
82
|
resultName: 'resultName',
|
|
77
83
|
resultType: 'resultType',
|
|
78
84
|
type: 'type',
|
|
85
|
+
variableExtractorMapping: 'variableExtractorMapping',
|
|
79
86
|
variableMapping: 'variableMapping',
|
|
80
87
|
};
|
|
81
88
|
}
|
|
@@ -89,6 +96,7 @@ export class Evaluator extends $dara.Model {
|
|
|
89
96
|
resultName: 'string',
|
|
90
97
|
resultType: 'string',
|
|
91
98
|
type: 'string',
|
|
99
|
+
variableExtractorMapping: { 'type': 'map', 'keyType': 'string', 'valueType': EvaluatorVariableExtractorMappingValue },
|
|
92
100
|
variableMapping: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
93
101
|
};
|
|
94
102
|
}
|
|
@@ -100,6 +108,9 @@ export class Evaluator extends $dara.Model {
|
|
|
100
108
|
if(this.filters) {
|
|
101
109
|
$dara.Model.validateMap(this.filters);
|
|
102
110
|
}
|
|
111
|
+
if(this.variableExtractorMapping) {
|
|
112
|
+
$dara.Model.validateMap(this.variableExtractorMapping);
|
|
113
|
+
}
|
|
103
114
|
if(this.variableMapping) {
|
|
104
115
|
$dara.Model.validateMap(this.variableMapping);
|
|
105
116
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class EvaluatorVariableExtractorMappingValue extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @remarks
|
|
8
|
+
* The evaluation data field from which content is extracted. The extraction expression is applied to the content of this field. Required when saving with the evaluation task. For the trial run API, this parameter can be omitted and the backend derives it from the expression. Multiple variables can share the same source field.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* trace.output
|
|
12
|
+
*/
|
|
13
|
+
originField?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @remarks
|
|
16
|
+
* The extraction method. jsonpath extracts values from the JSON content of the field by using JSONPath. regex performs regular expression matching on the full text of the field. When capturing groups are present, the first capturing group is returned. When no capturing group is present, the entire match is returned.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* jsonpath
|
|
20
|
+
*/
|
|
21
|
+
type?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @remarks
|
|
24
|
+
* The extraction expression. Its meaning is determined by type. When type is jsonpath, specify a JSONPath expression. You can use either a relative path relative to originField (such as $.order.expected) or an absolute path from the root (such as $trace.output.order.expected). When type is regex, specify a regular expression. Note that backslashes must be escaped in JSON. The expression syntax is validated upon saving. For regular expressions, RE2 compatibility is additionally validated. Patterns such as lookahead assertions, lookbehind assertions, backreferences, named groups, atomic groups, and possessive quantifiers are rejected.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* $.order.expected
|
|
28
|
+
*/
|
|
29
|
+
expression?: string;
|
|
30
|
+
static names(): { [key: string]: string } {
|
|
31
|
+
return {
|
|
32
|
+
originField: 'originField',
|
|
33
|
+
type: 'type',
|
|
34
|
+
expression: 'expression',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static types(): { [key: string]: any } {
|
|
39
|
+
return {
|
|
40
|
+
originField: 'string',
|
|
41
|
+
type: 'string',
|
|
42
|
+
expression: 'string',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
validate() {
|
|
47
|
+
super.validate();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
constructor(map?: { [key: string]: any }) {
|
|
51
|
+
super(map);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|