@agentica/benchmark 0.8.3 → 0.9.0-dev.20250302
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/LICENSE +21 -21
- package/README.md +326 -324
- package/lib/AgenticaCallBenchmark.d.ts +7 -6
- package/lib/AgenticaCallBenchmark.js.map +1 -1
- package/lib/AgenticaSelectBenchmark.d.ts +7 -6
- package/lib/AgenticaSelectBenchmark.js.map +1 -1
- package/lib/index.mjs +46 -1
- package/lib/index.mjs.map +1 -1
- package/lib/internal/AgenticaBenchmarkPredicator.d.ts +5 -4
- package/lib/internal/AgenticaBenchmarkPredicator.js +74 -2
- package/lib/internal/AgenticaBenchmarkPredicator.js.map +1 -1
- package/lib/internal/AgenticaBenchmarkUtil.d.ts +2 -1
- package/lib/internal/AgenticaBenchmarkUtil.js.map +1 -1
- package/lib/internal/AgenticaCallBenchmarkReporter.d.ts +2 -1
- package/lib/internal/AgenticaCallBenchmarkReporter.js.map +1 -1
- package/lib/internal/AgenticaPromptReporter.d.ts +2 -1
- package/lib/internal/AgenticaPromptReporter.js.map +1 -1
- package/lib/internal/AgenticaSelectBenchmarkReporter.js.map +1 -1
- package/lib/structures/IAgenticaBenchmarkExpected.d.ts +10 -9
- package/lib/structures/IAgenticaCallBenchmarkEvent.d.ts +8 -7
- package/lib/structures/IAgenticaCallBenchmarkResult.d.ts +6 -5
- package/lib/structures/IAgenticaCallBenchmarkScenario.d.ts +3 -2
- package/lib/structures/IAgenticaSelectBenchmarkEvent.d.ts +9 -8
- package/lib/structures/IAgenticaSelectBenchmarkResult.d.ts +6 -5
- package/lib/structures/IAgenticaSelectBenchmarkScenario.d.ts +3 -2
- package/package.json +5 -5
- package/src/AgenticaCallBenchmark.ts +268 -265
- package/src/AgenticaSelectBenchmark.ts +256 -254
- package/src/index.ts +3 -3
- package/src/internal/AgenticaBenchmarkPredicator.ts +224 -216
- package/src/internal/AgenticaBenchmarkUtil.ts +44 -40
- package/src/internal/AgenticaCallBenchmarkReporter.ts +183 -180
- package/src/internal/AgenticaPromptReporter.ts +46 -43
- package/src/internal/AgenticaSelectBenchmarkReporter.ts +213 -210
- package/src/structures/IAgenticaBenchmarkExpected.ts +68 -58
- package/src/structures/IAgenticaCallBenchmarkEvent.ts +113 -109
- package/src/structures/IAgenticaCallBenchmarkResult.ts +70 -69
- package/src/structures/IAgenticaCallBenchmarkScenario.ts +43 -39
- package/src/structures/IAgenticaSelectBenchmarkEvent.ts +114 -110
- package/src/structures/IAgenticaSelectBenchmarkResult.ts +72 -69
- package/src/structures/IAgenticaSelectBenchmarkScenario.ts +43 -39
- package/src/utils/MathUtil.ts +3 -3
|
@@ -1,210 +1,213 @@
|
|
|
1
|
-
import { IAgenticaTokenUsage } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
events
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
`
|
|
44
|
-
` -
|
|
45
|
-
` -
|
|
46
|
-
`
|
|
47
|
-
` -
|
|
48
|
-
` -
|
|
49
|
-
`
|
|
50
|
-
`
|
|
51
|
-
` -
|
|
52
|
-
` - Total: ${aggregate.
|
|
53
|
-
` -
|
|
54
|
-
`
|
|
55
|
-
` -
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
` -
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
`
|
|
110
|
-
`
|
|
111
|
-
` -
|
|
112
|
-
` - Total: ${aggregate.
|
|
113
|
-
` -
|
|
114
|
-
`
|
|
115
|
-
` -
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"",
|
|
133
|
-
"###
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
`
|
|
161
|
-
` -
|
|
162
|
-
` - Total: ${event.usage.aggregate.
|
|
163
|
-
` -
|
|
164
|
-
`
|
|
165
|
-
` -
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
"",
|
|
173
|
-
"###
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1
|
+
import { IAgenticaTokenUsage } from "@agentica/core";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
|
|
4
|
+
import { IAgenticaSelectBenchmarkEvent } from "../structures/IAgenticaSelectBenchmarkEvent";
|
|
5
|
+
import { IAgenticaSelectBenchmarkResult } from "../structures/IAgenticaSelectBenchmarkResult";
|
|
6
|
+
import { MathUtil } from "../utils/MathUtil";
|
|
7
|
+
import { AgenticaBenchmarkUtil } from "./AgenticaBenchmarkUtil";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export namespace AgenticaSelectBenchmarkReporter {
|
|
13
|
+
export const markdown = <Model extends ILlmSchema.Model>(
|
|
14
|
+
result: IAgenticaSelectBenchmarkResult<Model>,
|
|
15
|
+
): Record<string, string> =>
|
|
16
|
+
Object.fromEntries([
|
|
17
|
+
["./README.md", writeIndex(result)],
|
|
18
|
+
...result.experiments
|
|
19
|
+
.map((exp) => [
|
|
20
|
+
[`./${exp.scenario.name}/README.md`, writeExperimentIndex(exp)],
|
|
21
|
+
...exp.events.map((event, i) => [
|
|
22
|
+
`./${exp.scenario.name}/${i + 1}.${event.type}.md`,
|
|
23
|
+
writeExperimentEvent(event, i),
|
|
24
|
+
]),
|
|
25
|
+
])
|
|
26
|
+
.flat(),
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
const writeIndex = <Model extends ILlmSchema.Model>(
|
|
30
|
+
result: IAgenticaSelectBenchmarkResult<Model>,
|
|
31
|
+
): string => {
|
|
32
|
+
const events: IAgenticaSelectBenchmarkEvent<Model>[] = result.experiments
|
|
33
|
+
.map((r) => r.events)
|
|
34
|
+
.flat();
|
|
35
|
+
const average: number =
|
|
36
|
+
events
|
|
37
|
+
.map((e) => e.completed_at.getTime() - e.started_at.getTime())
|
|
38
|
+
.reduce((a, b) => a + b, 0) / events.length;
|
|
39
|
+
const aggregate: IAgenticaTokenUsage.IComponent = result.usage.aggregate;
|
|
40
|
+
return [
|
|
41
|
+
"# LLM Function Selection Benchmark",
|
|
42
|
+
"## Summary",
|
|
43
|
+
` - Aggregation:`,
|
|
44
|
+
` - Scenarios: #${result.experiments.length.toLocaleString()}`,
|
|
45
|
+
` - Trial: ${events.length}`,
|
|
46
|
+
` - Success: ${events.filter((e) => e.type === "success").length}`,
|
|
47
|
+
` - Failure: ${events.filter((e) => e.type === "failure").length}`,
|
|
48
|
+
` - Average Time: ${MathUtil.round(average).toLocaleString()} ms`,
|
|
49
|
+
` - Token Usage`,
|
|
50
|
+
` - Total: ${aggregate.total.toLocaleString()}`,
|
|
51
|
+
` - Input`,
|
|
52
|
+
` - Total: ${aggregate.input.total.toLocaleString()}`,
|
|
53
|
+
` - Cached: ${aggregate.input.cached.toLocaleString()}`,
|
|
54
|
+
` - Output:`,
|
|
55
|
+
` - Total: ${aggregate.output.total.toLocaleString()}`,
|
|
56
|
+
` - Accepted Prediction: ${aggregate.output.accepted_prediction.toLocaleString()}`,
|
|
57
|
+
` - Reasoning: ${aggregate.output.reasoning.toLocaleString()}`,
|
|
58
|
+
` - Rejected Prediction: ${aggregate.output.rejected_prediction.toLocaleString()}`,
|
|
59
|
+
"",
|
|
60
|
+
"## Experiments",
|
|
61
|
+
" Name | Status | Time/Avg ",
|
|
62
|
+
":-----|:-------|----------:",
|
|
63
|
+
...result.experiments.map((exp) =>
|
|
64
|
+
[
|
|
65
|
+
`[${exp.scenario.name}](./${exp.scenario.name}/README.md)`,
|
|
66
|
+
(() => {
|
|
67
|
+
const success: number = Math.floor(
|
|
68
|
+
(exp.events.filter((e) => e.type === "success").length /
|
|
69
|
+
exp.events.length) *
|
|
70
|
+
10,
|
|
71
|
+
);
|
|
72
|
+
return (
|
|
73
|
+
new Array(success).fill("■").join("") +
|
|
74
|
+
new Array(10 - success).fill("□").join("")
|
|
75
|
+
);
|
|
76
|
+
})(),
|
|
77
|
+
MathUtil.round(
|
|
78
|
+
exp.events
|
|
79
|
+
.map(
|
|
80
|
+
(event) =>
|
|
81
|
+
event.completed_at.getTime() - event.started_at.getTime(),
|
|
82
|
+
)
|
|
83
|
+
.reduce((a, b) => a + b, 0) / exp.events.length,
|
|
84
|
+
).toLocaleString() + " ms",
|
|
85
|
+
].join(" | "),
|
|
86
|
+
),
|
|
87
|
+
].join("\n");
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const writeExperimentIndex = <Model extends ILlmSchema.Model>(
|
|
91
|
+
exp: IAgenticaSelectBenchmarkResult.IExperiment<Model>,
|
|
92
|
+
): string => {
|
|
93
|
+
const aggregate: IAgenticaTokenUsage.IComponent = exp.usage.aggregate;
|
|
94
|
+
return [
|
|
95
|
+
`# ${exp.scenario.name}`,
|
|
96
|
+
"## Summary",
|
|
97
|
+
" - Aggregation:",
|
|
98
|
+
` - Trial: ${exp.events.length}`,
|
|
99
|
+
` - Success: ${exp.events.filter((e) => e.type === "success").length}`,
|
|
100
|
+
` - Failure: ${exp.events.filter((e) => e.type === "failure").length}`,
|
|
101
|
+
` - Average Time: ${MathUtil.round(
|
|
102
|
+
exp.events
|
|
103
|
+
.map(
|
|
104
|
+
(event) =>
|
|
105
|
+
event.completed_at.getTime() - event.started_at.getTime(),
|
|
106
|
+
)
|
|
107
|
+
.reduce((a, b) => a + b, 0) / exp.events.length,
|
|
108
|
+
).toLocaleString()} ms`,
|
|
109
|
+
` - Token Usage`,
|
|
110
|
+
` - Total: ${aggregate.total.toLocaleString()}`,
|
|
111
|
+
` - Input`,
|
|
112
|
+
` - Total: ${aggregate.input.total.toLocaleString()}`,
|
|
113
|
+
` - Cached: ${aggregate.input.cached.toLocaleString()}`,
|
|
114
|
+
` - Output:`,
|
|
115
|
+
` - Total: ${aggregate.output.total.toLocaleString()}`,
|
|
116
|
+
` - Accepted Prediction: ${aggregate.output.accepted_prediction.toLocaleString()}`,
|
|
117
|
+
` - Reasoning: ${aggregate.output.reasoning.toLocaleString()}`,
|
|
118
|
+
` - Rejected Prediction: ${aggregate.output.rejected_prediction.toLocaleString()}`,
|
|
119
|
+
"",
|
|
120
|
+
"## Events",
|
|
121
|
+
" No | Type | Time",
|
|
122
|
+
"---:|:-----|----:",
|
|
123
|
+
...exp.events.map((e, i) =>
|
|
124
|
+
[
|
|
125
|
+
`[${i + 1}.](./${i + 1}.${e.type}.md)`,
|
|
126
|
+
e.type,
|
|
127
|
+
MathUtil.round(e.completed_at.getTime() - e.started_at.getTime()) +
|
|
128
|
+
" ms",
|
|
129
|
+
].join(" | "),
|
|
130
|
+
),
|
|
131
|
+
"",
|
|
132
|
+
"## Scenario",
|
|
133
|
+
"### User Prompt",
|
|
134
|
+
exp.scenario.text,
|
|
135
|
+
"",
|
|
136
|
+
"### Expected",
|
|
137
|
+
"```json",
|
|
138
|
+
JSON.stringify(
|
|
139
|
+
AgenticaBenchmarkUtil.expectedToJson(exp.scenario.expected),
|
|
140
|
+
null,
|
|
141
|
+
2,
|
|
142
|
+
),
|
|
143
|
+
"```",
|
|
144
|
+
].join("\n");
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const writeExperimentEvent = <Model extends ILlmSchema.Model>(
|
|
148
|
+
event: IAgenticaSelectBenchmarkEvent<Model>,
|
|
149
|
+
index: number,
|
|
150
|
+
): string => {
|
|
151
|
+
return [
|
|
152
|
+
`# ${index + 1}. ${event.type}`,
|
|
153
|
+
`## Summary`,
|
|
154
|
+
` - Name: ${event.scenario.name}`,
|
|
155
|
+
` - Type: ${event.type}`,
|
|
156
|
+
` - Time: ${(event.completed_at.getTime() - event.started_at.getTime()).toLocaleString()} ms`,
|
|
157
|
+
...(event.type !== "error"
|
|
158
|
+
? [
|
|
159
|
+
" - Token Usage",
|
|
160
|
+
` - Total: ${event.usage.aggregate.toLocaleString()}`,
|
|
161
|
+
` - Prompt`,
|
|
162
|
+
` - Total: ${event.usage.aggregate.input.total.toLocaleString()}`,
|
|
163
|
+
` - Cached: ${event.usage.aggregate.input.cached.toLocaleString()}`,
|
|
164
|
+
` - Completion:`,
|
|
165
|
+
` - Total: ${event.usage.aggregate.output.total.toLocaleString()}`,
|
|
166
|
+
` - Reasoning: ${event.usage.aggregate.output.reasoning.toLocaleString()}`,
|
|
167
|
+
` - Accepted Prediction: ${event.usage.aggregate.output.accepted_prediction.toLocaleString()}`,
|
|
168
|
+
` - Rejected Prediction: ${event.usage.aggregate.output.rejected_prediction.toLocaleString()}`,
|
|
169
|
+
]
|
|
170
|
+
: []),
|
|
171
|
+
"",
|
|
172
|
+
"## Scenario",
|
|
173
|
+
"### User Prompt",
|
|
174
|
+
event.scenario.text,
|
|
175
|
+
"",
|
|
176
|
+
"### Expected",
|
|
177
|
+
"```json",
|
|
178
|
+
JSON.stringify(
|
|
179
|
+
AgenticaBenchmarkUtil.expectedToJson(event.scenario.expected),
|
|
180
|
+
null,
|
|
181
|
+
2,
|
|
182
|
+
),
|
|
183
|
+
"```",
|
|
184
|
+
"",
|
|
185
|
+
...(event.type === "success" || event.type === "failure"
|
|
186
|
+
? [
|
|
187
|
+
"## Result",
|
|
188
|
+
...event.selected.map((s) =>
|
|
189
|
+
[
|
|
190
|
+
`### ${s.name}`,
|
|
191
|
+
` - Controller: \`${s.controller.name}\``,
|
|
192
|
+
` - Function: \`${s.function.name}\``,
|
|
193
|
+
` - Reason: ${s.reason}`,
|
|
194
|
+
"",
|
|
195
|
+
...(s.function.description ? [s.function.description, ""] : []),
|
|
196
|
+
].join("\n"),
|
|
197
|
+
),
|
|
198
|
+
]
|
|
199
|
+
: []),
|
|
200
|
+
...(event.type === "error"
|
|
201
|
+
? [
|
|
202
|
+
"## Error",
|
|
203
|
+
"```json",
|
|
204
|
+
AgenticaBenchmarkUtil.errorToJson(
|
|
205
|
+
JSON.stringify(event.error, null, 2),
|
|
206
|
+
),
|
|
207
|
+
"```",
|
|
208
|
+
"",
|
|
209
|
+
]
|
|
210
|
+
: []),
|
|
211
|
+
].join("\n");
|
|
212
|
+
};
|
|
213
|
+
}
|
|
@@ -1,58 +1,68 @@
|
|
|
1
|
-
import { IAgenticaOperation } from "@agentica/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
| IAgenticaBenchmarkExpected.
|
|
18
|
-
| IAgenticaBenchmarkExpected.
|
|
19
|
-
| IAgenticaBenchmarkExpected.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
1
|
+
import { IAgenticaOperation } from "@agentica/core";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Expected operation determinant.
|
|
6
|
+
*
|
|
7
|
+
* `IAgenticaBenchmarkExpected` is a type for determining what
|
|
8
|
+
* operation is expected in the benchmarking.
|
|
9
|
+
*
|
|
10
|
+
* And `IAgenticaBenchmarkExpected` is an union type of 4 types,
|
|
11
|
+
* especially designed for the detailed determination of the expected
|
|
12
|
+
* operations.
|
|
13
|
+
*
|
|
14
|
+
* @author Samchon
|
|
15
|
+
*/
|
|
16
|
+
export type IAgenticaBenchmarkExpected<Model extends ILlmSchema.Model> =
|
|
17
|
+
| IAgenticaBenchmarkExpected.IAllOf<Model>
|
|
18
|
+
| IAgenticaBenchmarkExpected.IAnyOf<Model>
|
|
19
|
+
| IAgenticaBenchmarkExpected.IArray<Model>
|
|
20
|
+
| IAgenticaBenchmarkExpected.IStandalone<Model>;
|
|
21
|
+
export namespace IAgenticaBenchmarkExpected {
|
|
22
|
+
/**
|
|
23
|
+
* All of them must meet the condition, but sequence is not important.
|
|
24
|
+
*/
|
|
25
|
+
export interface IAllOf<Model extends ILlmSchema.Model> {
|
|
26
|
+
type: "allOf";
|
|
27
|
+
allOf: Array<
|
|
28
|
+
Exclude<
|
|
29
|
+
IAgenticaBenchmarkExpected<Model>,
|
|
30
|
+
IAgenticaBenchmarkExpected.IAllOf<Model>
|
|
31
|
+
>
|
|
32
|
+
>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* At least one of them must meet the condition.
|
|
37
|
+
*/
|
|
38
|
+
export interface IAnyOf<Model extends ILlmSchema.Model> {
|
|
39
|
+
type: "anyOf";
|
|
40
|
+
anyOf: Array<
|
|
41
|
+
Exclude<
|
|
42
|
+
IAgenticaBenchmarkExpected<Model>,
|
|
43
|
+
IAgenticaBenchmarkExpected.IAnyOf<Model>
|
|
44
|
+
>
|
|
45
|
+
>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* All of them must meet the condition, and sequence is important.
|
|
50
|
+
*/
|
|
51
|
+
export interface IArray<Model extends ILlmSchema.Model> {
|
|
52
|
+
type: "array";
|
|
53
|
+
items: Array<
|
|
54
|
+
Exclude<
|
|
55
|
+
IAgenticaBenchmarkExpected<Model>,
|
|
56
|
+
IAgenticaBenchmarkExpected.IArray<Model>
|
|
57
|
+
>
|
|
58
|
+
>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Standalone operation.
|
|
63
|
+
*/
|
|
64
|
+
export interface IStandalone<Model extends ILlmSchema.Model> {
|
|
65
|
+
type: "standalone";
|
|
66
|
+
operation: IAgenticaOperation<Model>;
|
|
67
|
+
}
|
|
68
|
+
}
|