@orq-ai/node 4.15.0-rc.54 → 4.15.0-rc.55
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/README.md +7 -1
- package/funcs/datasetsList.js +1 -0
- package/funcs/datasetsList.js.map +1 -1
- package/funcs/evalsAll.d.ts +2 -2
- package/funcs/evalsAll.d.ts.map +1 -1
- package/funcs/evalsAll.js +5 -2
- package/funcs/evalsAll.js.map +1 -1
- package/funcs/evalsCreate.d.ts +2 -1
- package/funcs/evalsCreate.d.ts.map +1 -1
- package/funcs/evalsCreate.js +19 -4
- package/funcs/evalsCreate.js.map +1 -1
- package/funcs/evalsDelete.d.ts +2 -2
- package/funcs/evalsDelete.d.ts.map +1 -1
- package/funcs/evalsDelete.js +6 -2
- package/funcs/evalsDelete.js.map +1 -1
- package/funcs/evalsGet.d.ts +2 -1
- package/funcs/evalsGet.d.ts.map +1 -1
- package/funcs/evalsGet.js +5 -1
- package/funcs/evalsGet.js.map +1 -1
- package/funcs/evalsUpdate.d.ts +2 -1
- package/funcs/evalsUpdate.d.ts.map +1 -1
- package/funcs/evalsUpdate.js +5 -1
- package/funcs/evalsUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/chunkingconfiguration.d.ts +30 -30
- package/models/components/chunkingconfiguration.d.ts.map +1 -1
- package/models/components/chunkingconfiguration.js +36 -37
- package/models/components/chunkingconfiguration.js.map +1 -1
- package/models/components/evaluatorresponsefunction.d.ts +230 -0
- package/models/components/evaluatorresponsefunction.d.ts.map +1 -0
- package/models/components/evaluatorresponsefunction.js +420 -0
- package/models/components/evaluatorresponsefunction.js.map +1 -0
- package/models/components/evaluatorresponsehttp.d.ts +37 -0
- package/models/components/evaluatorresponsehttp.d.ts.map +1 -0
- package/models/components/evaluatorresponsehttp.js +77 -0
- package/models/components/evaluatorresponsehttp.js.map +1 -0
- package/models/components/evaluatorresponsejsonschema.d.ts +22 -0
- package/models/components/evaluatorresponsejsonschema.d.ts.map +1 -0
- package/models/components/{listevaluatorsresponse.js → evaluatorresponsejsonschema.js} +20 -16
- package/models/components/evaluatorresponsejsonschema.js.map +1 -0
- package/models/components/evaluatorresponsellm.d.ts +101 -0
- package/models/components/evaluatorresponsellm.d.ts.map +1 -0
- package/models/components/evaluatorresponsellm.js +181 -0
- package/models/components/evaluatorresponsellm.js.map +1 -0
- package/models/components/evaluatorresponsepython.d.ts +22 -0
- package/models/components/evaluatorresponsepython.d.ts.map +1 -0
- package/models/components/evaluatorresponsepython.js +67 -0
- package/models/components/evaluatorresponsepython.js.map +1 -0
- package/models/components/evaluatorresponseragas.d.ts +41 -0
- package/models/components/evaluatorresponseragas.d.ts.map +1 -0
- package/models/components/evaluatorresponseragas.js +86 -0
- package/models/components/evaluatorresponseragas.js.map +1 -0
- package/models/components/evaluatorresponsetypescript.d.ts +22 -0
- package/models/components/evaluatorresponsetypescript.d.ts.map +1 -0
- package/models/components/evaluatorresponsetypescript.js +67 -0
- package/models/components/evaluatorresponsetypescript.js.map +1 -0
- package/models/components/index.d.ts +7 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -2
- package/models/components/index.js.map +1 -1
- package/models/components/queryreportrequest.d.ts +5 -5
- package/models/components/queryreportrequest.d.ts.map +1 -1
- package/models/components/queryreportrequest.js +6 -6
- package/models/components/queryreportrequest.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/errors/createeval.d.ts +23 -0
- package/models/errors/createeval.d.ts.map +1 -0
- package/models/errors/createeval.js +68 -0
- package/models/errors/createeval.js.map +1 -0
- package/models/errors/deleteeval.d.ts +43 -0
- package/models/errors/deleteeval.d.ts.map +1 -0
- package/models/errors/deleteeval.js +94 -0
- package/models/errors/deleteeval.js.map +1 -0
- package/models/errors/geteval.d.ts +23 -0
- package/models/errors/geteval.d.ts.map +1 -0
- package/models/errors/geteval.js +68 -0
- package/models/errors/geteval.js.map +1 -0
- package/models/errors/getevals.d.ts +23 -0
- package/models/errors/getevals.d.ts.map +1 -0
- package/models/{components/deleteevaluatorresponse.js → errors/getevals.js} +28 -8
- package/models/errors/getevals.js.map +1 -0
- package/models/errors/index.d.ts +5 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +5 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/updateeval.d.ts +23 -0
- package/models/errors/updateeval.d.ts.map +1 -0
- package/models/errors/updateeval.js +68 -0
- package/models/errors/updateeval.js.map +1 -0
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createeval.d.ts +305 -4
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +258 -3
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createtool.d.ts +4 -4
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +9 -9
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/getalltools.js +4 -4
- package/models/operations/geteval.d.ts +804 -2
- package/models/operations/geteval.d.ts.map +1 -1
- package/models/operations/geteval.js +1244 -2
- package/models/operations/geteval.js.map +1 -1
- package/models/operations/getevals.d.ts +41 -3
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +52 -3
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.d.ts +5 -0
- package/models/operations/listdatasets.d.ts.map +1 -1
- package/models/operations/listdatasets.js +3 -1
- package/models/operations/listdatasets.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updateeval.d.ts +194 -6
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +155 -4
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +1 -1
- package/sdk/evals.d.ts +3 -3
- package/sdk/evals.d.ts.map +1 -1
- package/sdk/evals.js.map +1 -1
- package/src/funcs/datasetsList.ts +1 -0
- package/src/funcs/evalsAll.ts +14 -6
- package/src/funcs/evalsCreate.ts +31 -5
- package/src/funcs/evalsDelete.ts +19 -6
- package/src/funcs/evalsGet.ts +10 -1
- package/src/funcs/evalsUpdate.ts +10 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/chunkingconfiguration.ts +150 -110
- package/src/models/components/evaluatorresponsefunction.ts +928 -0
- package/src/models/components/evaluatorresponsehttp.ts +77 -0
- package/src/models/components/evaluatorresponsejsonschema.ts +60 -0
- package/src/models/components/evaluatorresponsellm.ts +310 -0
- package/src/models/components/evaluatorresponsepython.ts +60 -0
- package/src/models/components/evaluatorresponseragas.ts +84 -0
- package/src/models/components/evaluatorresponsetypescript.ts +60 -0
- package/src/models/components/index.ts +7 -2
- package/src/models/components/queryreportrequest.ts +11 -10
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/errors/createeval.ts +51 -0
- package/src/models/errors/deleteeval.ts +96 -0
- package/src/models/errors/geteval.ts +51 -0
- package/src/models/errors/getevals.ts +51 -0
- package/src/models/errors/index.ts +5 -0
- package/src/models/errors/updateeval.ts +51 -0
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createeval.ts +628 -6
- package/src/models/operations/createtool.ts +13 -11
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/geteval.ts +2751 -3
- package/src/models/operations/getevals.ts +123 -5
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +8 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updateeval.ts +393 -9
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/evals.ts +3 -3
- package/models/components/deleteevaluatorresponse.d.ts +0 -8
- package/models/components/deleteevaluatorresponse.d.ts.map +0 -1
- package/models/components/deleteevaluatorresponse.js.map +0 -1
- package/models/components/listevaluatorsresponse.d.ts +0 -16
- package/models/components/listevaluatorsresponse.d.ts.map +0 -1
- package/models/components/listevaluatorsresponse.js.map +0 -1
- package/src/models/components/deleteevaluatorresponse.ts +0 -27
- package/src/models/components/listevaluatorsresponse.ts +0 -59
|
@@ -5,30 +5,406 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
9
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
12
|
|
|
11
|
-
export type
|
|
13
|
+
export type CategoricalLabels = {
|
|
14
|
+
value: string;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const UpdateEvalMode = {
|
|
19
|
+
Single: "single",
|
|
20
|
+
Jury: "jury",
|
|
21
|
+
} as const;
|
|
22
|
+
export type UpdateEvalMode = ClosedEnum<typeof UpdateEvalMode>;
|
|
23
|
+
|
|
24
|
+
export type UpdateEvalRetry = {
|
|
25
|
+
count?: number | undefined;
|
|
26
|
+
onCodes?: Array<number> | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type UpdateEvalFallbacks = {
|
|
30
|
+
model: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type Judges = {
|
|
34
|
+
model: string;
|
|
35
|
+
retry?: UpdateEvalRetry | undefined;
|
|
36
|
+
fallbacks?: Array<UpdateEvalFallbacks> | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type UpdateEvalEvalsRetry = {
|
|
40
|
+
count?: number | undefined;
|
|
41
|
+
onCodes?: Array<number> | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type UpdateEvalEvalsFallbacks = {
|
|
45
|
+
model: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type ReplacementJudges = {
|
|
49
|
+
model: string;
|
|
50
|
+
retry?: UpdateEvalEvalsRetry | undefined;
|
|
51
|
+
fallbacks?: Array<UpdateEvalEvalsFallbacks> | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const TieValue = {
|
|
55
|
+
Tie: "Tie",
|
|
56
|
+
} as const;
|
|
57
|
+
export type TieValue = ClosedEnum<typeof TieValue>;
|
|
58
|
+
|
|
59
|
+
export type Jury = {
|
|
60
|
+
judges: Array<Judges>;
|
|
61
|
+
replacementJudges?: Array<ReplacementJudges> | undefined;
|
|
62
|
+
minSuccessfulJudges?: number | undefined;
|
|
63
|
+
tieValue?: TieValue | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const UpdateEvalVersionIncrement = {
|
|
67
|
+
Major: "major",
|
|
68
|
+
Minor: "minor",
|
|
69
|
+
Patch: "patch",
|
|
70
|
+
} as const;
|
|
71
|
+
export type UpdateEvalVersionIncrement = ClosedEnum<
|
|
72
|
+
typeof UpdateEvalVersionIncrement
|
|
73
|
+
>;
|
|
74
|
+
|
|
75
|
+
export type UpdateEvalRequestBody = {
|
|
76
|
+
/**
|
|
77
|
+
* Evaluator type. Optional on update — inferred from existing evaluator.
|
|
78
|
+
*/
|
|
79
|
+
type?: string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Legacy alternative to `project_id`. Project path. Optional on update — the evaluator keeps its current project when both are omitted. Mutually exclusive with `project_id`.
|
|
82
|
+
*/
|
|
83
|
+
path?: string | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Unique identifier of the project that owns the evaluator, as returned by `GET /v2/projects`. Optional on update — the evaluator keeps its current project when omitted; supplying a different id moves it. Mutually exclusive with `path`.
|
|
86
|
+
*/
|
|
87
|
+
projectId?: string | undefined;
|
|
88
|
+
key?: string | undefined;
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
prompt?: string | undefined;
|
|
91
|
+
outputType?: string | undefined;
|
|
92
|
+
categories?: Array<string> | null | undefined;
|
|
93
|
+
categoricalLabels?: Array<CategoricalLabels> | null | undefined;
|
|
94
|
+
datasetId?: string | null | undefined;
|
|
95
|
+
repetitions?: number | undefined;
|
|
96
|
+
mode?: UpdateEvalMode | undefined;
|
|
97
|
+
model?: string | undefined;
|
|
98
|
+
jury?: Jury | undefined;
|
|
99
|
+
schema?: string | undefined;
|
|
100
|
+
url?: string | undefined;
|
|
101
|
+
method?: string | undefined;
|
|
102
|
+
headers?: { [k: string]: string } | undefined;
|
|
103
|
+
payload?: { [k: string]: any } | undefined;
|
|
104
|
+
code?: string | undefined;
|
|
105
|
+
guardrailConfig?: any | undefined;
|
|
106
|
+
versionIncrement?: UpdateEvalVersionIncrement | undefined;
|
|
107
|
+
versionDescription?: string | undefined;
|
|
108
|
+
};
|
|
12
109
|
|
|
13
110
|
export type UpdateEvalRequest = {
|
|
14
111
|
id: string;
|
|
15
|
-
requestBody
|
|
112
|
+
requestBody?: UpdateEvalRequestBody | undefined;
|
|
16
113
|
};
|
|
17
114
|
|
|
18
115
|
/**
|
|
19
|
-
*
|
|
116
|
+
* Successfully updated an eval
|
|
20
117
|
*/
|
|
21
|
-
export type UpdateEvalResponseBody =
|
|
118
|
+
export type UpdateEvalResponseBody =
|
|
119
|
+
| components.EvaluatorResponseLlm
|
|
120
|
+
| components.EvaluatorResponseJsonSchema
|
|
121
|
+
| components.EvaluatorResponseHttp
|
|
122
|
+
| components.EvaluatorResponsePython
|
|
123
|
+
| components.EvaluatorResponseFunction
|
|
124
|
+
| components.EvaluatorResponseRagas
|
|
125
|
+
| components.EvaluatorResponseTypescript;
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export type CategoricalLabels$Outbound = {
|
|
129
|
+
value: string;
|
|
130
|
+
description?: string | undefined;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const CategoricalLabels$outboundSchema: z.ZodType<
|
|
135
|
+
CategoricalLabels$Outbound,
|
|
136
|
+
z.ZodTypeDef,
|
|
137
|
+
CategoricalLabels
|
|
138
|
+
> = z.object({
|
|
139
|
+
value: z.string(),
|
|
140
|
+
description: z.string().optional(),
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
export function categoricalLabelsToJSON(
|
|
144
|
+
categoricalLabels: CategoricalLabels,
|
|
145
|
+
): string {
|
|
146
|
+
return JSON.stringify(
|
|
147
|
+
CategoricalLabels$outboundSchema.parse(categoricalLabels),
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const UpdateEvalMode$outboundSchema: z.ZodNativeEnum<
|
|
153
|
+
typeof UpdateEvalMode
|
|
154
|
+
> = z.nativeEnum(UpdateEvalMode);
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export type UpdateEvalRetry$Outbound = {
|
|
158
|
+
count: number;
|
|
159
|
+
on_codes?: Array<number> | undefined;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const UpdateEvalRetry$outboundSchema: z.ZodType<
|
|
164
|
+
UpdateEvalRetry$Outbound,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
UpdateEvalRetry
|
|
167
|
+
> = z.object({
|
|
168
|
+
count: z.number().int().default(2),
|
|
169
|
+
onCodes: z.array(z.number().int()).optional(),
|
|
170
|
+
}).transform((v) => {
|
|
171
|
+
return remap$(v, {
|
|
172
|
+
onCodes: "on_codes",
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
export function updateEvalRetryToJSON(
|
|
177
|
+
updateEvalRetry: UpdateEvalRetry,
|
|
178
|
+
): string {
|
|
179
|
+
return JSON.stringify(UpdateEvalRetry$outboundSchema.parse(updateEvalRetry));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** @internal */
|
|
183
|
+
export type UpdateEvalFallbacks$Outbound = {
|
|
184
|
+
model: string;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/** @internal */
|
|
188
|
+
export const UpdateEvalFallbacks$outboundSchema: z.ZodType<
|
|
189
|
+
UpdateEvalFallbacks$Outbound,
|
|
190
|
+
z.ZodTypeDef,
|
|
191
|
+
UpdateEvalFallbacks
|
|
192
|
+
> = z.object({
|
|
193
|
+
model: z.string(),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export function updateEvalFallbacksToJSON(
|
|
197
|
+
updateEvalFallbacks: UpdateEvalFallbacks,
|
|
198
|
+
): string {
|
|
199
|
+
return JSON.stringify(
|
|
200
|
+
UpdateEvalFallbacks$outboundSchema.parse(updateEvalFallbacks),
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export type Judges$Outbound = {
|
|
206
|
+
model: string;
|
|
207
|
+
retry?: UpdateEvalRetry$Outbound | undefined;
|
|
208
|
+
fallbacks?: Array<UpdateEvalFallbacks$Outbound> | undefined;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
/** @internal */
|
|
212
|
+
export const Judges$outboundSchema: z.ZodType<
|
|
213
|
+
Judges$Outbound,
|
|
214
|
+
z.ZodTypeDef,
|
|
215
|
+
Judges
|
|
216
|
+
> = z.object({
|
|
217
|
+
model: z.string(),
|
|
218
|
+
retry: z.lazy(() => UpdateEvalRetry$outboundSchema).optional(),
|
|
219
|
+
fallbacks: z.array(z.lazy(() => UpdateEvalFallbacks$outboundSchema))
|
|
220
|
+
.optional(),
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
export function judgesToJSON(judges: Judges): string {
|
|
224
|
+
return JSON.stringify(Judges$outboundSchema.parse(judges));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** @internal */
|
|
228
|
+
export type UpdateEvalEvalsRetry$Outbound = {
|
|
229
|
+
count: number;
|
|
230
|
+
on_codes?: Array<number> | undefined;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/** @internal */
|
|
234
|
+
export const UpdateEvalEvalsRetry$outboundSchema: z.ZodType<
|
|
235
|
+
UpdateEvalEvalsRetry$Outbound,
|
|
236
|
+
z.ZodTypeDef,
|
|
237
|
+
UpdateEvalEvalsRetry
|
|
238
|
+
> = z.object({
|
|
239
|
+
count: z.number().int().default(2),
|
|
240
|
+
onCodes: z.array(z.number().int()).optional(),
|
|
241
|
+
}).transform((v) => {
|
|
242
|
+
return remap$(v, {
|
|
243
|
+
onCodes: "on_codes",
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
export function updateEvalEvalsRetryToJSON(
|
|
248
|
+
updateEvalEvalsRetry: UpdateEvalEvalsRetry,
|
|
249
|
+
): string {
|
|
250
|
+
return JSON.stringify(
|
|
251
|
+
UpdateEvalEvalsRetry$outboundSchema.parse(updateEvalEvalsRetry),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export type UpdateEvalEvalsFallbacks$Outbound = {
|
|
257
|
+
model: string;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const UpdateEvalEvalsFallbacks$outboundSchema: z.ZodType<
|
|
262
|
+
UpdateEvalEvalsFallbacks$Outbound,
|
|
263
|
+
z.ZodTypeDef,
|
|
264
|
+
UpdateEvalEvalsFallbacks
|
|
265
|
+
> = z.object({
|
|
266
|
+
model: z.string(),
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
export function updateEvalEvalsFallbacksToJSON(
|
|
270
|
+
updateEvalEvalsFallbacks: UpdateEvalEvalsFallbacks,
|
|
271
|
+
): string {
|
|
272
|
+
return JSON.stringify(
|
|
273
|
+
UpdateEvalEvalsFallbacks$outboundSchema.parse(updateEvalEvalsFallbacks),
|
|
274
|
+
);
|
|
275
|
+
}
|
|
22
276
|
|
|
23
277
|
/** @internal */
|
|
24
|
-
export type
|
|
278
|
+
export type ReplacementJudges$Outbound = {
|
|
279
|
+
model: string;
|
|
280
|
+
retry?: UpdateEvalEvalsRetry$Outbound | undefined;
|
|
281
|
+
fallbacks?: Array<UpdateEvalEvalsFallbacks$Outbound> | undefined;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
/** @internal */
|
|
285
|
+
export const ReplacementJudges$outboundSchema: z.ZodType<
|
|
286
|
+
ReplacementJudges$Outbound,
|
|
287
|
+
z.ZodTypeDef,
|
|
288
|
+
ReplacementJudges
|
|
289
|
+
> = z.object({
|
|
290
|
+
model: z.string(),
|
|
291
|
+
retry: z.lazy(() => UpdateEvalEvalsRetry$outboundSchema).optional(),
|
|
292
|
+
fallbacks: z.array(z.lazy(() => UpdateEvalEvalsFallbacks$outboundSchema))
|
|
293
|
+
.optional(),
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
export function replacementJudgesToJSON(
|
|
297
|
+
replacementJudges: ReplacementJudges,
|
|
298
|
+
): string {
|
|
299
|
+
return JSON.stringify(
|
|
300
|
+
ReplacementJudges$outboundSchema.parse(replacementJudges),
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** @internal */
|
|
305
|
+
export const TieValue$outboundSchema: z.ZodNativeEnum<typeof TieValue> = z
|
|
306
|
+
.nativeEnum(TieValue);
|
|
307
|
+
|
|
308
|
+
/** @internal */
|
|
309
|
+
export type Jury$Outbound = {
|
|
310
|
+
judges: Array<Judges$Outbound>;
|
|
311
|
+
replacement_judges?: Array<ReplacementJudges$Outbound> | undefined;
|
|
312
|
+
min_successful_judges: number;
|
|
313
|
+
tie_value: string;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const Jury$outboundSchema: z.ZodType<Jury$Outbound, z.ZodTypeDef, Jury> =
|
|
318
|
+
z.object({
|
|
319
|
+
judges: z.array(z.lazy(() => Judges$outboundSchema)),
|
|
320
|
+
replacementJudges: z.array(z.lazy(() => ReplacementJudges$outboundSchema))
|
|
321
|
+
.optional(),
|
|
322
|
+
minSuccessfulJudges: z.number().int().default(2),
|
|
323
|
+
tieValue: TieValue$outboundSchema.default("Tie"),
|
|
324
|
+
}).transform((v) => {
|
|
325
|
+
return remap$(v, {
|
|
326
|
+
replacementJudges: "replacement_judges",
|
|
327
|
+
minSuccessfulJudges: "min_successful_judges",
|
|
328
|
+
tieValue: "tie_value",
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
export function juryToJSON(jury: Jury): string {
|
|
333
|
+
return JSON.stringify(Jury$outboundSchema.parse(jury));
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/** @internal */
|
|
337
|
+
export const UpdateEvalVersionIncrement$outboundSchema: z.ZodNativeEnum<
|
|
338
|
+
typeof UpdateEvalVersionIncrement
|
|
339
|
+
> = z.nativeEnum(UpdateEvalVersionIncrement);
|
|
340
|
+
|
|
341
|
+
/** @internal */
|
|
342
|
+
export type UpdateEvalRequestBody$Outbound = {
|
|
343
|
+
type?: string | undefined;
|
|
344
|
+
path?: string | undefined;
|
|
345
|
+
project_id?: string | undefined;
|
|
346
|
+
key?: string | undefined;
|
|
347
|
+
description?: string | undefined;
|
|
348
|
+
prompt?: string | undefined;
|
|
349
|
+
output_type?: string | undefined;
|
|
350
|
+
categories?: Array<string> | null | undefined;
|
|
351
|
+
categorical_labels?: Array<CategoricalLabels$Outbound> | null | undefined;
|
|
352
|
+
dataset_id?: string | null | undefined;
|
|
353
|
+
repetitions?: number | undefined;
|
|
354
|
+
mode?: string | undefined;
|
|
355
|
+
model?: string | undefined;
|
|
356
|
+
jury?: Jury$Outbound | undefined;
|
|
357
|
+
schema?: string | undefined;
|
|
358
|
+
url?: string | undefined;
|
|
359
|
+
method?: string | undefined;
|
|
360
|
+
headers?: { [k: string]: string } | undefined;
|
|
361
|
+
payload?: { [k: string]: any } | undefined;
|
|
362
|
+
code?: string | undefined;
|
|
363
|
+
guardrail_config?: any | undefined;
|
|
364
|
+
versionIncrement?: string | undefined;
|
|
365
|
+
versionDescription?: string | undefined;
|
|
366
|
+
};
|
|
25
367
|
|
|
26
368
|
/** @internal */
|
|
27
369
|
export const UpdateEvalRequestBody$outboundSchema: z.ZodType<
|
|
28
370
|
UpdateEvalRequestBody$Outbound,
|
|
29
371
|
z.ZodTypeDef,
|
|
30
372
|
UpdateEvalRequestBody
|
|
31
|
-
> = z.object({
|
|
373
|
+
> = z.object({
|
|
374
|
+
type: z.string().optional(),
|
|
375
|
+
path: z.string().optional(),
|
|
376
|
+
projectId: z.string().optional(),
|
|
377
|
+
key: z.string().optional(),
|
|
378
|
+
description: z.string().optional(),
|
|
379
|
+
prompt: z.string().optional(),
|
|
380
|
+
outputType: z.string().optional(),
|
|
381
|
+
categories: z.nullable(z.array(z.string())).optional(),
|
|
382
|
+
categoricalLabels: z.nullable(
|
|
383
|
+
z.array(z.lazy(() => CategoricalLabels$outboundSchema)),
|
|
384
|
+
).optional(),
|
|
385
|
+
datasetId: z.nullable(z.string()).optional(),
|
|
386
|
+
repetitions: z.number().optional(),
|
|
387
|
+
mode: UpdateEvalMode$outboundSchema.optional(),
|
|
388
|
+
model: z.string().optional(),
|
|
389
|
+
jury: z.lazy(() => Jury$outboundSchema).optional(),
|
|
390
|
+
schema: z.string().optional(),
|
|
391
|
+
url: z.string().optional(),
|
|
392
|
+
method: z.string().optional(),
|
|
393
|
+
headers: z.record(z.string()).optional(),
|
|
394
|
+
payload: z.record(z.any()).optional(),
|
|
395
|
+
code: z.string().optional(),
|
|
396
|
+
guardrailConfig: z.any().optional(),
|
|
397
|
+
versionIncrement: UpdateEvalVersionIncrement$outboundSchema.optional(),
|
|
398
|
+
versionDescription: z.string().optional(),
|
|
399
|
+
}).transform((v) => {
|
|
400
|
+
return remap$(v, {
|
|
401
|
+
projectId: "project_id",
|
|
402
|
+
outputType: "output_type",
|
|
403
|
+
categoricalLabels: "categorical_labels",
|
|
404
|
+
datasetId: "dataset_id",
|
|
405
|
+
guardrailConfig: "guardrail_config",
|
|
406
|
+
});
|
|
407
|
+
});
|
|
32
408
|
|
|
33
409
|
export function updateEvalRequestBodyToJSON(
|
|
34
410
|
updateEvalRequestBody: UpdateEvalRequestBody,
|
|
@@ -41,7 +417,7 @@ export function updateEvalRequestBodyToJSON(
|
|
|
41
417
|
/** @internal */
|
|
42
418
|
export type UpdateEvalRequest$Outbound = {
|
|
43
419
|
id: string;
|
|
44
|
-
RequestBody
|
|
420
|
+
RequestBody?: UpdateEvalRequestBody$Outbound | undefined;
|
|
45
421
|
};
|
|
46
422
|
|
|
47
423
|
/** @internal */
|
|
@@ -51,7 +427,7 @@ export const UpdateEvalRequest$outboundSchema: z.ZodType<
|
|
|
51
427
|
UpdateEvalRequest
|
|
52
428
|
> = z.object({
|
|
53
429
|
id: z.string(),
|
|
54
|
-
requestBody: z.lazy(() => UpdateEvalRequestBody$outboundSchema),
|
|
430
|
+
requestBody: z.lazy(() => UpdateEvalRequestBody$outboundSchema).optional(),
|
|
55
431
|
}).transform((v) => {
|
|
56
432
|
return remap$(v, {
|
|
57
433
|
requestBody: "RequestBody",
|
|
@@ -71,7 +447,15 @@ export const UpdateEvalResponseBody$inboundSchema: z.ZodType<
|
|
|
71
447
|
UpdateEvalResponseBody,
|
|
72
448
|
z.ZodTypeDef,
|
|
73
449
|
unknown
|
|
74
|
-
> = z.
|
|
450
|
+
> = z.union([
|
|
451
|
+
components.EvaluatorResponseLlm$inboundSchema,
|
|
452
|
+
components.EvaluatorResponseJsonSchema$inboundSchema,
|
|
453
|
+
components.EvaluatorResponseHttp$inboundSchema,
|
|
454
|
+
components.EvaluatorResponsePython$inboundSchema,
|
|
455
|
+
components.EvaluatorResponseFunction$inboundSchema,
|
|
456
|
+
components.EvaluatorResponseRagas$inboundSchema,
|
|
457
|
+
components.EvaluatorResponseTypescript$inboundSchema,
|
|
458
|
+
]);
|
|
75
459
|
|
|
76
460
|
export function updateEvalResponseBodyFromJSON(
|
|
77
461
|
jsonString: string,
|
|
@@ -1764,7 +1764,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
1764
1764
|
z.ZodTypeDef,
|
|
1765
1765
|
unknown
|
|
1766
1766
|
> = z.object({
|
|
1767
|
-
_id: z.string().default("
|
|
1767
|
+
_id: z.string().default("tool_01M2NEZRPPB1C7G37DGQHAR0SH"),
|
|
1768
1768
|
path: z.string(),
|
|
1769
1769
|
key: z.string(),
|
|
1770
1770
|
display_name: z.string().optional(),
|
|
@@ -1959,7 +1959,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
1959
1959
|
z.ZodTypeDef,
|
|
1960
1960
|
unknown
|
|
1961
1961
|
> = z.object({
|
|
1962
|
-
_id: z.string().default("
|
|
1962
|
+
_id: z.string().default("tool_01M2NEZRPN953H1NJ88W2QMFWT"),
|
|
1963
1963
|
path: z.string(),
|
|
1964
1964
|
key: z.string(),
|
|
1965
1965
|
display_name: z.string().optional(),
|
|
@@ -2054,7 +2054,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
2054
2054
|
z.ZodTypeDef,
|
|
2055
2055
|
unknown
|
|
2056
2056
|
> = z.object({
|
|
2057
|
-
_id: z.string().default("
|
|
2057
|
+
_id: z.string().default("tool_01M2NEZRPMJBH9F68JZ4WGMYBE"),
|
|
2058
2058
|
path: z.string(),
|
|
2059
2059
|
key: z.string(),
|
|
2060
2060
|
display_name: z.string().optional(),
|
|
@@ -2157,7 +2157,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
2157
2157
|
z.ZodTypeDef,
|
|
2158
2158
|
unknown
|
|
2159
2159
|
> = z.object({
|
|
2160
|
-
_id: z.string().default("
|
|
2160
|
+
_id: z.string().default("tool_01M2NEZRPMP45T3PCQERHP6BPN"),
|
|
2161
2161
|
path: z.string(),
|
|
2162
2162
|
key: z.string(),
|
|
2163
2163
|
display_name: z.string().optional(),
|
package/src/sdk/evals.ts
CHANGED
|
@@ -25,7 +25,7 @@ export class Evals extends ClientSDK {
|
|
|
25
25
|
async all(
|
|
26
26
|
request?: operations.GetEvalsRequest | undefined,
|
|
27
27
|
options?: RequestOptions,
|
|
28
|
-
): Promise<
|
|
28
|
+
): Promise<operations.GetEvalsResponseBody> {
|
|
29
29
|
return unwrapAsync(evalsAll(
|
|
30
30
|
this,
|
|
31
31
|
request,
|
|
@@ -40,7 +40,7 @@ export class Evals extends ClientSDK {
|
|
|
40
40
|
* Create a new evaluator in the workspace.
|
|
41
41
|
*/
|
|
42
42
|
async create(
|
|
43
|
-
request
|
|
43
|
+
request?: operations.CreateEvalRequestBody | undefined,
|
|
44
44
|
options?: RequestOptions,
|
|
45
45
|
): Promise<operations.CreateEvalResponseBody> {
|
|
46
46
|
return unwrapAsync(evalsCreate(
|
|
@@ -76,7 +76,7 @@ export class Evals extends ClientSDK {
|
|
|
76
76
|
async delete(
|
|
77
77
|
request: operations.DeleteEvalRequest,
|
|
78
78
|
options?: RequestOptions,
|
|
79
|
-
): Promise<
|
|
79
|
+
): Promise<void> {
|
|
80
80
|
return unwrapAsync(evalsDelete(
|
|
81
81
|
this,
|
|
82
82
|
request,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type DeleteEvaluatorResponse = {};
|
|
5
|
-
/** @internal */
|
|
6
|
-
export declare const DeleteEvaluatorResponse$inboundSchema: z.ZodType<DeleteEvaluatorResponse, z.ZodTypeDef, unknown>;
|
|
7
|
-
export declare function deleteEvaluatorResponseFromJSON(jsonString: string): SafeParseResult<DeleteEvaluatorResponse, SDKValidationError>;
|
|
8
|
-
//# sourceMappingURL=deleteevaluatorresponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteevaluatorresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/deleteevaluatorresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEzC,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,uBAAuB,EACvB,CAAC,CAAC,UAAU,EACZ,OAAO,CACO,CAAC;AAEjB,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteevaluatorresponse.js","sourceRoot":"","sources":["../../src/models/components/deleteevaluatorresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBH,0EAQC;AAtBD,0CAA4B;AAC5B,qDAAiD;AAMjD,gBAAgB;AACH,QAAA,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB,SAAgB,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,6CAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type ListEvaluatorsResponseData = {};
|
|
5
|
-
export type ListEvaluatorsResponse = {
|
|
6
|
-
object: string;
|
|
7
|
-
data: Array<ListEvaluatorsResponseData>;
|
|
8
|
-
hasMore: boolean;
|
|
9
|
-
};
|
|
10
|
-
/** @internal */
|
|
11
|
-
export declare const ListEvaluatorsResponseData$inboundSchema: z.ZodType<ListEvaluatorsResponseData, z.ZodTypeDef, unknown>;
|
|
12
|
-
export declare function listEvaluatorsResponseDataFromJSON(jsonString: string): SafeParseResult<ListEvaluatorsResponseData, SDKValidationError>;
|
|
13
|
-
/** @internal */
|
|
14
|
-
export declare const ListEvaluatorsResponse$inboundSchema: z.ZodType<ListEvaluatorsResponse, z.ZodTypeDef, unknown>;
|
|
15
|
-
export declare function listEvaluatorsResponseFromJSON(jsonString: string): SafeParseResult<ListEvaluatorsResponse, SDKValidationError>;
|
|
16
|
-
//# sourceMappingURL=listevaluatorsresponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listevaluatorsresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/listevaluatorsresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE5C,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,OAAO,CACO,CAAC;AAEjB,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAMjE;AAED,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listevaluatorsresponse.js","sourceRoot":"","sources":["../../src/models/components/listevaluatorsresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBH,gFAQC;AAiBD,wEAQC;AAtDD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAYjD,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB,SAAgB,kCAAkC,CAChD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gDAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC;AAED,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gDAAwC,CAAC,CAAC;IACrE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,SAAS;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
export type DeleteEvaluatorResponse = {};
|
|
11
|
-
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const DeleteEvaluatorResponse$inboundSchema: z.ZodType<
|
|
14
|
-
DeleteEvaluatorResponse,
|
|
15
|
-
z.ZodTypeDef,
|
|
16
|
-
unknown
|
|
17
|
-
> = z.object({});
|
|
18
|
-
|
|
19
|
-
export function deleteEvaluatorResponseFromJSON(
|
|
20
|
-
jsonString: string,
|
|
21
|
-
): SafeParseResult<DeleteEvaluatorResponse, SDKValidationError> {
|
|
22
|
-
return safeParse(
|
|
23
|
-
jsonString,
|
|
24
|
-
(x) => DeleteEvaluatorResponse$inboundSchema.parse(JSON.parse(x)),
|
|
25
|
-
`Failed to parse 'DeleteEvaluatorResponse' from JSON`,
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
-
export type ListEvaluatorsResponseData = {};
|
|
12
|
-
|
|
13
|
-
export type ListEvaluatorsResponse = {
|
|
14
|
-
object: string;
|
|
15
|
-
data: Array<ListEvaluatorsResponseData>;
|
|
16
|
-
hasMore: boolean;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/** @internal */
|
|
20
|
-
export const ListEvaluatorsResponseData$inboundSchema: z.ZodType<
|
|
21
|
-
ListEvaluatorsResponseData,
|
|
22
|
-
z.ZodTypeDef,
|
|
23
|
-
unknown
|
|
24
|
-
> = z.object({});
|
|
25
|
-
|
|
26
|
-
export function listEvaluatorsResponseDataFromJSON(
|
|
27
|
-
jsonString: string,
|
|
28
|
-
): SafeParseResult<ListEvaluatorsResponseData, SDKValidationError> {
|
|
29
|
-
return safeParse(
|
|
30
|
-
jsonString,
|
|
31
|
-
(x) => ListEvaluatorsResponseData$inboundSchema.parse(JSON.parse(x)),
|
|
32
|
-
`Failed to parse 'ListEvaluatorsResponseData' from JSON`,
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const ListEvaluatorsResponse$inboundSchema: z.ZodType<
|
|
38
|
-
ListEvaluatorsResponse,
|
|
39
|
-
z.ZodTypeDef,
|
|
40
|
-
unknown
|
|
41
|
-
> = z.object({
|
|
42
|
-
object: z.string(),
|
|
43
|
-
data: z.array(z.lazy(() => ListEvaluatorsResponseData$inboundSchema)),
|
|
44
|
-
has_more: z.boolean(),
|
|
45
|
-
}).transform((v) => {
|
|
46
|
-
return remap$(v, {
|
|
47
|
-
"has_more": "hasMore",
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export function listEvaluatorsResponseFromJSON(
|
|
52
|
-
jsonString: string,
|
|
53
|
-
): SafeParseResult<ListEvaluatorsResponse, SDKValidationError> {
|
|
54
|
-
return safeParse(
|
|
55
|
-
jsonString,
|
|
56
|
-
(x) => ListEvaluatorsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
-
`Failed to parse 'ListEvaluatorsResponse' from JSON`,
|
|
58
|
-
);
|
|
59
|
-
}
|