@orq-ai/node 4.16.1 → 4.16.3
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 +5 -3
- package/funcs/routerClassifyCreate.d.ts +10 -2
- package/funcs/routerClassifyCreate.d.ts.map +1 -1
- package/funcs/routerClassifyCreate.js +10 -2
- package/funcs/routerClassifyCreate.js.map +1 -1
- package/funcs/routerDecisionsCreate.d.ts +10 -2
- package/funcs/routerDecisionsCreate.d.ts.map +1 -1
- package/funcs/routerDecisionsCreate.js +11 -2
- package/funcs/routerDecisionsCreate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/classifycacheconfig.d.ts +33 -0
- package/models/components/classifycacheconfig.d.ts.map +1 -0
- package/models/components/classifycacheconfig.js +58 -0
- package/models/components/classifycacheconfig.js.map +1 -0
- package/models/components/classifytimeoutconfig.d.ts +15 -0
- package/models/components/classifytimeoutconfig.d.ts.map +1 -0
- package/models/components/classifytimeoutconfig.js +54 -0
- package/models/components/classifytimeoutconfig.js.map +1 -0
- package/models/components/environment.d.ts +1 -1
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -0
- package/models/components/index.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts +4 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts.map +1 -1
- package/models/components/responsefunctioncallargumentsdonestreamevent.js +1 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.js.map +1 -1
- package/models/components/responseimagegenerationcallpartialimagestreamevent.d.ts +16 -0
- package/models/components/responseimagegenerationcallpartialimagestreamevent.d.ts.map +1 -1
- package/models/components/responseimagegenerationcallpartialimagestreamevent.js +5 -0
- package/models/components/responseimagegenerationcallpartialimagestreamevent.js.map +1 -1
- package/models/components/responsereasoningsummarypartaddedstreamevent.d.ts +4 -0
- package/models/components/responsereasoningsummarypartaddedstreamevent.d.ts.map +1 -1
- package/models/components/responsereasoningsummarypartaddedstreamevent.js +1 -0
- package/models/components/responsereasoningsummarypartaddedstreamevent.js.map +1 -1
- package/models/components/responsereasoningsummarypartdonestreamevent.d.ts +4 -0
- package/models/components/responsereasoningsummarypartdonestreamevent.d.ts.map +1 -1
- package/models/components/responsereasoningsummarypartdonestreamevent.js +1 -0
- package/models/components/responsereasoningsummarypartdonestreamevent.js.map +1 -1
- package/models/components/responseshellcallcommandaddedstreamevent.d.ts +35 -0
- package/models/components/responseshellcallcommandaddedstreamevent.d.ts.map +1 -0
- package/models/components/responseshellcallcommandaddedstreamevent.js +61 -0
- package/models/components/responseshellcallcommandaddedstreamevent.js.map +1 -0
- package/models/components/responseshellcallcommanddeltastreamevent.d.ts +39 -0
- package/models/components/responseshellcallcommanddeltastreamevent.d.ts.map +1 -0
- package/models/components/responseshellcallcommanddeltastreamevent.js +62 -0
- package/models/components/responseshellcallcommanddeltastreamevent.js.map +1 -0
- package/models/components/responseshellcallcommanddonestreamevent.d.ts +35 -0
- package/models/components/responseshellcallcommanddonestreamevent.d.ts.map +1 -0
- package/models/components/responseshellcallcommanddonestreamevent.js +61 -0
- package/models/components/responseshellcallcommanddonestreamevent.js.map +1 -0
- package/models/components/responseshellcalloutputcontentdeltastreamevent.d.ts +41 -0
- package/models/components/responseshellcalloutputcontentdeltastreamevent.d.ts.map +1 -0
- package/models/components/responseshellcalloutputcontentdeltastreamevent.js +63 -0
- package/models/components/responseshellcalloutputcontentdeltastreamevent.js.map +1 -0
- package/models/components/responseshellcalloutputcontentdonestreamevent.d.ts +38 -0
- package/models/components/responseshellcalloutputcontentdonestreamevent.d.ts.map +1 -0
- package/models/components/responseshellcalloutputcontentdonestreamevent.js +63 -0
- package/models/components/responseshellcalloutputcontentdonestreamevent.js.map +1 -0
- package/models/components/responsestreamevent.d.ts +6 -1
- package/models/components/responsestreamevent.d.ts.map +1 -1
- package/models/components/responsestreamevent.js +10 -0
- package/models/components/responsestreamevent.js.map +1 -1
- package/models/errors/createclassify.d.ts +23 -2
- package/models/errors/createclassify.d.ts.map +1 -1
- package/models/errors/createclassify.js +30 -2
- package/models/errors/createclassify.js.map +1 -1
- package/models/errors/createdecisions.d.ts +23 -2
- package/models/errors/createdecisions.d.ts.map +1 -1
- package/models/errors/createdecisions.js +30 -2
- package/models/errors/createdecisions.js.map +1 -1
- package/models/operations/createclassify.d.ts +4 -0
- 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 +4 -0
- package/models/operations/createdecisions.d.ts.map +1 -1
- package/models/operations/createdecisions.js +2 -0
- package/models/operations/createdecisions.js.map +1 -1
- 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/deploymentinvoke.d.ts +2 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +2 -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 +2 -0
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +2 -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/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/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.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 +3 -3
- package/packages/orq-rc/src/funcs/responsesCompact.ts +1 -1
- package/packages/orq-rc/src/funcs/routerClassifyCreate.ts +20 -1
- package/packages/orq-rc/src/funcs/routerDecisionsCreate.ts +17 -1
- package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +1 -1
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/models/components/classifycacheconfig.ts +59 -0
- package/packages/orq-rc/src/models/components/classifytimeoutconfig.ts +39 -0
- package/packages/orq-rc/src/models/components/environment.ts +1 -1
- package/packages/orq-rc/src/models/components/filecontentpartschema.ts +12 -3
- package/packages/orq-rc/src/models/components/index.ts +8 -1
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +2 -2
- package/packages/orq-rc/src/models/components/mcpgatewayplugin.ts +16 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/responsefunctioncallargumentsdonestreamevent.ts +5 -0
- package/packages/orq-rc/src/models/components/responseimagegenerationcallpartialimagestreamevent.ts +21 -0
- package/packages/orq-rc/src/models/components/responsereasoningsummarypartaddedstreamevent.ts +5 -0
- package/packages/orq-rc/src/models/components/responsereasoningsummarypartdonestreamevent.ts +5 -0
- package/packages/orq-rc/src/models/components/responseshellcallcommandaddedstreamevent.ts +78 -0
- package/packages/orq-rc/src/models/components/responseshellcallcommanddeltastreamevent.ts +83 -0
- package/packages/orq-rc/src/models/components/responseshellcallcommanddonestreamevent.ts +78 -0
- package/packages/orq-rc/src/models/components/responseshellcalloutputcontentdeltastreamevent.ts +85 -0
- package/packages/orq-rc/src/models/components/responseshellcalloutputcontentdonestreamevent.ts +82 -0
- package/packages/orq-rc/src/models/components/responsestreamevent.ts +30 -0
- package/packages/orq-rc/src/models/components/routingruleplugin.ts +22 -0
- package/packages/orq-rc/src/models/components/signalscheck.ts +51 -0
- package/packages/orq-rc/src/models/components/updateworkspacerequest.ts +4 -0
- package/packages/orq-rc/src/models/errors/createclassify.ts +54 -2
- package/packages/orq-rc/src/models/errors/createdecisions.ts +54 -2
- package/packages/orq-rc/src/models/errors/createmoderation.ts +2 -2
- package/packages/orq-rc/src/models/operations/compactresponse.ts +4 -4
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +1 -1
- package/packages/orq-rc/src/models/operations/createclassify.ts +6 -0
- package/packages/orq-rc/src/models/operations/createdecisions.ts +6 -0
- package/packages/orq-rc/src/models/operations/createmoderation.ts +3 -3
- package/packages/orq-rc/src/models/operations/createprompt.ts +4 -2
- package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +2 -2
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +2 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +2 -0
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +4 -2
- package/packages/orq-rc/src/models/operations/getallprompts.ts +3 -1
- package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +3 -1
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +3 -1
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +3 -1
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/tracesgetspan.ts +3 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -2
- package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
- package/packages/orq-rc/src/sdk/classify.ts +13 -1
- package/packages/orq-rc/src/sdk/decisions.ts +9 -1
- package/packages/orq-rc/src/sdk/responses.ts +1 -1
- package/sdk/classify.d.ts +9 -1
- package/sdk/classify.d.ts.map +1 -1
- package/sdk/classify.js +9 -1
- package/sdk/classify.js.map +1 -1
- package/sdk/decisions.d.ts +9 -1
- package/sdk/decisions.d.ts.map +1 -1
- package/sdk/decisions.js +9 -1
- package/sdk/decisions.js.map +1 -1
- package/src/funcs/routerClassifyCreate.ts +16 -1
- package/src/funcs/routerDecisionsCreate.ts +17 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/classifycacheconfig.ts +59 -0
- package/src/models/components/classifytimeoutconfig.ts +39 -0
- package/src/models/components/environment.ts +1 -1
- package/src/models/components/index.ts +7 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/responsefunctioncallargumentsdonestreamevent.ts +5 -0
- package/src/models/components/responseimagegenerationcallpartialimagestreamevent.ts +21 -0
- package/src/models/components/responsereasoningsummarypartaddedstreamevent.ts +5 -0
- package/src/models/components/responsereasoningsummarypartdonestreamevent.ts +5 -0
- package/src/models/components/responseshellcallcommandaddedstreamevent.ts +78 -0
- package/src/models/components/responseshellcallcommanddeltastreamevent.ts +83 -0
- package/src/models/components/responseshellcallcommanddonestreamevent.ts +78 -0
- package/src/models/components/responseshellcalloutputcontentdeltastreamevent.ts +85 -0
- package/src/models/components/responseshellcalloutputcontentdonestreamevent.ts +82 -0
- package/src/models/components/responsestreamevent.ts +30 -0
- package/src/models/errors/createclassify.ts +54 -2
- package/src/models/errors/createdecisions.ts +54 -2
- package/src/models/operations/createclassify.ts +6 -0
- package/src/models/operations/createdecisions.ts +6 -0
- package/src/models/operations/createprompt.ts +2 -0
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deploymentinvoke.ts +2 -0
- package/src/models/operations/deployments.ts +2 -0
- package/src/models/operations/deploymentstream.ts +2 -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/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/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 +2 -0
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/classify.ts +9 -1
- package/src/sdk/decisions.ts +9 -1
- package/packages/orq-rc/src/models/components/publiccompactionitem.ts +0 -79
package/packages/orq-rc/src/models/components/responseshellcalloutputcontentdonestreamevent.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
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 {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
11
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A `response.shell_call_output_content.done` server-sent event.
|
|
16
|
+
*/
|
|
17
|
+
export type ResponseShellCallOutputContentDoneStreamEvent = {
|
|
18
|
+
/**
|
|
19
|
+
* Index of the shell command.
|
|
20
|
+
*/
|
|
21
|
+
commandIndex: number;
|
|
22
|
+
/**
|
|
23
|
+
* ID of the output item this event refers to.
|
|
24
|
+
*/
|
|
25
|
+
itemId: string;
|
|
26
|
+
output: Array<{ [k: string]: any }>;
|
|
27
|
+
/**
|
|
28
|
+
* Index of the output item in the response output array.
|
|
29
|
+
*/
|
|
30
|
+
outputIndex: number;
|
|
31
|
+
/**
|
|
32
|
+
* Monotonically increasing sequence number for ordering events.
|
|
33
|
+
*/
|
|
34
|
+
sequenceNumber: number;
|
|
35
|
+
/**
|
|
36
|
+
* The event type. Discriminates the payload.
|
|
37
|
+
*/
|
|
38
|
+
type: "response.shell_call_output_content.done";
|
|
39
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const ResponseShellCallOutputContentDoneStreamEvent$inboundSchema:
|
|
44
|
+
z.ZodType<
|
|
45
|
+
ResponseShellCallOutputContentDoneStreamEvent,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
unknown
|
|
48
|
+
> = collectExtraKeys$(
|
|
49
|
+
z.object({
|
|
50
|
+
command_index: z.number().int(),
|
|
51
|
+
item_id: z.string(),
|
|
52
|
+
output: z.array(z.record(z.any())),
|
|
53
|
+
output_index: z.number().int(),
|
|
54
|
+
sequence_number: z.number().int(),
|
|
55
|
+
type: z.literal("response.shell_call_output_content.done"),
|
|
56
|
+
}).catchall(z.any()),
|
|
57
|
+
"additionalProperties",
|
|
58
|
+
true,
|
|
59
|
+
).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
"command_index": "commandIndex",
|
|
62
|
+
"item_id": "itemId",
|
|
63
|
+
"output_index": "outputIndex",
|
|
64
|
+
"sequence_number": "sequenceNumber",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export function responseShellCallOutputContentDoneStreamEventFromJSON(
|
|
69
|
+
jsonString: string,
|
|
70
|
+
): SafeParseResult<
|
|
71
|
+
ResponseShellCallOutputContentDoneStreamEvent,
|
|
72
|
+
SDKValidationError
|
|
73
|
+
> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) =>
|
|
77
|
+
ResponseShellCallOutputContentDoneStreamEvent$inboundSchema.parse(
|
|
78
|
+
JSON.parse(x),
|
|
79
|
+
),
|
|
80
|
+
`Failed to parse 'ResponseShellCallOutputContentDoneStreamEvent' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -198,6 +198,26 @@ import {
|
|
|
198
198
|
ResponseRefusalDoneStreamEvent,
|
|
199
199
|
ResponseRefusalDoneStreamEvent$inboundSchema,
|
|
200
200
|
} from "./responserefusaldonestreamevent.js";
|
|
201
|
+
import {
|
|
202
|
+
ResponseShellCallCommandAddedStreamEvent,
|
|
203
|
+
ResponseShellCallCommandAddedStreamEvent$inboundSchema,
|
|
204
|
+
} from "./responseshellcallcommandaddedstreamevent.js";
|
|
205
|
+
import {
|
|
206
|
+
ResponseShellCallCommandDeltaStreamEvent,
|
|
207
|
+
ResponseShellCallCommandDeltaStreamEvent$inboundSchema,
|
|
208
|
+
} from "./responseshellcallcommanddeltastreamevent.js";
|
|
209
|
+
import {
|
|
210
|
+
ResponseShellCallCommandDoneStreamEvent,
|
|
211
|
+
ResponseShellCallCommandDoneStreamEvent$inboundSchema,
|
|
212
|
+
} from "./responseshellcallcommanddonestreamevent.js";
|
|
213
|
+
import {
|
|
214
|
+
ResponseShellCallOutputContentDeltaStreamEvent,
|
|
215
|
+
ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema,
|
|
216
|
+
} from "./responseshellcalloutputcontentdeltastreamevent.js";
|
|
217
|
+
import {
|
|
218
|
+
ResponseShellCallOutputContentDoneStreamEvent,
|
|
219
|
+
ResponseShellCallOutputContentDoneStreamEvent$inboundSchema,
|
|
220
|
+
} from "./responseshellcalloutputcontentdonestreamevent.js";
|
|
201
221
|
import {
|
|
202
222
|
ResponseWebSearchCallCompletedStreamEvent,
|
|
203
223
|
ResponseWebSearchCallCompletedStreamEvent$inboundSchema,
|
|
@@ -263,6 +283,11 @@ export type ResponseStreamEvent =
|
|
|
263
283
|
| ResponseReasoningTextDoneStreamEvent
|
|
264
284
|
| ResponseRefusalDeltaStreamEvent
|
|
265
285
|
| ResponseRefusalDoneStreamEvent
|
|
286
|
+
| ResponseShellCallCommandAddedStreamEvent
|
|
287
|
+
| ResponseShellCallCommandDeltaStreamEvent
|
|
288
|
+
| ResponseShellCallCommandDoneStreamEvent
|
|
289
|
+
| ResponseShellCallOutputContentDeltaStreamEvent
|
|
290
|
+
| ResponseShellCallOutputContentDoneStreamEvent
|
|
266
291
|
| ResponseWebSearchCallCompletedStreamEvent
|
|
267
292
|
| ResponseWebSearchCallInProgressStreamEvent
|
|
268
293
|
| ResponseWebSearchCallSearchingStreamEvent;
|
|
@@ -321,6 +346,11 @@ export const ResponseStreamEvent$inboundSchema: z.ZodType<
|
|
|
321
346
|
ResponseReasoningTextDoneStreamEvent$inboundSchema,
|
|
322
347
|
ResponseRefusalDeltaStreamEvent$inboundSchema,
|
|
323
348
|
ResponseRefusalDoneStreamEvent$inboundSchema,
|
|
349
|
+
ResponseShellCallCommandAddedStreamEvent$inboundSchema,
|
|
350
|
+
ResponseShellCallCommandDeltaStreamEvent$inboundSchema,
|
|
351
|
+
ResponseShellCallCommandDoneStreamEvent$inboundSchema,
|
|
352
|
+
ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema,
|
|
353
|
+
ResponseShellCallOutputContentDoneStreamEvent$inboundSchema,
|
|
324
354
|
ResponseWebSearchCallCompletedStreamEvent$inboundSchema,
|
|
325
355
|
ResponseWebSearchCallInProgressStreamEvent$inboundSchema,
|
|
326
356
|
ResponseWebSearchCallSearchingStreamEvent$inboundSchema,
|
|
@@ -7,6 +7,18 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
RoutingRuleModelsConfig,
|
|
12
|
+
RoutingRuleModelsConfig$inboundSchema,
|
|
13
|
+
RoutingRuleModelsConfig$Outbound,
|
|
14
|
+
RoutingRuleModelsConfig$outboundSchema,
|
|
15
|
+
} from "./routingrulemodelsconfig.js";
|
|
16
|
+
import {
|
|
17
|
+
SignalsCheck,
|
|
18
|
+
SignalsCheck$inboundSchema,
|
|
19
|
+
SignalsCheck$Outbound,
|
|
20
|
+
SignalsCheck$outboundSchema,
|
|
21
|
+
} from "./signalscheck.js";
|
|
10
22
|
|
|
11
23
|
export type RoutingRulePlugin = {
|
|
12
24
|
/**
|
|
@@ -37,6 +49,8 @@ export type RoutingRulePlugin = {
|
|
|
37
49
|
* Per-entity-type confidence cutoff. Every key must also appear in entities.
|
|
38
50
|
*/
|
|
39
51
|
entityThresholds?: { [k: string]: number } | undefined;
|
|
52
|
+
modelsConfig?: RoutingRuleModelsConfig | undefined;
|
|
53
|
+
checks?: { [k: string]: SignalsCheck } | undefined;
|
|
40
54
|
};
|
|
41
55
|
|
|
42
56
|
/** @internal */
|
|
@@ -53,10 +67,13 @@ export const RoutingRulePlugin$inboundSchema: z.ZodType<
|
|
|
53
67
|
mask: z.array(z.string()).optional(),
|
|
54
68
|
regions: z.array(z.string()).optional(),
|
|
55
69
|
entity_thresholds: z.record(z.number()).optional(),
|
|
70
|
+
models_config: RoutingRuleModelsConfig$inboundSchema.optional(),
|
|
71
|
+
checks: z.record(SignalsCheck$inboundSchema).optional(),
|
|
56
72
|
}).transform((v) => {
|
|
57
73
|
return remap$(v, {
|
|
58
74
|
"on_failure": "onFailure",
|
|
59
75
|
"entity_thresholds": "entityThresholds",
|
|
76
|
+
"models_config": "modelsConfig",
|
|
60
77
|
});
|
|
61
78
|
});
|
|
62
79
|
/** @internal */
|
|
@@ -69,6 +86,8 @@ export type RoutingRulePlugin$Outbound = {
|
|
|
69
86
|
mask?: Array<string> | undefined;
|
|
70
87
|
regions?: Array<string> | undefined;
|
|
71
88
|
entity_thresholds?: { [k: string]: number } | undefined;
|
|
89
|
+
models_config?: RoutingRuleModelsConfig$Outbound | undefined;
|
|
90
|
+
checks?: { [k: string]: SignalsCheck$Outbound } | undefined;
|
|
72
91
|
};
|
|
73
92
|
|
|
74
93
|
/** @internal */
|
|
@@ -85,10 +104,13 @@ export const RoutingRulePlugin$outboundSchema: z.ZodType<
|
|
|
85
104
|
mask: z.array(z.string()).optional(),
|
|
86
105
|
regions: z.array(z.string()).optional(),
|
|
87
106
|
entityThresholds: z.record(z.number()).optional(),
|
|
107
|
+
modelsConfig: RoutingRuleModelsConfig$outboundSchema.optional(),
|
|
108
|
+
checks: z.record(SignalsCheck$outboundSchema).optional(),
|
|
88
109
|
}).transform((v) => {
|
|
89
110
|
return remap$(v, {
|
|
90
111
|
onFailure: "on_failure",
|
|
91
112
|
entityThresholds: "entity_thresholds",
|
|
113
|
+
modelsConfig: "models_config",
|
|
92
114
|
});
|
|
93
115
|
});
|
|
94
116
|
|
|
@@ -0,0 +1,51 @@
|
|
|
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 SignalsCheck = {
|
|
11
|
+
enabled?: boolean | undefined;
|
|
12
|
+
threshold?: number | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const SignalsCheck$inboundSchema: z.ZodType<
|
|
17
|
+
SignalsCheck,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
enabled: z.boolean().optional(),
|
|
22
|
+
threshold: z.number().optional(),
|
|
23
|
+
});
|
|
24
|
+
/** @internal */
|
|
25
|
+
export type SignalsCheck$Outbound = {
|
|
26
|
+
enabled?: boolean | undefined;
|
|
27
|
+
threshold?: number | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const SignalsCheck$outboundSchema: z.ZodType<
|
|
32
|
+
SignalsCheck$Outbound,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
SignalsCheck
|
|
35
|
+
> = z.object({
|
|
36
|
+
enabled: z.boolean().optional(),
|
|
37
|
+
threshold: z.number().optional(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function signalsCheckToJSON(signalsCheck: SignalsCheck): string {
|
|
41
|
+
return JSON.stringify(SignalsCheck$outboundSchema.parse(signalsCheck));
|
|
42
|
+
}
|
|
43
|
+
export function signalsCheckFromJSON(
|
|
44
|
+
jsonString: string,
|
|
45
|
+
): SafeParseResult<SignalsCheck, SDKValidationError> {
|
|
46
|
+
return safeParse(
|
|
47
|
+
jsonString,
|
|
48
|
+
(x) => SignalsCheck$inboundSchema.parse(JSON.parse(x)),
|
|
49
|
+
`Failed to parse 'SignalsCheck' from JSON`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -25,6 +25,7 @@ export type UpdateWorkspaceRequest = {
|
|
|
25
25
|
metadata?: UpdateWorkspaceRequestMetadata | undefined;
|
|
26
26
|
enforceEnabledModels?: boolean | undefined;
|
|
27
27
|
chatKit?: ChatKitResources | undefined;
|
|
28
|
+
tracingEnabled?: boolean | undefined;
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
/** @internal */
|
|
@@ -56,6 +57,7 @@ export type UpdateWorkspaceRequest$Outbound = {
|
|
|
56
57
|
metadata?: UpdateWorkspaceRequestMetadata$Outbound | undefined;
|
|
57
58
|
enforce_enabled_models?: boolean | undefined;
|
|
58
59
|
chat_kit?: ChatKitResources$Outbound | undefined;
|
|
60
|
+
tracing_enabled?: boolean | undefined;
|
|
59
61
|
};
|
|
60
62
|
|
|
61
63
|
/** @internal */
|
|
@@ -72,12 +74,14 @@ export const UpdateWorkspaceRequest$outboundSchema: z.ZodType<
|
|
|
72
74
|
.optional(),
|
|
73
75
|
enforceEnabledModels: z.boolean().optional(),
|
|
74
76
|
chatKit: ChatKitResources$outboundSchema.optional(),
|
|
77
|
+
tracingEnabled: z.boolean().optional(),
|
|
75
78
|
}).transform((v) => {
|
|
76
79
|
return remap$(v, {
|
|
77
80
|
displayName: "display_name",
|
|
78
81
|
logoUrl: "logo_url",
|
|
79
82
|
enforceEnabledModels: "enforce_enabled_models",
|
|
80
83
|
chatKit: "chat_kit",
|
|
84
|
+
tracingEnabled: "tracing_enabled",
|
|
81
85
|
});
|
|
82
86
|
});
|
|
83
87
|
|
|
@@ -134,6 +134,38 @@ export class CreateClassifyRouterClassifyResponse422ResponseBody
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* The final model call exceeded its timeout after available retries and fallbacks were exhausted.
|
|
139
|
+
*/
|
|
140
|
+
export type CreateClassifyRouterClassifyResponse408ResponseBodyData = {
|
|
141
|
+
error: components.APIError;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The final model call exceeded its timeout after available retries and fallbacks were exhausted.
|
|
146
|
+
*/
|
|
147
|
+
export class CreateClassifyRouterClassifyResponse408ResponseBody
|
|
148
|
+
extends OrqError
|
|
149
|
+
{
|
|
150
|
+
error: components.APIError;
|
|
151
|
+
|
|
152
|
+
/** The original data that was passed to this error instance. */
|
|
153
|
+
data$: CreateClassifyRouterClassifyResponse408ResponseBodyData;
|
|
154
|
+
|
|
155
|
+
constructor(
|
|
156
|
+
err: CreateClassifyRouterClassifyResponse408ResponseBodyData,
|
|
157
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
158
|
+
) {
|
|
159
|
+
const message = err.error?.message
|
|
160
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
161
|
+
super(message, httpMeta);
|
|
162
|
+
this.data$ = err;
|
|
163
|
+
this.error = err.error;
|
|
164
|
+
|
|
165
|
+
this.name = "CreateClassifyRouterClassifyResponse408ResponseBody";
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
137
169
|
/**
|
|
138
170
|
* The API key lacks classify permission, or the workspace or project cannot access the model.
|
|
139
171
|
*/
|
|
@@ -195,14 +227,14 @@ export class CreateClassifyRouterClassifyResponseBody extends OrqError {
|
|
|
195
227
|
}
|
|
196
228
|
|
|
197
229
|
/**
|
|
198
|
-
* Malformed JSON, missing or unsupported model, or invalid retry
|
|
230
|
+
* Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
|
|
199
231
|
*/
|
|
200
232
|
export type CreateClassifyResponseBodyData = {
|
|
201
233
|
error: components.APIError;
|
|
202
234
|
};
|
|
203
235
|
|
|
204
236
|
/**
|
|
205
|
-
* Malformed JSON, missing or unsupported model, or invalid retry
|
|
237
|
+
* Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
|
|
206
238
|
*/
|
|
207
239
|
export class CreateClassifyResponseBody extends OrqError {
|
|
208
240
|
error: components.APIError;
|
|
@@ -304,6 +336,26 @@ export const CreateClassifyRouterClassifyResponse422ResponseBody$inboundSchema:
|
|
|
304
336
|
});
|
|
305
337
|
});
|
|
306
338
|
|
|
339
|
+
/** @internal */
|
|
340
|
+
export const CreateClassifyRouterClassifyResponse408ResponseBody$inboundSchema:
|
|
341
|
+
z.ZodType<
|
|
342
|
+
CreateClassifyRouterClassifyResponse408ResponseBody,
|
|
343
|
+
z.ZodTypeDef,
|
|
344
|
+
unknown
|
|
345
|
+
> = z.object({
|
|
346
|
+
error: components.APIError$inboundSchema,
|
|
347
|
+
request$: z.instanceof(Request),
|
|
348
|
+
response$: z.instanceof(Response),
|
|
349
|
+
body$: z.string(),
|
|
350
|
+
})
|
|
351
|
+
.transform((v) => {
|
|
352
|
+
return new CreateClassifyRouterClassifyResponse408ResponseBody(v, {
|
|
353
|
+
request: v.request$,
|
|
354
|
+
response: v.response$,
|
|
355
|
+
body: v.body$,
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
|
|
307
359
|
/** @internal */
|
|
308
360
|
export const CreateClassifyRouterClassifyResponseResponseBody$inboundSchema:
|
|
309
361
|
z.ZodType<
|
|
@@ -134,6 +134,38 @@ export class CreateDecisionsRouterDecisionsResponse422ResponseBody
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* The final model call exceeded its timeout after available retries and fallbacks were exhausted.
|
|
139
|
+
*/
|
|
140
|
+
export type CreateDecisionsRouterDecisionsResponse408ResponseBodyData = {
|
|
141
|
+
error: components.APIError;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The final model call exceeded its timeout after available retries and fallbacks were exhausted.
|
|
146
|
+
*/
|
|
147
|
+
export class CreateDecisionsRouterDecisionsResponse408ResponseBody
|
|
148
|
+
extends OrqError
|
|
149
|
+
{
|
|
150
|
+
error: components.APIError;
|
|
151
|
+
|
|
152
|
+
/** The original data that was passed to this error instance. */
|
|
153
|
+
data$: CreateDecisionsRouterDecisionsResponse408ResponseBodyData;
|
|
154
|
+
|
|
155
|
+
constructor(
|
|
156
|
+
err: CreateDecisionsRouterDecisionsResponse408ResponseBodyData,
|
|
157
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
158
|
+
) {
|
|
159
|
+
const message = err.error?.message
|
|
160
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
161
|
+
super(message, httpMeta);
|
|
162
|
+
this.data$ = err;
|
|
163
|
+
this.error = err.error;
|
|
164
|
+
|
|
165
|
+
this.name = "CreateDecisionsRouterDecisionsResponse408ResponseBody";
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
137
169
|
/**
|
|
138
170
|
* The API key lacks classify permission, or the workspace or project cannot access the model.
|
|
139
171
|
*/
|
|
@@ -197,14 +229,14 @@ export class CreateDecisionsRouterDecisionsResponseBody extends OrqError {
|
|
|
197
229
|
}
|
|
198
230
|
|
|
199
231
|
/**
|
|
200
|
-
* Malformed JSON, missing or unsupported model, or invalid retry
|
|
232
|
+
* Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
|
|
201
233
|
*/
|
|
202
234
|
export type CreateDecisionsResponseBodyData = {
|
|
203
235
|
error: components.APIError;
|
|
204
236
|
};
|
|
205
237
|
|
|
206
238
|
/**
|
|
207
|
-
* Malformed JSON, missing or unsupported model, or invalid retry
|
|
239
|
+
* Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
|
|
208
240
|
*/
|
|
209
241
|
export class CreateDecisionsResponseBody extends OrqError {
|
|
210
242
|
error: components.APIError;
|
|
@@ -306,6 +338,26 @@ export const CreateDecisionsRouterDecisionsResponse422ResponseBody$inboundSchema
|
|
|
306
338
|
});
|
|
307
339
|
});
|
|
308
340
|
|
|
341
|
+
/** @internal */
|
|
342
|
+
export const CreateDecisionsRouterDecisionsResponse408ResponseBody$inboundSchema:
|
|
343
|
+
z.ZodType<
|
|
344
|
+
CreateDecisionsRouterDecisionsResponse408ResponseBody,
|
|
345
|
+
z.ZodTypeDef,
|
|
346
|
+
unknown
|
|
347
|
+
> = z.object({
|
|
348
|
+
error: components.APIError$inboundSchema,
|
|
349
|
+
request$: z.instanceof(Request),
|
|
350
|
+
response$: z.instanceof(Response),
|
|
351
|
+
body$: z.string(),
|
|
352
|
+
})
|
|
353
|
+
.transform((v) => {
|
|
354
|
+
return new CreateDecisionsRouterDecisionsResponse408ResponseBody(v, {
|
|
355
|
+
request: v.request$,
|
|
356
|
+
response: v.response$,
|
|
357
|
+
body: v.body$,
|
|
358
|
+
});
|
|
359
|
+
});
|
|
360
|
+
|
|
309
361
|
/** @internal */
|
|
310
362
|
export const CreateDecisionsRouterDecisionsResponseResponseBody$inboundSchema:
|
|
311
363
|
z.ZodType<
|
|
@@ -12,7 +12,7 @@ export type ErrorT = {
|
|
|
12
12
|
message: string;
|
|
13
13
|
type: string;
|
|
14
14
|
param: string | null;
|
|
15
|
-
code: string;
|
|
15
|
+
code: string | null;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -51,7 +51,7 @@ export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
|
|
|
51
51
|
message: z.string(),
|
|
52
52
|
type: z.string(),
|
|
53
53
|
param: z.nullable(z.string()),
|
|
54
|
-
code: z.string(),
|
|
54
|
+
code: z.nullable(z.string()),
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
export function errorFromJSON(
|
|
@@ -82,7 +82,7 @@ export type CompactResponseRequestBody = {
|
|
|
82
82
|
*/
|
|
83
83
|
model?: string | undefined;
|
|
84
84
|
/**
|
|
85
|
-
* The ID of a
|
|
85
|
+
* The ID of a stored response whose conversation is compacted; input is appended after it.
|
|
86
86
|
*/
|
|
87
87
|
previousResponseId?: string | undefined;
|
|
88
88
|
/**
|
|
@@ -119,9 +119,9 @@ export type CompactResponseResponseBody = {
|
|
|
119
119
|
*/
|
|
120
120
|
object: CompactResponseObject;
|
|
121
121
|
/**
|
|
122
|
-
* The
|
|
122
|
+
* The next context window: a compaction item summarizing older items, followed by the most recent items verbatim. Pass it as the input of the next request, without previous_response_id.
|
|
123
123
|
*/
|
|
124
|
-
output: Array<
|
|
124
|
+
output: Array<any> | null;
|
|
125
125
|
usage: components.PublicUsage;
|
|
126
126
|
};
|
|
127
127
|
|
|
@@ -225,7 +225,7 @@ export const CompactResponseResponseBody$inboundSchema: z.ZodType<
|
|
|
225
225
|
created_at: z.number().int(),
|
|
226
226
|
id: z.string(),
|
|
227
227
|
object: CompactResponseObject$inboundSchema,
|
|
228
|
-
output: z.nullable(z.array(
|
|
228
|
+
output: z.nullable(z.array(z.any())),
|
|
229
229
|
usage: components.PublicUsage$inboundSchema,
|
|
230
230
|
}).transform((v) => {
|
|
231
231
|
return remap$(v, {
|
|
@@ -288,7 +288,7 @@ export type CreateChatCompletion24 = {
|
|
|
288
288
|
type: "file";
|
|
289
289
|
cacheControl?: CreateChatCompletion2CacheControl | undefined;
|
|
290
290
|
/**
|
|
291
|
-
* File data for the content part. Must contain
|
|
291
|
+
* File data for the content part. Must contain exactly one of file_data, file_id or uri.
|
|
292
292
|
*/
|
|
293
293
|
file: components.FileContentPartSchema;
|
|
294
294
|
};
|
|
@@ -87,6 +87,7 @@ export type Questions = NoulQuestion | ChoiceQuestion | ScoreQuestion;
|
|
|
87
87
|
export type State = string | { [k: string]: any } | Array<any>;
|
|
88
88
|
|
|
89
89
|
export type CreateClassifyRequestBody = {
|
|
90
|
+
cache?: components.ClassifyCacheConfig | undefined;
|
|
90
91
|
/**
|
|
91
92
|
* 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
|
*/
|
|
@@ -113,6 +114,7 @@ export type CreateClassifyRequestBody = {
|
|
|
113
114
|
* 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.
|
|
114
115
|
*/
|
|
115
116
|
state: string | { [k: string]: any } | Array<any>;
|
|
117
|
+
timeout?: components.ClassifyTimeoutConfig | undefined;
|
|
116
118
|
};
|
|
117
119
|
|
|
118
120
|
/**
|
|
@@ -311,6 +313,7 @@ export function stateToJSON(state: State): string {
|
|
|
311
313
|
|
|
312
314
|
/** @internal */
|
|
313
315
|
export type CreateClassifyRequestBody$Outbound = {
|
|
316
|
+
cache?: components.ClassifyCacheConfig$Outbound | undefined;
|
|
314
317
|
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
315
318
|
identity?: components.ResponseIdentity$Outbound | undefined;
|
|
316
319
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -324,6 +327,7 @@ export type CreateClassifyRequestBody$Outbound = {
|
|
|
324
327
|
};
|
|
325
328
|
retry?: components.ClassifyRetryConfig$Outbound | undefined;
|
|
326
329
|
state: string | { [k: string]: any } | Array<any>;
|
|
330
|
+
timeout?: components.ClassifyTimeoutConfig$Outbound | undefined;
|
|
327
331
|
};
|
|
328
332
|
|
|
329
333
|
/** @internal */
|
|
@@ -332,6 +336,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
332
336
|
z.ZodTypeDef,
|
|
333
337
|
CreateClassifyRequestBody
|
|
334
338
|
> = z.object({
|
|
339
|
+
cache: components.ClassifyCacheConfig$outboundSchema.optional(),
|
|
335
340
|
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
336
341
|
.optional(),
|
|
337
342
|
identity: components.ResponseIdentity$outboundSchema.optional(),
|
|
@@ -347,6 +352,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
347
352
|
),
|
|
348
353
|
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
349
354
|
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
355
|
+
timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
|
|
350
356
|
});
|
|
351
357
|
|
|
352
358
|
export function createClassifyRequestBodyToJSON(
|
|
@@ -95,6 +95,7 @@ export type CreateDecisionsQuestions =
|
|
|
95
95
|
export type CreateDecisionsState = string | { [k: string]: any } | Array<any>;
|
|
96
96
|
|
|
97
97
|
export type CreateDecisionsRequestBody = {
|
|
98
|
+
cache?: components.ClassifyCacheConfig | undefined;
|
|
98
99
|
/**
|
|
99
100
|
* 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
|
*/
|
|
@@ -126,6 +127,7 @@ export type CreateDecisionsRequestBody = {
|
|
|
126
127
|
* 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
|
*/
|
|
128
129
|
state: string | { [k: string]: any } | Array<any>;
|
|
130
|
+
timeout?: components.ClassifyTimeoutConfig | undefined;
|
|
129
131
|
};
|
|
130
132
|
|
|
131
133
|
/**
|
|
@@ -365,6 +367,7 @@ export function createDecisionsStateToJSON(
|
|
|
365
367
|
|
|
366
368
|
/** @internal */
|
|
367
369
|
export type CreateDecisionsRequestBody$Outbound = {
|
|
370
|
+
cache?: components.ClassifyCacheConfig$Outbound | undefined;
|
|
368
371
|
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
369
372
|
identity?: components.ResponseIdentity$Outbound | undefined;
|
|
370
373
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -378,6 +381,7 @@ export type CreateDecisionsRequestBody$Outbound = {
|
|
|
378
381
|
};
|
|
379
382
|
retry?: components.ClassifyRetryConfig$Outbound | undefined;
|
|
380
383
|
state: string | { [k: string]: any } | Array<any>;
|
|
384
|
+
timeout?: components.ClassifyTimeoutConfig$Outbound | undefined;
|
|
381
385
|
};
|
|
382
386
|
|
|
383
387
|
/** @internal */
|
|
@@ -386,6 +390,7 @@ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
|
|
|
386
390
|
z.ZodTypeDef,
|
|
387
391
|
CreateDecisionsRequestBody
|
|
388
392
|
> = z.object({
|
|
393
|
+
cache: components.ClassifyCacheConfig$outboundSchema.optional(),
|
|
389
394
|
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
390
395
|
.optional(),
|
|
391
396
|
identity: components.ResponseIdentity$outboundSchema.optional(),
|
|
@@ -401,6 +406,7 @@ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
|
|
|
401
406
|
),
|
|
402
407
|
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
403
408
|
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
409
|
+
timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
|
|
404
410
|
});
|
|
405
411
|
|
|
406
412
|
export function createDecisionsRequestBodyToJSON(
|
|
@@ -24,7 +24,7 @@ export type CreateModerationRequestBody = {
|
|
|
24
24
|
/**
|
|
25
25
|
* The content moderation model you would like to use. Defaults to omni-moderation-latest
|
|
26
26
|
*/
|
|
27
|
-
model
|
|
27
|
+
model?: string | undefined;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -352,7 +352,7 @@ export function inputToJSON(input: Input): string {
|
|
|
352
352
|
/** @internal */
|
|
353
353
|
export type CreateModerationRequestBody$Outbound = {
|
|
354
354
|
input: string | Array<string>;
|
|
355
|
-
model
|
|
355
|
+
model?: string | undefined;
|
|
356
356
|
};
|
|
357
357
|
|
|
358
358
|
/** @internal */
|
|
@@ -362,7 +362,7 @@ export const CreateModerationRequestBody$outboundSchema: z.ZodType<
|
|
|
362
362
|
CreateModerationRequestBody
|
|
363
363
|
> = z.object({
|
|
364
364
|
input: z.union([z.string(), z.array(z.string())]),
|
|
365
|
-
model: z.string(),
|
|
365
|
+
model: z.string().optional(),
|
|
366
366
|
});
|
|
367
367
|
|
|
368
368
|
export function createModerationRequestBodyToJSON(
|
|
@@ -337,7 +337,7 @@ export type CreatePrompt24 = {
|
|
|
337
337
|
type: "file";
|
|
338
338
|
cacheControl?: CreatePrompt2CacheControl | undefined;
|
|
339
339
|
/**
|
|
340
|
-
* File data for the content part. Must contain
|
|
340
|
+
* File data for the content part. Must contain exactly one of file_data, file_id or uri.
|
|
341
341
|
*/
|
|
342
342
|
file: components.FileContentPartSchema;
|
|
343
343
|
};
|
|
@@ -1416,8 +1416,10 @@ export const CreatePromptProvider = {
|
|
|
1416
1416
|
Reson8: "reson8",
|
|
1417
1417
|
Meta: "meta",
|
|
1418
1418
|
Greenpt: "greenpt",
|
|
1419
|
+
Liquid: "liquid",
|
|
1419
1420
|
Typesafe: "typesafe",
|
|
1420
1421
|
Berget: "berget",
|
|
1422
|
+
Cloudflare: "cloudflare",
|
|
1421
1423
|
Slack: "slack",
|
|
1422
1424
|
Orq: "orq",
|
|
1423
1425
|
} as const;
|
|
@@ -2249,7 +2251,7 @@ export type CreatePrompt2Prompts4 = {
|
|
|
2249
2251
|
type: "file";
|
|
2250
2252
|
cacheControl?: CreatePrompt2PromptsCacheControl | undefined;
|
|
2251
2253
|
/**
|
|
2252
|
-
* File data for the content part. Must contain
|
|
2254
|
+
* File data for the content part. Must contain exactly one of file_data, file_id or uri.
|
|
2253
2255
|
*/
|
|
2254
2256
|
file: components.FileContentPartSchema;
|
|
2255
2257
|
};
|