@orq-ai/node 4.16.0-rc.56 → 4.16.0-rc.58
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 +68 -52
- package/funcs/routerClassifyCreate.d.ts +2 -2
- package/funcs/routerClassifyCreate.d.ts.map +1 -1
- package/funcs/routerClassifyCreate.js +2 -2
- package/funcs/routerClassifyCreate.js.map +1 -1
- package/funcs/routerDecisionsCreate.d.ts +18 -0
- package/funcs/routerDecisionsCreate.d.ts.map +1 -0
- package/funcs/routerDecisionsCreate.js +123 -0
- package/funcs/routerDecisionsCreate.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 +6 -47
- package/models/components/classifyanswer.d.ts.map +1 -1
- package/models/components/classifyanswer.js +11 -20
- package/models/components/classifyanswer.js.map +1 -1
- package/models/components/classifychoiceanswer.d.ts +24 -0
- package/models/components/classifychoiceanswer.d.ts.map +1 -0
- package/models/components/classifychoiceanswer.js +53 -0
- package/models/components/classifychoiceanswer.js.map +1 -0
- package/models/components/classifyinputtokensdetails.d.ts +17 -0
- package/models/components/classifyinputtokensdetails.d.ts.map +1 -0
- package/models/components/classifyinputtokensdetails.js +57 -0
- package/models/components/classifyinputtokensdetails.js.map +1 -0
- package/models/components/classifynoulanswer.d.ts +14 -0
- package/models/components/classifynoulanswer.d.ts.map +1 -0
- package/models/components/classifynoulanswer.js +51 -0
- package/models/components/classifynoulanswer.js.map +1 -0
- package/models/components/classifyrefusalanswer.d.ts +10 -0
- package/models/components/classifyrefusalanswer.d.ts.map +1 -0
- package/models/components/classifyrefusalanswer.js +50 -0
- package/models/components/classifyrefusalanswer.js.map +1 -0
- package/models/components/classifyretryconfig.d.ts +4 -4
- package/models/components/classifyretryconfig.d.ts.map +1 -1
- package/models/components/classifyretryconfig.js +1 -1
- package/models/components/classifyretryconfig.js.map +1 -1
- package/models/components/classifyscoreanswer.d.ts +30 -0
- package/models/components/classifyscoreanswer.d.ts.map +1 -0
- package/models/components/classifyscoreanswer.js +54 -0
- package/models/components/classifyscoreanswer.js.map +1 -0
- package/models/components/classifyusage.d.ts +4 -2
- package/models/components/classifyusage.d.ts.map +1 -1
- package/models/components/classifyusage.js +3 -0
- package/models/components/classifyusage.js.map +1 -1
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/model.d.ts +4 -0
- package/models/components/model.d.ts.map +1 -1
- package/models/components/model.js +1 -0
- package/models/components/model.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/publicplugin.d.ts +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/errors/createclassify.d.ts +90 -6
- package/models/errors/createclassify.d.ts.map +1 -1
- package/models/errors/createclassify.js +116 -4
- package/models/errors/createclassify.js.map +1 -1
- package/models/errors/createdecisions.d.ts +151 -0
- package/models/errors/createdecisions.d.ts.map +1 -0
- package/models/errors/createdecisions.js +239 -0
- package/models/errors/createdecisions.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 +9 -4
- package/models/operations/createclassify.d.ts.map +1 -1
- package/models/operations/createclassify.js +2 -0
- package/models/operations/createclassify.js.map +1 -1
- package/models/operations/createdecisions.d.ts +237 -0
- package/models/operations/createdecisions.d.ts.map +1 -0
- package/models/operations/createdecisions.js +148 -0
- package/models/operations/createdecisions.js.map +1 -0
- package/models/operations/createprompt.d.ts +1 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +1 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- 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 +1 -0
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +1 -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 +1 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +1 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getoneprompt.d.ts +1 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +1 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +1 -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/listpromptversions.d.ts +1 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +1 -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/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updateprompt.d.ts +1 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +1 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +9 -9
- package/sdk/classify.d.ts +1 -1
- package/sdk/classify.js +1 -1
- package/sdk/decisions.d.ts +12 -0
- package/sdk/decisions.d.ts.map +1 -0
- package/sdk/decisions.js +22 -0
- package/sdk/decisions.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 +31 -3
- package/src/funcs/routerDecisionsCreate.ts +218 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/classifyanswer.ts +28 -56
- package/src/models/components/classifychoiceanswer.ts +46 -0
- package/src/models/components/classifyinputtokensdetails.ts +45 -0
- package/src/models/components/classifynoulanswer.ts +36 -0
- package/src/models/components/classifyrefusalanswer.ts +31 -0
- package/src/models/components/classifyretryconfig.ts +5 -5
- package/src/models/components/classifyscoreanswer.ts +51 -0
- package/src/models/components/classifyusage.ts +9 -2
- package/src/models/components/index.ts +5 -0
- package/src/models/components/model.ts +5 -0
- package/src/models/components/modelmetadata.ts +6 -0
- package/src/models/components/publicplugin.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/errors/createclassify.ts +214 -6
- package/src/models/errors/createdecisions.ts +363 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createclassify.ts +11 -4
- package/src/models/operations/createdecisions.ts +434 -0
- package/src/models/operations/createprompt.ts +1 -0
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deploymentinvoke.ts +1 -0
- package/src/models/operations/deployments.ts +1 -0
- package/src/models/operations/deploymentstream.ts +1 -0
- package/src/models/operations/getallprompts.ts +1 -0
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getoneprompt.ts +1 -0
- package/src/models/operations/getpromptversion.ts +1 -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/listpromptversions.ts +1 -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/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updateprompt.ts +1 -0
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/classify.ts +1 -1
- package/src/sdk/decisions.ts +27 -0
- package/src/sdk/router.ts +6 -0
|
@@ -82,18 +82,22 @@ export type NoulQuestion = {
|
|
|
82
82
|
export type Questions = NoulQuestion | ChoiceQuestion | ScoreQuestion;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* The content to evaluate. A string, an object or an array.
|
|
85
|
+
* The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
86
86
|
*/
|
|
87
87
|
export type State = string | { [k: string]: any } | Array<any>;
|
|
88
88
|
|
|
89
89
|
export type CreateClassifyRequestBody = {
|
|
90
|
+
/**
|
|
91
|
+
* Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Image requests require native OpenAI image-capable fallbacks.
|
|
92
|
+
*/
|
|
93
|
+
fallbacks?: Array<components.FallbackConfig> | null | undefined;
|
|
90
94
|
identity?: components.ResponseIdentity | undefined;
|
|
91
95
|
/**
|
|
92
96
|
* Key-value metadata attached to the trace.
|
|
93
97
|
*/
|
|
94
98
|
metadata?: { [k: string]: string } | undefined;
|
|
95
99
|
/**
|
|
96
|
-
* ID of
|
|
100
|
+
* ID of a model that supports native or emulated classify, including openai/gpt-6-luna.
|
|
97
101
|
*/
|
|
98
102
|
model: string;
|
|
99
103
|
/**
|
|
@@ -106,7 +110,7 @@ export type CreateClassifyRequestBody = {
|
|
|
106
110
|
questions: { [k: string]: NoulQuestion | ChoiceQuestion | ScoreQuestion };
|
|
107
111
|
retry?: components.ClassifyRetryConfig | undefined;
|
|
108
112
|
/**
|
|
109
|
-
* The content to evaluate. A string, an object or an array.
|
|
113
|
+
* The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
110
114
|
*/
|
|
111
115
|
state: string | { [k: string]: any } | Array<any>;
|
|
112
116
|
};
|
|
@@ -120,7 +124,7 @@ export type CreateClassifyResponseBody = {
|
|
|
120
124
|
*/
|
|
121
125
|
answers: { [k: string]: components.ClassifyAnswer };
|
|
122
126
|
/**
|
|
123
|
-
* The
|
|
127
|
+
* The requested ID of the model that answered. This can be a fallback model.
|
|
124
128
|
*/
|
|
125
129
|
model: string;
|
|
126
130
|
telemetry?: components.ResponseTelemetry | undefined;
|
|
@@ -307,6 +311,7 @@ export function stateToJSON(state: State): string {
|
|
|
307
311
|
|
|
308
312
|
/** @internal */
|
|
309
313
|
export type CreateClassifyRequestBody$Outbound = {
|
|
314
|
+
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
310
315
|
identity?: components.ResponseIdentity$Outbound | undefined;
|
|
311
316
|
metadata?: { [k: string]: string } | undefined;
|
|
312
317
|
model: string;
|
|
@@ -327,6 +332,8 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
327
332
|
z.ZodTypeDef,
|
|
328
333
|
CreateClassifyRequestBody
|
|
329
334
|
> = z.object({
|
|
335
|
+
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
336
|
+
.optional(),
|
|
330
337
|
identity: components.ResponseIdentity$outboundSchema.optional(),
|
|
331
338
|
metadata: z.record(z.string()).optional(),
|
|
332
339
|
model: z.string(),
|
|
@@ -0,0 +1,434 @@
|
|
|
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 CreateDecisionsQuestionsRouterDecisionsRequestInstructions =
|
|
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 QuestionsScoreQuestion = {
|
|
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 CreateDecisionsQuestionsRouterDecisionsInstructions = string | {
|
|
38
|
+
[k: string]: any;
|
|
39
|
+
} | Array<any>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Picks one of the given options and returns the probability of each.
|
|
43
|
+
*/
|
|
44
|
+
export type QuestionsChoiceQuestion = {
|
|
45
|
+
/**
|
|
46
|
+
* Options keyed by name, each mapped to a description or null.
|
|
47
|
+
*/
|
|
48
|
+
criteria: { [k: string]: string | null };
|
|
49
|
+
/**
|
|
50
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
51
|
+
*/
|
|
52
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
53
|
+
type: "choice";
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Optional descriptions of what true and false mean.
|
|
58
|
+
*/
|
|
59
|
+
export type QuestionsCriteria = {
|
|
60
|
+
false?: string | undefined;
|
|
61
|
+
true?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
66
|
+
*/
|
|
67
|
+
export type CreateDecisionsQuestionsInstructions =
|
|
68
|
+
| string
|
|
69
|
+
| { [k: string]: any }
|
|
70
|
+
| Array<any>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Answers with a probability between 0 and 1 that the statement holds.
|
|
74
|
+
*/
|
|
75
|
+
export type QuestionsNoulQuestion = {
|
|
76
|
+
/**
|
|
77
|
+
* Optional descriptions of what true and false mean.
|
|
78
|
+
*/
|
|
79
|
+
criteria?: QuestionsCriteria | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
82
|
+
*/
|
|
83
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
84
|
+
type: "noul";
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export type CreateDecisionsQuestions =
|
|
88
|
+
| QuestionsNoulQuestion
|
|
89
|
+
| QuestionsChoiceQuestion
|
|
90
|
+
| QuestionsScoreQuestion;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
94
|
+
*/
|
|
95
|
+
export type CreateDecisionsState = string | { [k: string]: any } | Array<any>;
|
|
96
|
+
|
|
97
|
+
export type CreateDecisionsRequestBody = {
|
|
98
|
+
/**
|
|
99
|
+
* Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Image requests require native OpenAI image-capable fallbacks.
|
|
100
|
+
*/
|
|
101
|
+
fallbacks?: Array<components.FallbackConfig> | null | undefined;
|
|
102
|
+
identity?: components.ResponseIdentity | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Key-value metadata attached to the trace.
|
|
105
|
+
*/
|
|
106
|
+
metadata?: { [k: string]: string } | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* ID of a model that supports native or emulated classify, including openai/gpt-6-luna.
|
|
109
|
+
*/
|
|
110
|
+
model: string;
|
|
111
|
+
/**
|
|
112
|
+
* The name to display on the trace. If not specified, the default system name will be used.
|
|
113
|
+
*/
|
|
114
|
+
name?: string | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Typed questions keyed by an identifier of your choice. Each answer is returned under the same key.
|
|
117
|
+
*/
|
|
118
|
+
questions: {
|
|
119
|
+
[k: string]:
|
|
120
|
+
| QuestionsNoulQuestion
|
|
121
|
+
| QuestionsChoiceQuestion
|
|
122
|
+
| QuestionsScoreQuestion;
|
|
123
|
+
};
|
|
124
|
+
retry?: components.ClassifyRetryConfig | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
127
|
+
*/
|
|
128
|
+
state: string | { [k: string]: any } | Array<any>;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Returns one answer per question.
|
|
133
|
+
*/
|
|
134
|
+
export type CreateDecisionsResponseBody = {
|
|
135
|
+
/**
|
|
136
|
+
* Answers keyed by the question identifiers from the request.
|
|
137
|
+
*/
|
|
138
|
+
answers: { [k: string]: components.ClassifyAnswer };
|
|
139
|
+
/**
|
|
140
|
+
* The requested ID of the model that answered. This can be a fallback model.
|
|
141
|
+
*/
|
|
142
|
+
model: string;
|
|
143
|
+
telemetry?: components.ResponseTelemetry | undefined;
|
|
144
|
+
usage: components.ClassifyUsage;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
export type CreateDecisionsQuestionsRouterDecisionsRequestInstructions$Outbound =
|
|
149
|
+
| string
|
|
150
|
+
| { [k: string]: any }
|
|
151
|
+
| Array<any>;
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const CreateDecisionsQuestionsRouterDecisionsRequestInstructions$outboundSchema:
|
|
155
|
+
z.ZodType<
|
|
156
|
+
CreateDecisionsQuestionsRouterDecisionsRequestInstructions$Outbound,
|
|
157
|
+
z.ZodTypeDef,
|
|
158
|
+
CreateDecisionsQuestionsRouterDecisionsRequestInstructions
|
|
159
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
160
|
+
|
|
161
|
+
export function createDecisionsQuestionsRouterDecisionsRequestInstructionsToJSON(
|
|
162
|
+
createDecisionsQuestionsRouterDecisionsRequestInstructions:
|
|
163
|
+
CreateDecisionsQuestionsRouterDecisionsRequestInstructions,
|
|
164
|
+
): string {
|
|
165
|
+
return JSON.stringify(
|
|
166
|
+
CreateDecisionsQuestionsRouterDecisionsRequestInstructions$outboundSchema
|
|
167
|
+
.parse(createDecisionsQuestionsRouterDecisionsRequestInstructions),
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export type QuestionsScoreQuestion$Outbound = {
|
|
173
|
+
criteria: Array<string>;
|
|
174
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
175
|
+
type: "score";
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/** @internal */
|
|
179
|
+
export const QuestionsScoreQuestion$outboundSchema: z.ZodType<
|
|
180
|
+
QuestionsScoreQuestion$Outbound,
|
|
181
|
+
z.ZodTypeDef,
|
|
182
|
+
QuestionsScoreQuestion
|
|
183
|
+
> = z.object({
|
|
184
|
+
criteria: z.array(z.string()),
|
|
185
|
+
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
186
|
+
type: z.literal("score"),
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
export function questionsScoreQuestionToJSON(
|
|
190
|
+
questionsScoreQuestion: QuestionsScoreQuestion,
|
|
191
|
+
): string {
|
|
192
|
+
return JSON.stringify(
|
|
193
|
+
QuestionsScoreQuestion$outboundSchema.parse(questionsScoreQuestion),
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** @internal */
|
|
198
|
+
export type CreateDecisionsQuestionsRouterDecisionsInstructions$Outbound =
|
|
199
|
+
| string
|
|
200
|
+
| { [k: string]: any }
|
|
201
|
+
| Array<any>;
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export const CreateDecisionsQuestionsRouterDecisionsInstructions$outboundSchema:
|
|
205
|
+
z.ZodType<
|
|
206
|
+
CreateDecisionsQuestionsRouterDecisionsInstructions$Outbound,
|
|
207
|
+
z.ZodTypeDef,
|
|
208
|
+
CreateDecisionsQuestionsRouterDecisionsInstructions
|
|
209
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
210
|
+
|
|
211
|
+
export function createDecisionsQuestionsRouterDecisionsInstructionsToJSON(
|
|
212
|
+
createDecisionsQuestionsRouterDecisionsInstructions:
|
|
213
|
+
CreateDecisionsQuestionsRouterDecisionsInstructions,
|
|
214
|
+
): string {
|
|
215
|
+
return JSON.stringify(
|
|
216
|
+
CreateDecisionsQuestionsRouterDecisionsInstructions$outboundSchema.parse(
|
|
217
|
+
createDecisionsQuestionsRouterDecisionsInstructions,
|
|
218
|
+
),
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export type QuestionsChoiceQuestion$Outbound = {
|
|
224
|
+
criteria: { [k: string]: string | null };
|
|
225
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
226
|
+
type: "choice";
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
/** @internal */
|
|
230
|
+
export const QuestionsChoiceQuestion$outboundSchema: z.ZodType<
|
|
231
|
+
QuestionsChoiceQuestion$Outbound,
|
|
232
|
+
z.ZodTypeDef,
|
|
233
|
+
QuestionsChoiceQuestion
|
|
234
|
+
> = z.object({
|
|
235
|
+
criteria: z.record(z.nullable(z.string())),
|
|
236
|
+
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
237
|
+
type: z.literal("choice"),
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
export function questionsChoiceQuestionToJSON(
|
|
241
|
+
questionsChoiceQuestion: QuestionsChoiceQuestion,
|
|
242
|
+
): string {
|
|
243
|
+
return JSON.stringify(
|
|
244
|
+
QuestionsChoiceQuestion$outboundSchema.parse(questionsChoiceQuestion),
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export type QuestionsCriteria$Outbound = {
|
|
250
|
+
false?: string | undefined;
|
|
251
|
+
true?: string | undefined;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/** @internal */
|
|
255
|
+
export const QuestionsCriteria$outboundSchema: z.ZodType<
|
|
256
|
+
QuestionsCriteria$Outbound,
|
|
257
|
+
z.ZodTypeDef,
|
|
258
|
+
QuestionsCriteria
|
|
259
|
+
> = z.object({
|
|
260
|
+
false: z.string().optional(),
|
|
261
|
+
true: z.string().optional(),
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
export function questionsCriteriaToJSON(
|
|
265
|
+
questionsCriteria: QuestionsCriteria,
|
|
266
|
+
): string {
|
|
267
|
+
return JSON.stringify(
|
|
268
|
+
QuestionsCriteria$outboundSchema.parse(questionsCriteria),
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** @internal */
|
|
273
|
+
export type CreateDecisionsQuestionsInstructions$Outbound = string | {
|
|
274
|
+
[k: string]: any;
|
|
275
|
+
} | Array<any>;
|
|
276
|
+
|
|
277
|
+
/** @internal */
|
|
278
|
+
export const CreateDecisionsQuestionsInstructions$outboundSchema: z.ZodType<
|
|
279
|
+
CreateDecisionsQuestionsInstructions$Outbound,
|
|
280
|
+
z.ZodTypeDef,
|
|
281
|
+
CreateDecisionsQuestionsInstructions
|
|
282
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
283
|
+
|
|
284
|
+
export function createDecisionsQuestionsInstructionsToJSON(
|
|
285
|
+
createDecisionsQuestionsInstructions: CreateDecisionsQuestionsInstructions,
|
|
286
|
+
): string {
|
|
287
|
+
return JSON.stringify(
|
|
288
|
+
CreateDecisionsQuestionsInstructions$outboundSchema.parse(
|
|
289
|
+
createDecisionsQuestionsInstructions,
|
|
290
|
+
),
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** @internal */
|
|
295
|
+
export type QuestionsNoulQuestion$Outbound = {
|
|
296
|
+
criteria?: QuestionsCriteria$Outbound | undefined;
|
|
297
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
298
|
+
type: "noul";
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
/** @internal */
|
|
302
|
+
export const QuestionsNoulQuestion$outboundSchema: z.ZodType<
|
|
303
|
+
QuestionsNoulQuestion$Outbound,
|
|
304
|
+
z.ZodTypeDef,
|
|
305
|
+
QuestionsNoulQuestion
|
|
306
|
+
> = z.object({
|
|
307
|
+
criteria: z.lazy(() => QuestionsCriteria$outboundSchema).optional(),
|
|
308
|
+
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
309
|
+
type: z.literal("noul"),
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
export function questionsNoulQuestionToJSON(
|
|
313
|
+
questionsNoulQuestion: QuestionsNoulQuestion,
|
|
314
|
+
): string {
|
|
315
|
+
return JSON.stringify(
|
|
316
|
+
QuestionsNoulQuestion$outboundSchema.parse(questionsNoulQuestion),
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/** @internal */
|
|
321
|
+
export type CreateDecisionsQuestions$Outbound =
|
|
322
|
+
| QuestionsNoulQuestion$Outbound
|
|
323
|
+
| QuestionsChoiceQuestion$Outbound
|
|
324
|
+
| QuestionsScoreQuestion$Outbound;
|
|
325
|
+
|
|
326
|
+
/** @internal */
|
|
327
|
+
export const CreateDecisionsQuestions$outboundSchema: z.ZodType<
|
|
328
|
+
CreateDecisionsQuestions$Outbound,
|
|
329
|
+
z.ZodTypeDef,
|
|
330
|
+
CreateDecisionsQuestions
|
|
331
|
+
> = z.union([
|
|
332
|
+
z.lazy(() => QuestionsNoulQuestion$outboundSchema),
|
|
333
|
+
z.lazy(() => QuestionsChoiceQuestion$outboundSchema),
|
|
334
|
+
z.lazy(() => QuestionsScoreQuestion$outboundSchema),
|
|
335
|
+
]);
|
|
336
|
+
|
|
337
|
+
export function createDecisionsQuestionsToJSON(
|
|
338
|
+
createDecisionsQuestions: CreateDecisionsQuestions,
|
|
339
|
+
): string {
|
|
340
|
+
return JSON.stringify(
|
|
341
|
+
CreateDecisionsQuestions$outboundSchema.parse(createDecisionsQuestions),
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/** @internal */
|
|
346
|
+
export type CreateDecisionsState$Outbound =
|
|
347
|
+
| string
|
|
348
|
+
| { [k: string]: any }
|
|
349
|
+
| Array<any>;
|
|
350
|
+
|
|
351
|
+
/** @internal */
|
|
352
|
+
export const CreateDecisionsState$outboundSchema: z.ZodType<
|
|
353
|
+
CreateDecisionsState$Outbound,
|
|
354
|
+
z.ZodTypeDef,
|
|
355
|
+
CreateDecisionsState
|
|
356
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
357
|
+
|
|
358
|
+
export function createDecisionsStateToJSON(
|
|
359
|
+
createDecisionsState: CreateDecisionsState,
|
|
360
|
+
): string {
|
|
361
|
+
return JSON.stringify(
|
|
362
|
+
CreateDecisionsState$outboundSchema.parse(createDecisionsState),
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/** @internal */
|
|
367
|
+
export type CreateDecisionsRequestBody$Outbound = {
|
|
368
|
+
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
369
|
+
identity?: components.ResponseIdentity$Outbound | undefined;
|
|
370
|
+
metadata?: { [k: string]: string } | undefined;
|
|
371
|
+
model: string;
|
|
372
|
+
name?: string | undefined;
|
|
373
|
+
questions: {
|
|
374
|
+
[k: string]:
|
|
375
|
+
| QuestionsNoulQuestion$Outbound
|
|
376
|
+
| QuestionsChoiceQuestion$Outbound
|
|
377
|
+
| QuestionsScoreQuestion$Outbound;
|
|
378
|
+
};
|
|
379
|
+
retry?: components.ClassifyRetryConfig$Outbound | undefined;
|
|
380
|
+
state: string | { [k: string]: any } | Array<any>;
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
/** @internal */
|
|
384
|
+
export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
|
|
385
|
+
CreateDecisionsRequestBody$Outbound,
|
|
386
|
+
z.ZodTypeDef,
|
|
387
|
+
CreateDecisionsRequestBody
|
|
388
|
+
> = z.object({
|
|
389
|
+
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
390
|
+
.optional(),
|
|
391
|
+
identity: components.ResponseIdentity$outboundSchema.optional(),
|
|
392
|
+
metadata: z.record(z.string()).optional(),
|
|
393
|
+
model: z.string(),
|
|
394
|
+
name: z.string().optional(),
|
|
395
|
+
questions: z.record(
|
|
396
|
+
z.union([
|
|
397
|
+
z.lazy(() => QuestionsNoulQuestion$outboundSchema),
|
|
398
|
+
z.lazy(() => QuestionsChoiceQuestion$outboundSchema),
|
|
399
|
+
z.lazy(() => QuestionsScoreQuestion$outboundSchema),
|
|
400
|
+
]),
|
|
401
|
+
),
|
|
402
|
+
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
403
|
+
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
export function createDecisionsRequestBodyToJSON(
|
|
407
|
+
createDecisionsRequestBody: CreateDecisionsRequestBody,
|
|
408
|
+
): string {
|
|
409
|
+
return JSON.stringify(
|
|
410
|
+
CreateDecisionsRequestBody$outboundSchema.parse(createDecisionsRequestBody),
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/** @internal */
|
|
415
|
+
export const CreateDecisionsResponseBody$inboundSchema: z.ZodType<
|
|
416
|
+
CreateDecisionsResponseBody,
|
|
417
|
+
z.ZodTypeDef,
|
|
418
|
+
unknown
|
|
419
|
+
> = z.object({
|
|
420
|
+
answers: z.record(components.ClassifyAnswer$inboundSchema),
|
|
421
|
+
model: z.string(),
|
|
422
|
+
telemetry: components.ResponseTelemetry$inboundSchema.optional(),
|
|
423
|
+
usage: components.ClassifyUsage$inboundSchema,
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
export function createDecisionsResponseBodyFromJSON(
|
|
427
|
+
jsonString: string,
|
|
428
|
+
): SafeParseResult<CreateDecisionsResponseBody, SDKValidationError> {
|
|
429
|
+
return safeParse(
|
|
430
|
+
jsonString,
|
|
431
|
+
(x) => CreateDecisionsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
432
|
+
`Failed to parse 'CreateDecisionsResponseBody' from JSON`,
|
|
433
|
+
);
|
|
434
|
+
}
|
|
@@ -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_01M4AT2CQ97JG9J6H42REYKRQC"),
|
|
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_01M4AT2CQ9P32A2N0C2RSB3BS2"),
|
|
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_01M4AT2CQ87R7SS7W7T16496S5"),
|
|
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_01M4AT2CQ8SVP9RBEAV8DXQVMN"),
|
|
1959
1959
|
path: z.string(),
|
|
1960
1960
|
key: z.string(),
|
|
1961
1961
|
display_name: z.string().optional(),
|
|
@@ -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_01M4AT2CQ4QG8FC3J47XQHRGVG"),
|
|
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_01M4AT2CQ3NN1SBKAADYJEGKJ9"),
|
|
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_01M4AT2CQ39Q2WG31RF3R4EDD2"),
|
|
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_01M4AT2CQ2FN13C03XNTYYFHNZ"),
|
|
1016
1016
|
path: z.string(),
|
|
1017
1017
|
key: z.string(),
|
|
1018
1018
|
display_name: z.string().optional(),
|
|
@@ -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-10-
|
|
143
|
+
"2026-10-07T09:10:41.835Z",
|
|
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-10-
|
|
188
|
+
"2026-10-07T09:10:41.835Z",
|
|
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-10-
|
|
144
|
+
"2026-10-07T09:10:41.835Z",
|
|
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-10-
|
|
189
|
+
"2026-10-07T09:10:41.835Z",
|
|
190
190
|
).transform(v => new Date(v)),
|
|
191
191
|
filter_type: z.literal("span_type"),
|
|
192
192
|
filter_values: z.array(z.string()),
|
|
@@ -34,6 +34,7 @@ export * from "./createclassify.js";
|
|
|
34
34
|
export * from "./createcompletion.js";
|
|
35
35
|
export * from "./createdatasetitem.js";
|
|
36
36
|
export * from "./createdatasource.js";
|
|
37
|
+
export * from "./createdecisions.js";
|
|
37
38
|
export * from "./createembedding.js";
|
|
38
39
|
export * from "./createeval.js";
|
|
39
40
|
export * from "./createfolder.js";
|