@orq-ai/node 4.16.0-rc.2 → 4.16.0-rc.4
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 +43 -35
- package/funcs/routerClassifyCreate.d.ts +18 -0
- package/funcs/routerClassifyCreate.d.ts.map +1 -0
- package/funcs/routerClassifyCreate.js +119 -0
- package/funcs/routerClassifyCreate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/classifyanswer.d.ts +56 -0
- package/models/components/classifyanswer.d.ts.map +1 -0
- package/models/components/classifyanswer.js +66 -0
- package/models/components/classifyanswer.js.map +1 -0
- package/models/components/classifyretryconfig.d.ts +20 -0
- package/models/components/classifyretryconfig.d.ts.map +1 -0
- package/models/components/classifyretryconfig.js +55 -0
- package/models/components/classifyretryconfig.js.map +1 -0
- package/models/components/classifyusage.d.ts +29 -0
- package/models/components/classifyusage.d.ts.map +1 -0
- package/models/components/classifyusage.js +63 -0
- package/models/components/classifyusage.js.map +1 -0
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/modelmetadata.d.ts +2 -0
- package/models/components/modelmetadata.d.ts.map +1 -1
- package/models/components/modelmetadata.js +4 -0
- package/models/components/modelmetadata.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/errors/createclassify.d.ts +67 -0
- package/models/errors/createclassify.d.ts.map +1 -0
- package/models/errors/createclassify.js +127 -0
- package/models/errors/createclassify.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/createclassify.d.ts +231 -0
- package/models/operations/createclassify.d.ts.map +1 -0
- package/models/operations/createclassify.js +144 -0
- package/models/operations/createclassify.js.map +1 -0
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createprompt.d.ts +2 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +2 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/deploymentgetconfig.d.ts +1 -0
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +1 -0
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +1 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +1 -0
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +2 -0
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +2 -0
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +1 -0
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +1 -0
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/getallprompts.d.ts +2 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +2 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getoneprompt.d.ts +2 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +2 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +2 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +2 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listpromptversions.d.ts +2 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +2 -0
- package/models/operations/listpromptversions.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/updateprompt.d.ts +2 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +2 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +1 -1
- package/sdk/classify.d.ts +12 -0
- package/sdk/classify.d.ts.map +1 -0
- package/sdk/classify.js +22 -0
- package/sdk/classify.js.map +1 -0
- package/sdk/router.d.ts +3 -0
- package/sdk/router.d.ts.map +1 -1
- package/sdk/router.js +4 -0
- package/sdk/router.js.map +1 -1
- package/src/funcs/routerClassifyCreate.ts +185 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/classifyanswer.ts +83 -0
- package/src/models/components/classifyretryconfig.ts +45 -0
- package/src/models/components/classifyusage.ts +63 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/modelmetadata.ts +6 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/errors/createclassify.ts +155 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createclassify.ts +371 -0
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createprompt.ts +2 -0
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deploymentgetconfig.ts +1 -0
- package/src/models/operations/deploymentinvoke.ts +1 -0
- package/src/models/operations/deployments.ts +2 -0
- package/src/models/operations/deploymentstream.ts +1 -0
- package/src/models/operations/getallprompts.ts +2 -0
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getoneprompt.ts +2 -0
- package/src/models/operations/getpromptversion.ts +2 -0
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listpromptversions.ts +2 -0
- 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/updateprompt.ts +2 -0
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/classify.ts +27 -0
- package/src/sdk/router.ts +6 -0
|
@@ -0,0 +1,371 @@
|
|
|
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 * as components from "../components/index.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
13
|
+
*/
|
|
14
|
+
export type CreateClassifyQuestionsInstructions =
|
|
15
|
+
| string
|
|
16
|
+
| { [k: string]: any }
|
|
17
|
+
| Array<any>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Places the state on an ordered scale and returns the probability of each level.
|
|
21
|
+
*/
|
|
22
|
+
export type ScoreQuestion = {
|
|
23
|
+
/**
|
|
24
|
+
* Ordered level descriptions from lowest to highest. At least two levels.
|
|
25
|
+
*/
|
|
26
|
+
criteria: Array<string>;
|
|
27
|
+
/**
|
|
28
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
29
|
+
*/
|
|
30
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
31
|
+
type: "score";
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
36
|
+
*/
|
|
37
|
+
export type QuestionsInstructions = string | { [k: string]: any } | Array<any>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Picks one of the given options and returns the probability of each.
|
|
41
|
+
*/
|
|
42
|
+
export type ChoiceQuestion = {
|
|
43
|
+
/**
|
|
44
|
+
* Options keyed by name, each mapped to a description or null.
|
|
45
|
+
*/
|
|
46
|
+
criteria: { [k: string]: string | null };
|
|
47
|
+
/**
|
|
48
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
49
|
+
*/
|
|
50
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
51
|
+
type: "choice";
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Optional descriptions of what true and false mean.
|
|
56
|
+
*/
|
|
57
|
+
export type Criteria = {
|
|
58
|
+
false?: string | undefined;
|
|
59
|
+
true?: string | undefined;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
64
|
+
*/
|
|
65
|
+
export type Instructions = string | { [k: string]: any } | Array<any>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Answers with a probability between 0 and 1 that the statement holds.
|
|
69
|
+
*/
|
|
70
|
+
export type NoulQuestion = {
|
|
71
|
+
/**
|
|
72
|
+
* Optional descriptions of what true and false mean.
|
|
73
|
+
*/
|
|
74
|
+
criteria?: Criteria | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
77
|
+
*/
|
|
78
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
79
|
+
type: "noul";
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export type Questions = NoulQuestion | ChoiceQuestion | ScoreQuestion;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The content to evaluate. A string, an object or an array.
|
|
86
|
+
*/
|
|
87
|
+
export type State = string | { [k: string]: any } | Array<any>;
|
|
88
|
+
|
|
89
|
+
export type CreateClassifyRequestBody = {
|
|
90
|
+
identity?: components.ResponseIdentity | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Key-value metadata attached to the trace.
|
|
93
|
+
*/
|
|
94
|
+
metadata?: { [k: string]: string } | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* ID of the classify model to use, for example typesafe/jev-latest.
|
|
97
|
+
*/
|
|
98
|
+
model: string;
|
|
99
|
+
/**
|
|
100
|
+
* The name to display on the trace. If not specified, the default system name will be used.
|
|
101
|
+
*/
|
|
102
|
+
name?: string | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Typed questions keyed by an identifier of your choice. Each answer is returned under the same key.
|
|
105
|
+
*/
|
|
106
|
+
questions: { [k: string]: NoulQuestion | ChoiceQuestion | ScoreQuestion };
|
|
107
|
+
retry?: components.ClassifyRetryConfig | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* The content to evaluate. A string, an object or an array.
|
|
110
|
+
*/
|
|
111
|
+
state: string | { [k: string]: any } | Array<any>;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Returns one answer per question.
|
|
116
|
+
*/
|
|
117
|
+
export type CreateClassifyResponseBody = {
|
|
118
|
+
/**
|
|
119
|
+
* Answers keyed by the question identifiers from the request.
|
|
120
|
+
*/
|
|
121
|
+
answers: { [k: string]: components.ClassifyAnswer };
|
|
122
|
+
/**
|
|
123
|
+
* The model that served the request, for example typesafe/jev-latest.
|
|
124
|
+
*/
|
|
125
|
+
model: string;
|
|
126
|
+
usage: components.ClassifyUsage;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export type CreateClassifyQuestionsInstructions$Outbound = string | {
|
|
131
|
+
[k: string]: any;
|
|
132
|
+
} | Array<any>;
|
|
133
|
+
|
|
134
|
+
/** @internal */
|
|
135
|
+
export const CreateClassifyQuestionsInstructions$outboundSchema: z.ZodType<
|
|
136
|
+
CreateClassifyQuestionsInstructions$Outbound,
|
|
137
|
+
z.ZodTypeDef,
|
|
138
|
+
CreateClassifyQuestionsInstructions
|
|
139
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
140
|
+
|
|
141
|
+
export function createClassifyQuestionsInstructionsToJSON(
|
|
142
|
+
createClassifyQuestionsInstructions: CreateClassifyQuestionsInstructions,
|
|
143
|
+
): string {
|
|
144
|
+
return JSON.stringify(
|
|
145
|
+
CreateClassifyQuestionsInstructions$outboundSchema.parse(
|
|
146
|
+
createClassifyQuestionsInstructions,
|
|
147
|
+
),
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export type ScoreQuestion$Outbound = {
|
|
153
|
+
criteria: Array<string>;
|
|
154
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
155
|
+
type: "score";
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/** @internal */
|
|
159
|
+
export const ScoreQuestion$outboundSchema: z.ZodType<
|
|
160
|
+
ScoreQuestion$Outbound,
|
|
161
|
+
z.ZodTypeDef,
|
|
162
|
+
ScoreQuestion
|
|
163
|
+
> = z.object({
|
|
164
|
+
criteria: z.array(z.string()),
|
|
165
|
+
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
166
|
+
type: z.literal("score"),
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export function scoreQuestionToJSON(scoreQuestion: ScoreQuestion): string {
|
|
170
|
+
return JSON.stringify(ScoreQuestion$outboundSchema.parse(scoreQuestion));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export type QuestionsInstructions$Outbound =
|
|
175
|
+
| string
|
|
176
|
+
| { [k: string]: any }
|
|
177
|
+
| Array<any>;
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
export const QuestionsInstructions$outboundSchema: z.ZodType<
|
|
181
|
+
QuestionsInstructions$Outbound,
|
|
182
|
+
z.ZodTypeDef,
|
|
183
|
+
QuestionsInstructions
|
|
184
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
185
|
+
|
|
186
|
+
export function questionsInstructionsToJSON(
|
|
187
|
+
questionsInstructions: QuestionsInstructions,
|
|
188
|
+
): string {
|
|
189
|
+
return JSON.stringify(
|
|
190
|
+
QuestionsInstructions$outboundSchema.parse(questionsInstructions),
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** @internal */
|
|
195
|
+
export type ChoiceQuestion$Outbound = {
|
|
196
|
+
criteria: { [k: string]: string | null };
|
|
197
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
198
|
+
type: "choice";
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/** @internal */
|
|
202
|
+
export const ChoiceQuestion$outboundSchema: z.ZodType<
|
|
203
|
+
ChoiceQuestion$Outbound,
|
|
204
|
+
z.ZodTypeDef,
|
|
205
|
+
ChoiceQuestion
|
|
206
|
+
> = z.object({
|
|
207
|
+
criteria: z.record(z.nullable(z.string())),
|
|
208
|
+
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
209
|
+
type: z.literal("choice"),
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
export function choiceQuestionToJSON(choiceQuestion: ChoiceQuestion): string {
|
|
213
|
+
return JSON.stringify(ChoiceQuestion$outboundSchema.parse(choiceQuestion));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** @internal */
|
|
217
|
+
export type Criteria$Outbound = {
|
|
218
|
+
false?: string | undefined;
|
|
219
|
+
true?: string | undefined;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const Criteria$outboundSchema: z.ZodType<
|
|
224
|
+
Criteria$Outbound,
|
|
225
|
+
z.ZodTypeDef,
|
|
226
|
+
Criteria
|
|
227
|
+
> = z.object({
|
|
228
|
+
false: z.string().optional(),
|
|
229
|
+
true: z.string().optional(),
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
export function criteriaToJSON(criteria: Criteria): string {
|
|
233
|
+
return JSON.stringify(Criteria$outboundSchema.parse(criteria));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** @internal */
|
|
237
|
+
export type Instructions$Outbound = string | { [k: string]: any } | Array<any>;
|
|
238
|
+
|
|
239
|
+
/** @internal */
|
|
240
|
+
export const Instructions$outboundSchema: z.ZodType<
|
|
241
|
+
Instructions$Outbound,
|
|
242
|
+
z.ZodTypeDef,
|
|
243
|
+
Instructions
|
|
244
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
245
|
+
|
|
246
|
+
export function instructionsToJSON(instructions: Instructions): string {
|
|
247
|
+
return JSON.stringify(Instructions$outboundSchema.parse(instructions));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
export type NoulQuestion$Outbound = {
|
|
252
|
+
criteria?: Criteria$Outbound | undefined;
|
|
253
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
254
|
+
type: "noul";
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
/** @internal */
|
|
258
|
+
export const NoulQuestion$outboundSchema: z.ZodType<
|
|
259
|
+
NoulQuestion$Outbound,
|
|
260
|
+
z.ZodTypeDef,
|
|
261
|
+
NoulQuestion
|
|
262
|
+
> = z.object({
|
|
263
|
+
criteria: z.lazy(() => Criteria$outboundSchema).optional(),
|
|
264
|
+
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
265
|
+
type: z.literal("noul"),
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
export function noulQuestionToJSON(noulQuestion: NoulQuestion): string {
|
|
269
|
+
return JSON.stringify(NoulQuestion$outboundSchema.parse(noulQuestion));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** @internal */
|
|
273
|
+
export type Questions$Outbound =
|
|
274
|
+
| NoulQuestion$Outbound
|
|
275
|
+
| ChoiceQuestion$Outbound
|
|
276
|
+
| ScoreQuestion$Outbound;
|
|
277
|
+
|
|
278
|
+
/** @internal */
|
|
279
|
+
export const Questions$outboundSchema: z.ZodType<
|
|
280
|
+
Questions$Outbound,
|
|
281
|
+
z.ZodTypeDef,
|
|
282
|
+
Questions
|
|
283
|
+
> = z.union([
|
|
284
|
+
z.lazy(() => NoulQuestion$outboundSchema),
|
|
285
|
+
z.lazy(() => ChoiceQuestion$outboundSchema),
|
|
286
|
+
z.lazy(() => ScoreQuestion$outboundSchema),
|
|
287
|
+
]);
|
|
288
|
+
|
|
289
|
+
export function questionsToJSON(questions: Questions): string {
|
|
290
|
+
return JSON.stringify(Questions$outboundSchema.parse(questions));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export type State$Outbound = string | { [k: string]: any } | Array<any>;
|
|
295
|
+
|
|
296
|
+
/** @internal */
|
|
297
|
+
export const State$outboundSchema: z.ZodType<
|
|
298
|
+
State$Outbound,
|
|
299
|
+
z.ZodTypeDef,
|
|
300
|
+
State
|
|
301
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
302
|
+
|
|
303
|
+
export function stateToJSON(state: State): string {
|
|
304
|
+
return JSON.stringify(State$outboundSchema.parse(state));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** @internal */
|
|
308
|
+
export type CreateClassifyRequestBody$Outbound = {
|
|
309
|
+
identity?: components.ResponseIdentity$Outbound | undefined;
|
|
310
|
+
metadata?: { [k: string]: string } | undefined;
|
|
311
|
+
model: string;
|
|
312
|
+
name?: string | undefined;
|
|
313
|
+
questions: {
|
|
314
|
+
[k: string]:
|
|
315
|
+
| NoulQuestion$Outbound
|
|
316
|
+
| ChoiceQuestion$Outbound
|
|
317
|
+
| ScoreQuestion$Outbound;
|
|
318
|
+
};
|
|
319
|
+
retry?: components.ClassifyRetryConfig$Outbound | undefined;
|
|
320
|
+
state: string | { [k: string]: any } | Array<any>;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
325
|
+
CreateClassifyRequestBody$Outbound,
|
|
326
|
+
z.ZodTypeDef,
|
|
327
|
+
CreateClassifyRequestBody
|
|
328
|
+
> = z.object({
|
|
329
|
+
identity: components.ResponseIdentity$outboundSchema.optional(),
|
|
330
|
+
metadata: z.record(z.string()).optional(),
|
|
331
|
+
model: z.string(),
|
|
332
|
+
name: z.string().optional(),
|
|
333
|
+
questions: z.record(
|
|
334
|
+
z.union([
|
|
335
|
+
z.lazy(() => NoulQuestion$outboundSchema),
|
|
336
|
+
z.lazy(() => ChoiceQuestion$outboundSchema),
|
|
337
|
+
z.lazy(() => ScoreQuestion$outboundSchema),
|
|
338
|
+
]),
|
|
339
|
+
),
|
|
340
|
+
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
341
|
+
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
export function createClassifyRequestBodyToJSON(
|
|
345
|
+
createClassifyRequestBody: CreateClassifyRequestBody,
|
|
346
|
+
): string {
|
|
347
|
+
return JSON.stringify(
|
|
348
|
+
CreateClassifyRequestBody$outboundSchema.parse(createClassifyRequestBody),
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** @internal */
|
|
353
|
+
export const CreateClassifyResponseBody$inboundSchema: z.ZodType<
|
|
354
|
+
CreateClassifyResponseBody,
|
|
355
|
+
z.ZodTypeDef,
|
|
356
|
+
unknown
|
|
357
|
+
> = z.object({
|
|
358
|
+
answers: z.record(components.ClassifyAnswer$inboundSchema),
|
|
359
|
+
model: z.string(),
|
|
360
|
+
usage: components.ClassifyUsage$inboundSchema,
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
export function createClassifyResponseBodyFromJSON(
|
|
364
|
+
jsonString: string,
|
|
365
|
+
): SafeParseResult<CreateClassifyResponseBody, SDKValidationError> {
|
|
366
|
+
return safeParse(
|
|
367
|
+
jsonString,
|
|
368
|
+
(x) => CreateClassifyResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
369
|
+
`Failed to parse 'CreateClassifyResponseBody' from JSON`,
|
|
370
|
+
);
|
|
371
|
+
}
|
|
@@ -138,7 +138,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
138
138
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
139
139
|
.optional(),
|
|
140
140
|
updated: z.string().datetime({ offset: true }).default(
|
|
141
|
-
"2026-09-
|
|
141
|
+
"2026-09-18T12:12:53.053Z",
|
|
142
142
|
).transform(v => new Date(v)),
|
|
143
143
|
}).transform((v) => {
|
|
144
144
|
return remap$(v, {
|
|
@@ -2739,7 +2739,7 @@ export const Evaluations4$inboundSchema: z.ZodType<
|
|
|
2739
2739
|
explanation: z.string().optional(),
|
|
2740
2740
|
reviewed_by_id: z.string(),
|
|
2741
2741
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
2742
|
-
"2026-09-
|
|
2742
|
+
"2026-09-18T12:12:58.404Z",
|
|
2743
2743
|
).transform(v => new Date(v)),
|
|
2744
2744
|
type: z.literal("string_array"),
|
|
2745
2745
|
values: z.array(z.string()),
|
|
@@ -2829,7 +2829,7 @@ export const CreateDatasetItemEvaluations3$inboundSchema: z.ZodType<
|
|
|
2829
2829
|
explanation: z.string().optional(),
|
|
2830
2830
|
reviewed_by_id: z.string(),
|
|
2831
2831
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
2832
|
-
"2026-09-
|
|
2832
|
+
"2026-09-18T12:12:58.404Z",
|
|
2833
2833
|
).transform(v => new Date(v)),
|
|
2834
2834
|
type: z.literal("boolean"),
|
|
2835
2835
|
value: z.boolean(),
|
|
@@ -2914,7 +2914,7 @@ export const Evaluations2$inboundSchema: z.ZodType<
|
|
|
2914
2914
|
explanation: z.string().optional(),
|
|
2915
2915
|
reviewed_by_id: z.string(),
|
|
2916
2916
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
2917
|
-
"2026-09-
|
|
2917
|
+
"2026-09-18T12:12:58.404Z",
|
|
2918
2918
|
).transform(v => new Date(v)),
|
|
2919
2919
|
type: z.literal("number"),
|
|
2920
2920
|
value: z.number(),
|
|
@@ -3000,7 +3000,7 @@ export const Evaluations1$inboundSchema: z.ZodType<
|
|
|
3000
3000
|
explanation: z.string().optional(),
|
|
3001
3001
|
reviewed_by_id: z.string(),
|
|
3002
3002
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
3003
|
-
"2026-09-
|
|
3003
|
+
"2026-09-18T12:12:58.403Z",
|
|
3004
3004
|
).transform(v => new Date(v)),
|
|
3005
3005
|
type: z.literal("string"),
|
|
3006
3006
|
value: z.string(),
|
|
@@ -3087,7 +3087,7 @@ export const ResponseBody$inboundSchema: z.ZodType<
|
|
|
3087
3087
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
3088
3088
|
.optional(),
|
|
3089
3089
|
updated: z.string().datetime({ offset: true }).default(
|
|
3090
|
-
"2026-09-
|
|
3090
|
+
"2026-09-18T12:12:53.053Z",
|
|
3091
3091
|
).transform(v => new Date(v)),
|
|
3092
3092
|
}).transform((v) => {
|
|
3093
3093
|
return remap$(v, {
|
|
@@ -994,6 +994,7 @@ export const ModelType = {
|
|
|
994
994
|
Rerank: "rerank",
|
|
995
995
|
Ocr: "ocr",
|
|
996
996
|
Moderation: "moderation",
|
|
997
|
+
Classify: "classify",
|
|
997
998
|
Vision: "vision",
|
|
998
999
|
} as const;
|
|
999
1000
|
/**
|
|
@@ -1397,6 +1398,7 @@ export const CreatePromptProvider = {
|
|
|
1397
1398
|
Reson8: "reson8",
|
|
1398
1399
|
Meta: "meta",
|
|
1399
1400
|
Greenpt: "greenpt",
|
|
1401
|
+
Typesafe: "typesafe",
|
|
1400
1402
|
Slack: "slack",
|
|
1401
1403
|
Orq: "orq",
|
|
1402
1404
|
} as const;
|
|
@@ -1575,7 +1575,7 @@ export const ResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
1575
1575
|
z.ZodTypeDef,
|
|
1576
1576
|
unknown
|
|
1577
1577
|
> = z.object({
|
|
1578
|
-
_id: z.string().default("
|
|
1578
|
+
_id: z.string().default("tool_01M2T6Y9MJ8S1W3FMMDDD5K1BV"),
|
|
1579
1579
|
path: z.string(),
|
|
1580
1580
|
key: z.string(),
|
|
1581
1581
|
display_name: z.string().optional(),
|
|
@@ -1761,7 +1761,7 @@ export const ResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
1761
1761
|
z.ZodTypeDef,
|
|
1762
1762
|
unknown
|
|
1763
1763
|
> = z.object({
|
|
1764
|
-
_id: z.string().default("
|
|
1764
|
+
_id: z.string().default("tool_01M2T6Y9MHFP289802GR0DQBAS"),
|
|
1765
1765
|
path: z.string(),
|
|
1766
1766
|
key: z.string(),
|
|
1767
1767
|
display_name: z.string().optional(),
|
|
@@ -1854,7 +1854,7 @@ export const ResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
1854
1854
|
z.ZodTypeDef,
|
|
1855
1855
|
unknown
|
|
1856
1856
|
> = z.object({
|
|
1857
|
-
_id: z.string().default("
|
|
1857
|
+
_id: z.string().default("tool_01M2T6Y9MH8TXHT097F4PAEN7C"),
|
|
1858
1858
|
path: z.string(),
|
|
1859
1859
|
key: z.string(),
|
|
1860
1860
|
display_name: z.string().optional(),
|
|
@@ -1955,7 +1955,7 @@ export const ResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
1955
1955
|
z.ZodTypeDef,
|
|
1956
1956
|
unknown
|
|
1957
1957
|
> = z.object({
|
|
1958
|
-
_id: z.string().default("
|
|
1958
|
+
_id: z.string().default("tool_01M2T6Y9MGCCZFNE4Y40962D38"),
|
|
1959
1959
|
path: z.string(),
|
|
1960
1960
|
key: z.string(),
|
|
1961
1961
|
display_name: z.string().optional(),
|
|
@@ -104,6 +104,7 @@ export const DeploymentsModelType = {
|
|
|
104
104
|
Rerank: "rerank",
|
|
105
105
|
Ocr: "ocr",
|
|
106
106
|
Moderation: "moderation",
|
|
107
|
+
Classify: "classify",
|
|
107
108
|
Vision: "vision",
|
|
108
109
|
} as const;
|
|
109
110
|
/**
|
|
@@ -497,6 +498,7 @@ export const DeploymentsProvider = {
|
|
|
497
498
|
Reson8: "reson8",
|
|
498
499
|
Meta: "meta",
|
|
499
500
|
Greenpt: "greenpt",
|
|
501
|
+
Typesafe: "typesafe",
|
|
500
502
|
Slack: "slack",
|
|
501
503
|
Orq: "orq",
|
|
502
504
|
} as const;
|
|
@@ -48,6 +48,7 @@ export const GetAllPromptsModelType = {
|
|
|
48
48
|
Rerank: "rerank",
|
|
49
49
|
Ocr: "ocr",
|
|
50
50
|
Moderation: "moderation",
|
|
51
|
+
Classify: "classify",
|
|
51
52
|
Vision: "vision",
|
|
52
53
|
} as const;
|
|
53
54
|
/**
|
|
@@ -448,6 +449,7 @@ export const GetAllPromptsProvider = {
|
|
|
448
449
|
Reson8: "reson8",
|
|
449
450
|
Meta: "meta",
|
|
450
451
|
Greenpt: "greenpt",
|
|
452
|
+
Typesafe: "typesafe",
|
|
451
453
|
Slack: "slack",
|
|
452
454
|
Orq: "orq",
|
|
453
455
|
} as const;
|
|
@@ -639,7 +639,7 @@ export const DataCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
639
639
|
z.ZodTypeDef,
|
|
640
640
|
unknown
|
|
641
641
|
> = z.object({
|
|
642
|
-
_id: z.string().default("
|
|
642
|
+
_id: z.string().default("tool_01M2T6Y9ME6JQFPJX36XNVRPA0"),
|
|
643
643
|
path: z.string(),
|
|
644
644
|
key: z.string(),
|
|
645
645
|
display_name: z.string().optional(),
|
|
@@ -821,7 +821,7 @@ export const DataHTTPTool$inboundSchema: z.ZodType<
|
|
|
821
821
|
z.ZodTypeDef,
|
|
822
822
|
unknown
|
|
823
823
|
> = z.object({
|
|
824
|
-
_id: z.string().default("
|
|
824
|
+
_id: z.string().default("tool_01M2T6Y9MEZ91X4M3S1FVZPT25"),
|
|
825
825
|
path: z.string(),
|
|
826
826
|
key: z.string(),
|
|
827
827
|
display_name: z.string().optional(),
|
|
@@ -914,7 +914,7 @@ export const DataJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
914
914
|
z.ZodTypeDef,
|
|
915
915
|
unknown
|
|
916
916
|
> = z.object({
|
|
917
|
-
_id: z.string().default("
|
|
917
|
+
_id: z.string().default("tool_01M2T6Y9MD5XGKA3PA7KQ7JSMP"),
|
|
918
918
|
path: z.string(),
|
|
919
919
|
key: z.string(),
|
|
920
920
|
display_name: z.string().optional(),
|
|
@@ -1012,7 +1012,7 @@ export const DataFunctionTool$inboundSchema: z.ZodType<
|
|
|
1012
1012
|
z.ZodTypeDef,
|
|
1013
1013
|
unknown
|
|
1014
1014
|
> = z.object({
|
|
1015
|
-
_id: z.string().default("
|
|
1015
|
+
_id: z.string().default("tool_01M2T6Y9MDJ2W3PZ8T9F8BEAVV"),
|
|
1016
1016
|
path: z.string(),
|
|
1017
1017
|
key: z.string(),
|
|
1018
1018
|
display_name: z.string().optional(),
|
|
@@ -35,6 +35,7 @@ export const GetOnePromptModelType = {
|
|
|
35
35
|
Rerank: "rerank",
|
|
36
36
|
Ocr: "ocr",
|
|
37
37
|
Moderation: "moderation",
|
|
38
|
+
Classify: "classify",
|
|
38
39
|
Vision: "vision",
|
|
39
40
|
} as const;
|
|
40
41
|
/**
|
|
@@ -432,6 +433,7 @@ export const GetOnePromptProvider = {
|
|
|
432
433
|
Reson8: "reson8",
|
|
433
434
|
Meta: "meta",
|
|
434
435
|
Greenpt: "greenpt",
|
|
436
|
+
Typesafe: "typesafe",
|
|
435
437
|
Slack: "slack",
|
|
436
438
|
Orq: "orq",
|
|
437
439
|
} as const;
|
|
@@ -34,6 +34,7 @@ export const GetPromptVersionModelType = {
|
|
|
34
34
|
Rerank: "rerank",
|
|
35
35
|
Ocr: "ocr",
|
|
36
36
|
Moderation: "moderation",
|
|
37
|
+
Classify: "classify",
|
|
37
38
|
Vision: "vision",
|
|
38
39
|
} as const;
|
|
39
40
|
/**
|
|
@@ -438,6 +439,7 @@ export const GetPromptVersionProvider = {
|
|
|
438
439
|
Reson8: "reson8",
|
|
439
440
|
Meta: "meta",
|
|
440
441
|
Greenpt: "greenpt",
|
|
442
|
+
Typesafe: "typesafe",
|
|
441
443
|
Slack: "slack",
|
|
442
444
|
Orq: "orq",
|
|
443
445
|
} as const;
|
|
@@ -140,7 +140,7 @@ export const GetV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
|
|
|
140
140
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
141
141
|
.optional(),
|
|
142
142
|
updated: z.string().datetime({ offset: true }).default(
|
|
143
|
-
"2026-09-
|
|
143
|
+
"2026-09-18T12:12:53.053Z",
|
|
144
144
|
).transform(v => new Date(v)),
|
|
145
145
|
filter_type: z.literal("name"),
|
|
146
146
|
filter_value: z.string(),
|
|
@@ -185,7 +185,7 @@ export const GetV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
|
|
|
185
185
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
186
186
|
.optional(),
|
|
187
187
|
updated: z.string().datetime({ offset: true }).default(
|
|
188
|
-
"2026-09-
|
|
188
|
+
"2026-09-18T12:12:53.053Z",
|
|
189
189
|
).transform(v => new Date(v)),
|
|
190
190
|
filter_type: z.literal("span_type"),
|
|
191
191
|
filter_values: z.array(z.string()),
|
|
@@ -141,7 +141,7 @@ export const GetV2HumanEvalSetsIdResponseBody2$inboundSchema: z.ZodType<
|
|
|
141
141
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
142
142
|
.optional(),
|
|
143
143
|
updated: z.string().datetime({ offset: true }).default(
|
|
144
|
-
"2026-09-
|
|
144
|
+
"2026-09-18T12:12:53.053Z",
|
|
145
145
|
).transform(v => new Date(v)),
|
|
146
146
|
filter_type: z.literal("name"),
|
|
147
147
|
filter_value: z.string(),
|
|
@@ -186,7 +186,7 @@ export const GetV2HumanEvalSetsIdResponseBody1$inboundSchema: z.ZodType<
|
|
|
186
186
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
187
187
|
.optional(),
|
|
188
188
|
updated: z.string().datetime({ offset: true }).default(
|
|
189
|
-
"2026-09-
|
|
189
|
+
"2026-09-18T12:12:53.053Z",
|
|
190
190
|
).transform(v => new Date(v)),
|
|
191
191
|
filter_type: z.literal("span_type"),
|
|
192
192
|
filter_values: z.array(z.string()),
|
|
@@ -26,6 +26,7 @@ export * from "./createagentschedule.js";
|
|
|
26
26
|
export * from "./createannotation.js";
|
|
27
27
|
export * from "./createchatcompletion.js";
|
|
28
28
|
export * from "./createchunk.js";
|
|
29
|
+
export * from "./createclassify.js";
|
|
29
30
|
export * from "./createcompletion.js";
|
|
30
31
|
export * from "./createdataset.js";
|
|
31
32
|
export * from "./createdatasetitem.js";
|