@agentica/benchmark 0.43.2 → 0.44.0-dev.20260313
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 +218 -218
- package/lib/index.mjs +58 -53
- package/lib/index.mjs.map +1 -1
- package/lib/internal/AgenticaBenchmarkPredicator.js +6 -12
- package/lib/internal/AgenticaBenchmarkPredicator.js.map +1 -1
- package/lib/internal/AgenticaSelectBenchmarkReporter.js.map +1 -1
- package/package.json +5 -6
- package/src/AgenticaCallBenchmark.ts +281 -281
- package/src/AgenticaSelectBenchmark.ts +282 -282
- package/src/MicroAgenticaCallBenchmark.ts +281 -281
- package/src/index.ts +3 -3
- package/src/internal/AgenticaBenchmarkPredicator.ts +240 -241
- package/src/internal/AgenticaBenchmarkUtil.ts +60 -60
- package/src/internal/AgenticaCallBenchmarkReporter.ts +192 -192
- package/src/internal/AgenticaPromptReporter.ts +63 -63
- package/src/internal/AgenticaSelectBenchmarkReporter.ts +220 -220
- package/src/structures/IAgenticaBenchmarkExpected.ts +74 -74
- package/src/structures/IAgenticaCallBenchmarkEvent.ts +118 -118
- package/src/structures/IAgenticaCallBenchmarkResult.ts +75 -75
- package/src/structures/IAgenticaCallBenchmarkScenario.ts +45 -45
- package/src/structures/IAgenticaSelectBenchmarkEvent.ts +122 -122
- package/src/structures/IAgenticaSelectBenchmarkResult.ts +75 -75
- package/src/structures/IAgenticaSelectBenchmarkScenario.ts +45 -45
- package/src/utils/MathUtil.ts +16 -16
|
@@ -1,241 +1,240 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module
|
|
3
|
-
* This file contains functions to work with AgenticaBenchmarkPredicator.
|
|
4
|
-
*
|
|
5
|
-
* @author Wrtn Technologies
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { Agentica, AgenticaHistory, AgenticaOperation, MicroAgentica } from "@agentica/core";
|
|
9
|
-
import type
|
|
10
|
-
import type
|
|
11
|
-
|
|
12
|
-
import typia from "typia";
|
|
13
|
-
|
|
14
|
-
import type { IAgenticaBenchmarkExpected } from "../structures/IAgenticaBenchmarkExpected";
|
|
15
|
-
|
|
16
|
-
export const AgenticaBenchmarkPredicator = {
|
|
17
|
-
isNext,
|
|
18
|
-
success,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
interface IPredicatorApplication {
|
|
22
|
-
/**
|
|
23
|
-
* Ask user to consent for what the AI agent wants to do next.
|
|
24
|
-
*
|
|
25
|
-
* If AI agent wants to do some function calling at next,
|
|
26
|
-
* but it needs the user's consent about the function calling to do,
|
|
27
|
-
* then call this tool function.
|
|
28
|
-
*
|
|
29
|
-
* @param props Properties for asking the user's consent
|
|
30
|
-
*/
|
|
31
|
-
consent: (props: IConsentProps) => void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Properties for asking the user's consent
|
|
36
|
-
*/
|
|
37
|
-
interface IConsentProps {
|
|
38
|
-
/**
|
|
39
|
-
* Reason of the message implying what the AI agent wants
|
|
40
|
-
* to do at the next step after the user's consent.
|
|
41
|
-
*/
|
|
42
|
-
content: string;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Recommended reply message for the user.
|
|
46
|
-
*
|
|
47
|
-
* The message what AI agent wants the user to reply
|
|
48
|
-
* accepting the AI agent's next job suggestion.
|
|
49
|
-
*/
|
|
50
|
-
reply: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async function isNext(agent: Agentica | MicroAgentica): Promise<string | null> {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* This file contains functions to work with AgenticaBenchmarkPredicator.
|
|
4
|
+
*
|
|
5
|
+
* @author Wrtn Technologies
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { Agentica, AgenticaHistory, AgenticaOperation, MicroAgentica } from "@agentica/core";
|
|
9
|
+
import type OpenAI from "openai";
|
|
10
|
+
import type { ILlmFunction } from "typia";
|
|
11
|
+
|
|
12
|
+
import typia from "typia";
|
|
13
|
+
|
|
14
|
+
import type { IAgenticaBenchmarkExpected } from "../structures/IAgenticaBenchmarkExpected";
|
|
15
|
+
|
|
16
|
+
export const AgenticaBenchmarkPredicator = {
|
|
17
|
+
isNext,
|
|
18
|
+
success,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
interface IPredicatorApplication {
|
|
22
|
+
/**
|
|
23
|
+
* Ask user to consent for what the AI agent wants to do next.
|
|
24
|
+
*
|
|
25
|
+
* If AI agent wants to do some function calling at next,
|
|
26
|
+
* but it needs the user's consent about the function calling to do,
|
|
27
|
+
* then call this tool function.
|
|
28
|
+
*
|
|
29
|
+
* @param props Properties for asking the user's consent
|
|
30
|
+
*/
|
|
31
|
+
consent: (props: IConsentProps) => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Properties for asking the user's consent
|
|
36
|
+
*/
|
|
37
|
+
interface IConsentProps {
|
|
38
|
+
/**
|
|
39
|
+
* Reason of the message implying what the AI agent wants
|
|
40
|
+
* to do at the next step after the user's consent.
|
|
41
|
+
*/
|
|
42
|
+
content: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Recommended reply message for the user.
|
|
46
|
+
*
|
|
47
|
+
* The message what AI agent wants the user to reply
|
|
48
|
+
* accepting the AI agent's next job suggestion.
|
|
49
|
+
*/
|
|
50
|
+
reply: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function isNext(agent: Agentica | MicroAgentica): Promise<string | null> {
|
|
54
|
+
const histories: AgenticaHistory[] = agent.getHistories();
|
|
55
|
+
const last: AgenticaHistory | undefined = histories[histories.length - 1];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Agentica Props is private, we can't access it
|
|
59
|
+
* The provided code follows the original source prior to modification.
|
|
60
|
+
* However, due to compilation errors, a workaround was implemented.
|
|
61
|
+
* Please apply any available patches to resolve this issue.
|
|
62
|
+
*/
|
|
63
|
+
const llmVendor = agent.getVendor();
|
|
64
|
+
const isAssistantHistory = last?.type === "assistantMessage";
|
|
65
|
+
if (!isAssistantHistory) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const consent: ILlmFunction = typia.llm.application<
|
|
70
|
+
IPredicatorApplication
|
|
71
|
+
>().functions[0]!;
|
|
72
|
+
const result: OpenAI.ChatCompletion = await llmVendor.api.chat.completions.create(
|
|
73
|
+
{
|
|
74
|
+
model: llmVendor.model,
|
|
75
|
+
messages: [
|
|
76
|
+
{
|
|
77
|
+
role: "system",
|
|
78
|
+
content: [
|
|
79
|
+
"You are an helpful assistant.",
|
|
80
|
+
"",
|
|
81
|
+
"If what the assistant said seems like to asking for",
|
|
82
|
+
"user's consent about some function calling at the next step,",
|
|
83
|
+
"use the tools appropriately to step to the next.",
|
|
84
|
+
].join("\n"),
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
role: "assistant",
|
|
88
|
+
content: last.text,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
tools: [
|
|
92
|
+
{
|
|
93
|
+
type: "function",
|
|
94
|
+
function: {
|
|
95
|
+
name: consent.name,
|
|
96
|
+
description: consent.description,
|
|
97
|
+
parameters: consent.parameters as Record<string, any>,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
tool_choice: "required",
|
|
102
|
+
// parallel_tool_calls: false,
|
|
103
|
+
},
|
|
104
|
+
llmVendor.options,
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
const toolCall: OpenAI.ChatCompletionMessageToolCall | undefined = (
|
|
108
|
+
result.choices[0]?.message.tool_calls ?? []
|
|
109
|
+
).filter(
|
|
110
|
+
tc => tc.type === "function" && tc.function.name === consent.name,
|
|
111
|
+
)?.[0];
|
|
112
|
+
|
|
113
|
+
if (toolCall === undefined || toolCall.type !== "function") {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const input = typia.json.isParse<IConsentProps>(toolCall.function.arguments);
|
|
118
|
+
return input !== null ? input.reply : null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Check if the called operations match the expected operations.
|
|
123
|
+
*
|
|
124
|
+
* @param props Properties for checking the match of the called operations
|
|
125
|
+
* and the expected operations
|
|
126
|
+
* @returns `true` if the called operations match the expected operations,
|
|
127
|
+
* otherwise `false`.
|
|
128
|
+
*/
|
|
129
|
+
export function success(props: {
|
|
130
|
+
/**
|
|
131
|
+
* Expected operations to be called.
|
|
132
|
+
*
|
|
133
|
+
* For 'allOf' within an 'array', the next expected element starts checking from the element that follows the last called element in 'allOf'.
|
|
134
|
+
*/
|
|
135
|
+
expected: IAgenticaBenchmarkExpected;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Specified operations.
|
|
139
|
+
*/
|
|
140
|
+
operations: Array<AgenticaOperation>;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* If it's `false`, check the array and let it go even if there's something wrong between them.
|
|
144
|
+
*
|
|
145
|
+
* @default `false`
|
|
146
|
+
*/
|
|
147
|
+
strict?: boolean;
|
|
148
|
+
}): boolean {
|
|
149
|
+
return successInner(props).result;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function successInner(props: Parameters<typeof success>[0]):
|
|
153
|
+
| {
|
|
154
|
+
result: true;
|
|
155
|
+
take: number;
|
|
156
|
+
}
|
|
157
|
+
| {
|
|
158
|
+
result: false;
|
|
159
|
+
} {
|
|
160
|
+
const call = (
|
|
161
|
+
expected: IAgenticaBenchmarkExpected,
|
|
162
|
+
overrideOperations?: Array<AgenticaOperation>,
|
|
163
|
+
) =>
|
|
164
|
+
successInner({
|
|
165
|
+
expected,
|
|
166
|
+
operations: overrideOperations ?? props.operations,
|
|
167
|
+
strict: props.strict,
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
switch (props.expected.type) {
|
|
171
|
+
case "array": {
|
|
172
|
+
let take = 0;
|
|
173
|
+
const targetIterator = props.expected.items[Symbol.iterator]();
|
|
174
|
+
let targeted = targetIterator.next();
|
|
175
|
+
|
|
176
|
+
while (true) {
|
|
177
|
+
if (targeted.done === true) {
|
|
178
|
+
return {
|
|
179
|
+
result: true,
|
|
180
|
+
take,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
if (take >= props.operations.length) {
|
|
184
|
+
return { result: false };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const result = call(targeted.value, props.operations.slice(take));
|
|
188
|
+
if (!result.result) {
|
|
189
|
+
if (props.strict === true) {
|
|
190
|
+
return { result: false };
|
|
191
|
+
}
|
|
192
|
+
take += 1;
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
take += result.take;
|
|
197
|
+
targeted = targetIterator.next();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
case "standalone": {
|
|
201
|
+
const target = props.expected.operation;
|
|
202
|
+
const result = props.operations.some(op => op.name === target.name);
|
|
203
|
+
if (result) {
|
|
204
|
+
return { result, take: 1 };
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
result,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
case "anyOf":
|
|
211
|
+
for (const expected of props.expected.anyOf) {
|
|
212
|
+
const callResult = call(expected);
|
|
213
|
+
if (callResult.result) {
|
|
214
|
+
return callResult;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return { result: false };
|
|
219
|
+
case "allOf": {
|
|
220
|
+
/**
|
|
221
|
+
* @example
|
|
222
|
+
* expected = [4, 2];
|
|
223
|
+
* called = [1, 2, 3, 4, 5];
|
|
224
|
+
*
|
|
225
|
+
* { result: true, take: 3 };
|
|
226
|
+
*/
|
|
227
|
+
const result = props.expected.allOf.map(expected => call(expected));
|
|
228
|
+
if (result.every(r => r.result)) {
|
|
229
|
+
return {
|
|
230
|
+
result: true,
|
|
231
|
+
take: result.reduce((acc, r) => Math.max(acc, r.take), 0),
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
result: false,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module
|
|
3
|
-
* This file contains functions to work with AgenticaBenchmarkUtil.
|
|
4
|
-
*
|
|
5
|
-
* @author Wrtn Technologies
|
|
6
|
-
*/
|
|
7
|
-
import type { IAgenticaBenchmarkExpected } from "../structures/IAgenticaBenchmarkExpected";
|
|
8
|
-
|
|
9
|
-
export const AgenticaBenchmarkUtil = {
|
|
10
|
-
errorToJson,
|
|
11
|
-
expectedToJson,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
function errorToJson<T>(error: T): T | ({
|
|
15
|
-
[k in keyof T]: T[k]
|
|
16
|
-
} & {
|
|
17
|
-
name: string;
|
|
18
|
-
message: string;
|
|
19
|
-
stack: string;
|
|
20
|
-
}) {
|
|
21
|
-
if (error instanceof Error) {
|
|
22
|
-
return {
|
|
23
|
-
...error,
|
|
24
|
-
name: error.name,
|
|
25
|
-
message: error.message,
|
|
26
|
-
stack: error.stack,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
return error;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function expectedToJson(expected: IAgenticaBenchmarkExpected): any {
|
|
33
|
-
if (expected.type === "standalone") {
|
|
34
|
-
return {
|
|
35
|
-
type: expected.type,
|
|
36
|
-
operation: {
|
|
37
|
-
name: expected.operation.name,
|
|
38
|
-
description: expected.operation.function.description,
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
else if (expected.type === "array") {
|
|
43
|
-
return {
|
|
44
|
-
type: expected.type,
|
|
45
|
-
items: expected.items.map(expectedToJson),
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
else if (expected.type === "allOf") {
|
|
49
|
-
return {
|
|
50
|
-
type: expected.type,
|
|
51
|
-
allOf: expected.allOf.map(expectedToJson),
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return {
|
|
56
|
-
type: expected.type,
|
|
57
|
-
anyOf: expected.anyOf.map(expectedToJson),
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* This file contains functions to work with AgenticaBenchmarkUtil.
|
|
4
|
+
*
|
|
5
|
+
* @author Wrtn Technologies
|
|
6
|
+
*/
|
|
7
|
+
import type { IAgenticaBenchmarkExpected } from "../structures/IAgenticaBenchmarkExpected";
|
|
8
|
+
|
|
9
|
+
export const AgenticaBenchmarkUtil = {
|
|
10
|
+
errorToJson,
|
|
11
|
+
expectedToJson,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function errorToJson<T>(error: T): T | ({
|
|
15
|
+
[k in keyof T]: T[k]
|
|
16
|
+
} & {
|
|
17
|
+
name: string;
|
|
18
|
+
message: string;
|
|
19
|
+
stack: string;
|
|
20
|
+
}) {
|
|
21
|
+
if (error instanceof Error) {
|
|
22
|
+
return {
|
|
23
|
+
...error,
|
|
24
|
+
name: error.name,
|
|
25
|
+
message: error.message,
|
|
26
|
+
stack: error.stack,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return error;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function expectedToJson(expected: IAgenticaBenchmarkExpected): any {
|
|
33
|
+
if (expected.type === "standalone") {
|
|
34
|
+
return {
|
|
35
|
+
type: expected.type,
|
|
36
|
+
operation: {
|
|
37
|
+
name: expected.operation.name,
|
|
38
|
+
description: expected.operation.function.description,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else if (expected.type === "array") {
|
|
43
|
+
return {
|
|
44
|
+
type: expected.type,
|
|
45
|
+
items: expected.items.map(expectedToJson),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
else if (expected.type === "allOf") {
|
|
49
|
+
return {
|
|
50
|
+
type: expected.type,
|
|
51
|
+
allOf: expected.allOf.map(expectedToJson),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return {
|
|
56
|
+
type: expected.type,
|
|
57
|
+
anyOf: expected.anyOf.map(expectedToJson),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|