@orq-ai/node 4.17.0-rc.7 → 4.17.0-rc.8
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 +2 -2
- package/lib/config.js +2 -2
- 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/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/reasoningpart.js +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 +2 -0
- package/models/operations/createclassify.d.ts.map +1 -1
- package/models/operations/createclassify.js +1 -0
- package/models/operations/createclassify.js.map +1 -1
- package/models/operations/createdecisions.d.ts +2 -0
- package/models/operations/createdecisions.d.ts.map +1 -1
- package/models/operations/createdecisions.js +1 -0
- package/models/operations/createdecisions.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- 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/updatetool.js +4 -4
- package/package.json +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 +2 -2
- package/src/models/components/classifytimeoutconfig.ts +39 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/errors/createclassify.ts +54 -2
- package/src/models/errors/createdecisions.ts +54 -2
- package/src/models/operations/createclassify.ts +3 -0
- package/src/models/operations/createdecisions.ts +3 -0
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- 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/updatetool.ts +4 -4
- package/src/sdk/classify.ts +9 -1
- package/src/sdk/decisions.ts +9 -1
|
@@ -164,7 +164,7 @@ function retrieveToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
164
164
|
}
|
|
165
165
|
/** @internal */
|
|
166
166
|
exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
167
|
-
_id: z.string().default("
|
|
167
|
+
_id: z.string().default("tool_01M4H4GSXFDX4DW88PGE519VAT"),
|
|
168
168
|
path: z.string(),
|
|
169
169
|
key: z.string(),
|
|
170
170
|
display_name: z.string().optional(),
|
|
@@ -253,7 +253,7 @@ function retrieveToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
253
253
|
}
|
|
254
254
|
/** @internal */
|
|
255
255
|
exports.RetrieveToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
256
|
-
_id: z.string().default("
|
|
256
|
+
_id: z.string().default("tool_01M4H4GSXEZWREW9HMF6SN1J5G"),
|
|
257
257
|
path: z.string(),
|
|
258
258
|
key: z.string(),
|
|
259
259
|
display_name: z.string().optional(),
|
|
@@ -303,7 +303,7 @@ function retrieveToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
303
303
|
}
|
|
304
304
|
/** @internal */
|
|
305
305
|
exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
306
|
-
_id: z.string().default("
|
|
306
|
+
_id: z.string().default("tool_01M4H4GSXE8SE53C8ZZP09PPBF"),
|
|
307
307
|
path: z.string(),
|
|
308
308
|
key: z.string(),
|
|
309
309
|
display_name: z.string().optional(),
|
|
@@ -357,7 +357,7 @@ function retrieveToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
357
357
|
}
|
|
358
358
|
/** @internal */
|
|
359
359
|
exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
360
|
-
_id: z.string().default("
|
|
360
|
+
_id: z.string().default("tool_01M4H4GSXD7JX9JWJSHDK9BAZ5"),
|
|
361
361
|
path: z.string(),
|
|
362
362
|
key: z.string(),
|
|
363
363
|
display_name: z.string().optional(),
|
|
@@ -1098,7 +1098,7 @@ function agentToolInputRunSchemaToJSON(agentToolInputRunSchema) {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
/** @internal */
|
|
1100
1100
|
exports.Tools$outboundSchema = z.object({
|
|
1101
|
-
id: z.string().default("
|
|
1101
|
+
id: z.string().default("01M4H4GSV6TT5A03GCSC2JZQFA"),
|
|
1102
1102
|
name: z.string(),
|
|
1103
1103
|
description: z.string().optional(),
|
|
1104
1104
|
schema: z.lazy(() => exports.AgentToolInputRunSchema$outboundSchema),
|
|
@@ -1064,7 +1064,7 @@ function streamRunAgentAgentToolInputRunAgentsSchemaToJSON(streamRunAgentAgentTo
|
|
|
1064
1064
|
}
|
|
1065
1065
|
/** @internal */
|
|
1066
1066
|
exports.AgentToolInputRunTools$outboundSchema = z.object({
|
|
1067
|
-
id: z.string().default("
|
|
1067
|
+
id: z.string().default("01M4H4GSVQBDVVDN2AEWE5WXC7"),
|
|
1068
1068
|
name: z.string(),
|
|
1069
1069
|
description: z.string().optional(),
|
|
1070
1070
|
schema: z.lazy(() => exports.StreamRunAgentAgentToolInputRunAgentsSchema$outboundSchema),
|
|
@@ -536,7 +536,7 @@ function updateToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
536
536
|
}
|
|
537
537
|
/** @internal */
|
|
538
538
|
exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
539
|
-
_id: z.string().default("
|
|
539
|
+
_id: z.string().default("tool_01M4H4GSX7D9SQ1VMXQV6ZYSFM"),
|
|
540
540
|
path: z.string(),
|
|
541
541
|
key: z.string(),
|
|
542
542
|
display_name: z.string().optional(),
|
|
@@ -625,7 +625,7 @@ function updateToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
625
625
|
}
|
|
626
626
|
/** @internal */
|
|
627
627
|
exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
628
|
-
_id: z.string().default("
|
|
628
|
+
_id: z.string().default("tool_01M4H4GSX7QVTB8WK4B6JYVNK2"),
|
|
629
629
|
path: z.string(),
|
|
630
630
|
key: z.string(),
|
|
631
631
|
display_name: z.string().optional(),
|
|
@@ -675,7 +675,7 @@ function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
675
675
|
}
|
|
676
676
|
/** @internal */
|
|
677
677
|
exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
678
|
-
_id: z.string().default("
|
|
678
|
+
_id: z.string().default("tool_01M4H4GSX6WSZVKQWC5Y3TNR8J"),
|
|
679
679
|
path: z.string(),
|
|
680
680
|
key: z.string(),
|
|
681
681
|
display_name: z.string().optional(),
|
|
@@ -729,7 +729,7 @@ function updateToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
729
729
|
}
|
|
730
730
|
/** @internal */
|
|
731
731
|
exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
732
|
-
_id: z.string().default("
|
|
732
|
+
_id: z.string().default("tool_01M4H4GSX63ZG57TXSQ8Q4FFYS"),
|
|
733
733
|
path: z.string(),
|
|
734
734
|
key: z.string(),
|
|
735
735
|
display_name: z.string().optional(),
|
package/package.json
CHANGED
package/sdk/classify.d.ts
CHANGED
|
@@ -7,7 +7,15 @@ export declare class Classify extends ClientSDK {
|
|
|
7
7
|
* @remarks
|
|
8
8
|
* **Deprecated.** Use `POST /v3/router/decisions` and `orq.router.decisions.create()` for new integrations. This endpoint remains available for backward compatibility with the same request and response contract.
|
|
9
9
|
*
|
|
10
|
-
* **Beta.**
|
|
10
|
+
* **Beta.** Evaluate content against named questions and receive structured answers, probabilities, and usage costs. Send the content as `state` and define each entry in `questions` as:
|
|
11
|
+
*
|
|
12
|
+
* - `noul`: estimate the probability that a statement is true.
|
|
13
|
+
* - `choice`: select an option from a set.
|
|
14
|
+
* - `score`: rate the content on an ordered scale.
|
|
15
|
+
*
|
|
16
|
+
* Use a native decision model or a supported chat model. Configure ordered `fallbacks`, optional `retry`, and `timeout.call_timeout` in milliseconds. Each retry and fallback gets a fresh timeout; omit `retry` to move directly to the next fallback on timeout. The response identifies the model that answered.
|
|
17
|
+
*
|
|
18
|
+
* Requires the `classify` API-key permission. PII plugins and guardrails are not applied. See the [Decisions guide](/ai-gateway/features/decisions) for supported models, probability interpretation, and refusals.
|
|
11
19
|
*
|
|
12
20
|
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
13
21
|
*/
|
package/sdk/classify.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../src/sdk/classify.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IACrC
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../src/sdk/classify.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IACrC;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC;CAOlD"}
|
package/sdk/classify.js
CHANGED
|
@@ -14,7 +14,15 @@ class Classify extends sdks_js_1.ClientSDK {
|
|
|
14
14
|
* @remarks
|
|
15
15
|
* **Deprecated.** Use `POST /v3/router/decisions` and `orq.router.decisions.create()` for new integrations. This endpoint remains available for backward compatibility with the same request and response contract.
|
|
16
16
|
*
|
|
17
|
-
* **Beta.**
|
|
17
|
+
* **Beta.** Evaluate content against named questions and receive structured answers, probabilities, and usage costs. Send the content as `state` and define each entry in `questions` as:
|
|
18
|
+
*
|
|
19
|
+
* - `noul`: estimate the probability that a statement is true.
|
|
20
|
+
* - `choice`: select an option from a set.
|
|
21
|
+
* - `score`: rate the content on an ordered scale.
|
|
22
|
+
*
|
|
23
|
+
* Use a native decision model or a supported chat model. Configure ordered `fallbacks`, optional `retry`, and `timeout.call_timeout` in milliseconds. Each retry and fallback gets a fresh timeout; omit `retry` to move directly to the next fallback on timeout. The response identifies the model that answered.
|
|
24
|
+
*
|
|
25
|
+
* Requires the `classify` API-key permission. PII plugins and guardrails are not applied. See the [Decisions guide](/ai-gateway/features/decisions) for supported models, probability interpretation, and refusals.
|
|
18
26
|
*
|
|
19
27
|
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
20
28
|
*/
|
package/sdk/classify.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../src/sdk/classify.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAwE;AACxE,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC
|
|
1
|
+
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../src/sdk/classify.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAwE;AACxE,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,MAAM,CACV,OAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,4BA6BC"}
|
package/sdk/decisions.d.ts
CHANGED
|
@@ -5,7 +5,15 @@ export declare class Decisions extends ClientSDK {
|
|
|
5
5
|
* Decisions
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* **Beta.**
|
|
8
|
+
* **Beta.** Evaluate content against named questions and receive structured answers, probabilities, and usage costs. Send the content as `state` and define each entry in `questions` as:
|
|
9
|
+
*
|
|
10
|
+
* - `noul`: estimate the probability that a statement is true.
|
|
11
|
+
* - `choice`: select an option from a set.
|
|
12
|
+
* - `score`: rate the content on an ordered scale.
|
|
13
|
+
*
|
|
14
|
+
* Use a native decision model or a supported chat model. Configure ordered `fallbacks`, optional `retry`, and `timeout.call_timeout` in milliseconds. Each retry and fallback gets a fresh timeout; omit `retry` to move directly to the next fallback on timeout. The response identifies the model that answered.
|
|
15
|
+
*
|
|
16
|
+
* Requires the `classify` API-key permission. PII plugins and guardrails are not applied. See the [Decisions guide](/ai-gateway/features/decisions) for supported models, probability interpretation, and refusals.
|
|
9
17
|
*/
|
|
10
18
|
create(request: operations.CreateDecisionsRequestBody, options?: RequestOptions): Promise<operations.CreateDecisionsResponseBody>;
|
|
11
19
|
}
|
package/sdk/decisions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../src/sdk/decisions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,SAAU,SAAQ,SAAS;IACtC
|
|
1
|
+
{"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../src/sdk/decisions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;;;;;;;;;OAaG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;CAOnD"}
|
package/sdk/decisions.js
CHANGED
|
@@ -12,7 +12,15 @@ class Decisions extends sdks_js_1.ClientSDK {
|
|
|
12
12
|
* Decisions
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* **Beta.**
|
|
15
|
+
* **Beta.** Evaluate content against named questions and receive structured answers, probabilities, and usage costs. Send the content as `state` and define each entry in `questions` as:
|
|
16
|
+
*
|
|
17
|
+
* - `noul`: estimate the probability that a statement is true.
|
|
18
|
+
* - `choice`: select an option from a set.
|
|
19
|
+
* - `score`: rate the content on an ordered scale.
|
|
20
|
+
*
|
|
21
|
+
* Use a native decision model or a supported chat model. Configure ordered `fallbacks`, optional `retry`, and `timeout.call_timeout` in milliseconds. Each retry and fallback gets a fresh timeout; omit `retry` to move directly to the next fallback on timeout. The response identifies the model that answered.
|
|
22
|
+
*
|
|
23
|
+
* Requires the `classify` API-key permission. PII plugins and guardrails are not applied. See the [Decisions guide](/ai-gateway/features/decisions) for supported models, probability interpretation, and refusals.
|
|
16
24
|
*/
|
|
17
25
|
async create(request, options) {
|
|
18
26
|
return (0, fp_js_1.unwrapAsync)((0, routerDecisionsCreate_js_1.routerDecisionsCreate)(this, request, options));
|
package/sdk/decisions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisions.js","sourceRoot":"","sources":["../src/sdk/decisions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gFAA0E;AAC1E,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC
|
|
1
|
+
{"version":3,"file":"decisions.js","sourceRoot":"","sources":["../src/sdk/decisions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gFAA0E;AAC1E,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,CACV,OAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAzBD,8BAyBC"}
|
|
@@ -32,7 +32,15 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
* @remarks
|
|
33
33
|
* **Deprecated.** Use `POST /v3/router/decisions` and `orq.router.decisions.create()` for new integrations. This endpoint remains available for backward compatibility with the same request and response contract.
|
|
34
34
|
*
|
|
35
|
-
* **Beta.**
|
|
35
|
+
* **Beta.** Evaluate content against named questions and receive structured answers, probabilities, and usage costs. Send the content as `state` and define each entry in `questions` as:
|
|
36
|
+
*
|
|
37
|
+
* - `noul`: estimate the probability that a statement is true.
|
|
38
|
+
* - `choice`: select an option from a set.
|
|
39
|
+
* - `score`: rate the content on an ordered scale.
|
|
40
|
+
*
|
|
41
|
+
* Use a native decision model or a supported chat model. Configure ordered `fallbacks`, optional `retry`, and `timeout.call_timeout` in milliseconds. Each retry and fallback gets a fresh timeout; omit `retry` to move directly to the next fallback on timeout. The response identifies the model that answered.
|
|
42
|
+
*
|
|
43
|
+
* Requires the `classify` API-key permission. PII plugins and guardrails are not applied. See the [Decisions guide](/ai-gateway/features/decisions) for supported models, probability interpretation, and refusals.
|
|
36
44
|
*
|
|
37
45
|
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
38
46
|
*/
|
|
@@ -46,6 +54,7 @@ export function routerClassifyCreate(
|
|
|
46
54
|
| errors.CreateClassifyResponseBody
|
|
47
55
|
| errors.CreateClassifyRouterClassifyResponseBody
|
|
48
56
|
| errors.CreateClassifyRouterClassifyResponseResponseBody
|
|
57
|
+
| errors.CreateClassifyRouterClassifyResponse408ResponseBody
|
|
49
58
|
| errors.CreateClassifyRouterClassifyResponse422ResponseBody
|
|
50
59
|
| errors.CreateClassifyRouterClassifyResponse429ResponseBody
|
|
51
60
|
| errors.CreateClassifyRouterClassifyResponse500ResponseBody
|
|
@@ -78,6 +87,7 @@ async function $do(
|
|
|
78
87
|
| errors.CreateClassifyResponseBody
|
|
79
88
|
| errors.CreateClassifyRouterClassifyResponseBody
|
|
80
89
|
| errors.CreateClassifyRouterClassifyResponseResponseBody
|
|
90
|
+
| errors.CreateClassifyRouterClassifyResponse408ResponseBody
|
|
81
91
|
| errors.CreateClassifyRouterClassifyResponse422ResponseBody
|
|
82
92
|
| errors.CreateClassifyRouterClassifyResponse429ResponseBody
|
|
83
93
|
| errors.CreateClassifyRouterClassifyResponse500ResponseBody
|
|
@@ -167,6 +177,7 @@ async function $do(
|
|
|
167
177
|
| errors.CreateClassifyResponseBody
|
|
168
178
|
| errors.CreateClassifyRouterClassifyResponseBody
|
|
169
179
|
| errors.CreateClassifyRouterClassifyResponseResponseBody
|
|
180
|
+
| errors.CreateClassifyRouterClassifyResponse408ResponseBody
|
|
170
181
|
| errors.CreateClassifyRouterClassifyResponse422ResponseBody
|
|
171
182
|
| errors.CreateClassifyRouterClassifyResponse429ResponseBody
|
|
172
183
|
| errors.CreateClassifyRouterClassifyResponse500ResponseBody
|
|
@@ -190,6 +201,10 @@ async function $do(
|
|
|
190
201
|
403,
|
|
191
202
|
errors.CreateClassifyRouterClassifyResponseResponseBody$inboundSchema,
|
|
192
203
|
),
|
|
204
|
+
M.jsonErr(
|
|
205
|
+
408,
|
|
206
|
+
errors.CreateClassifyRouterClassifyResponse408ResponseBody$inboundSchema,
|
|
207
|
+
),
|
|
193
208
|
M.jsonErr(
|
|
194
209
|
422,
|
|
195
210
|
errors.CreateClassifyRouterClassifyResponse422ResponseBody$inboundSchema,
|
|
@@ -30,7 +30,15 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Decisions
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* **Beta.**
|
|
33
|
+
* **Beta.** Evaluate content against named questions and receive structured answers, probabilities, and usage costs. Send the content as `state` and define each entry in `questions` as:
|
|
34
|
+
*
|
|
35
|
+
* - `noul`: estimate the probability that a statement is true.
|
|
36
|
+
* - `choice`: select an option from a set.
|
|
37
|
+
* - `score`: rate the content on an ordered scale.
|
|
38
|
+
*
|
|
39
|
+
* Use a native decision model or a supported chat model. Configure ordered `fallbacks`, optional `retry`, and `timeout.call_timeout` in milliseconds. Each retry and fallback gets a fresh timeout; omit `retry` to move directly to the next fallback on timeout. The response identifies the model that answered.
|
|
40
|
+
*
|
|
41
|
+
* Requires the `classify` API-key permission. PII plugins and guardrails are not applied. See the [Decisions guide](/ai-gateway/features/decisions) for supported models, probability interpretation, and refusals.
|
|
34
42
|
*/
|
|
35
43
|
export function routerDecisionsCreate(
|
|
36
44
|
client: OrqCore,
|
|
@@ -42,6 +50,7 @@ export function routerDecisionsCreate(
|
|
|
42
50
|
| errors.CreateDecisionsResponseBody
|
|
43
51
|
| errors.CreateDecisionsRouterDecisionsResponseBody
|
|
44
52
|
| errors.CreateDecisionsRouterDecisionsResponseResponseBody
|
|
53
|
+
| errors.CreateDecisionsRouterDecisionsResponse408ResponseBody
|
|
45
54
|
| errors.CreateDecisionsRouterDecisionsResponse422ResponseBody
|
|
46
55
|
| errors.CreateDecisionsRouterDecisionsResponse429ResponseBody
|
|
47
56
|
| errors.CreateDecisionsRouterDecisionsResponse500ResponseBody
|
|
@@ -74,6 +83,7 @@ async function $do(
|
|
|
74
83
|
| errors.CreateDecisionsResponseBody
|
|
75
84
|
| errors.CreateDecisionsRouterDecisionsResponseBody
|
|
76
85
|
| errors.CreateDecisionsRouterDecisionsResponseResponseBody
|
|
86
|
+
| errors.CreateDecisionsRouterDecisionsResponse408ResponseBody
|
|
77
87
|
| errors.CreateDecisionsRouterDecisionsResponse422ResponseBody
|
|
78
88
|
| errors.CreateDecisionsRouterDecisionsResponse429ResponseBody
|
|
79
89
|
| errors.CreateDecisionsRouterDecisionsResponse500ResponseBody
|
|
@@ -164,6 +174,7 @@ async function $do(
|
|
|
164
174
|
| errors.CreateDecisionsResponseBody
|
|
165
175
|
| errors.CreateDecisionsRouterDecisionsResponseBody
|
|
166
176
|
| errors.CreateDecisionsRouterDecisionsResponseResponseBody
|
|
177
|
+
| errors.CreateDecisionsRouterDecisionsResponse408ResponseBody
|
|
167
178
|
| errors.CreateDecisionsRouterDecisionsResponse422ResponseBody
|
|
168
179
|
| errors.CreateDecisionsRouterDecisionsResponse429ResponseBody
|
|
169
180
|
| errors.CreateDecisionsRouterDecisionsResponse500ResponseBody
|
|
@@ -187,6 +198,11 @@ async function $do(
|
|
|
187
198
|
403,
|
|
188
199
|
errors.CreateDecisionsRouterDecisionsResponseResponseBody$inboundSchema,
|
|
189
200
|
),
|
|
201
|
+
M.jsonErr(
|
|
202
|
+
408,
|
|
203
|
+
errors
|
|
204
|
+
.CreateDecisionsRouterDecisionsResponse408ResponseBody$inboundSchema,
|
|
205
|
+
),
|
|
190
206
|
M.jsonErr(
|
|
191
207
|
422,
|
|
192
208
|
errors
|
package/src/lib/config.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "2.0",
|
|
61
|
-
sdkVersion: "4.17.0-rc.
|
|
61
|
+
sdkVersion: "4.17.0-rc.8",
|
|
62
62
|
genVersion: "2.946.0",
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 4.17.0-rc.
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 4.17.0-rc.8 2.946.0 2.0 @orq-ai/node",
|
|
64
64
|
} as const;
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
|
|
8
|
+
export type ClassifyTimeoutConfig = {
|
|
9
|
+
/**
|
|
10
|
+
* Timeout in milliseconds for each model call. Set 2000 for two seconds. When retry is configured, timeout errors (408) are automatically retried.
|
|
11
|
+
*/
|
|
12
|
+
callTimeout: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type ClassifyTimeoutConfig$Outbound = {
|
|
17
|
+
call_timeout: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ClassifyTimeoutConfig$outboundSchema: z.ZodType<
|
|
22
|
+
ClassifyTimeoutConfig$Outbound,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
ClassifyTimeoutConfig
|
|
25
|
+
> = z.object({
|
|
26
|
+
callTimeout: z.number().int(),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
callTimeout: "call_timeout",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function classifyTimeoutConfigToJSON(
|
|
34
|
+
classifyTimeoutConfig: ClassifyTimeoutConfig,
|
|
35
|
+
): string {
|
|
36
|
+
return JSON.stringify(
|
|
37
|
+
ClassifyTimeoutConfig$outboundSchema.parse(classifyTimeoutConfig),
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -91,6 +91,7 @@ export * from "./classifynoulanswer.js";
|
|
|
91
91
|
export * from "./classifyrefusalanswer.js";
|
|
92
92
|
export * from "./classifyretryconfig.js";
|
|
93
93
|
export * from "./classifyscoreanswer.js";
|
|
94
|
+
export * from "./classifytimeoutconfig.js";
|
|
94
95
|
export * from "./classifyusage.js";
|
|
95
96
|
export * from "./codeinterpretertoolinput.js";
|
|
96
97
|
export * from "./codetoolinput.js";
|
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01m4h4gsswce33sqxcdy6yk8s8"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -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<
|
|
@@ -113,6 +113,7 @@ export type CreateClassifyRequestBody = {
|
|
|
113
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.
|
|
114
114
|
*/
|
|
115
115
|
state: string | { [k: string]: any } | Array<any>;
|
|
116
|
+
timeout?: components.ClassifyTimeoutConfig | undefined;
|
|
116
117
|
};
|
|
117
118
|
|
|
118
119
|
/**
|
|
@@ -324,6 +325,7 @@ export type CreateClassifyRequestBody$Outbound = {
|
|
|
324
325
|
};
|
|
325
326
|
retry?: components.ClassifyRetryConfig$Outbound | undefined;
|
|
326
327
|
state: string | { [k: string]: any } | Array<any>;
|
|
328
|
+
timeout?: components.ClassifyTimeoutConfig$Outbound | undefined;
|
|
327
329
|
};
|
|
328
330
|
|
|
329
331
|
/** @internal */
|
|
@@ -347,6 +349,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
347
349
|
),
|
|
348
350
|
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
349
351
|
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
352
|
+
timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
|
|
350
353
|
});
|
|
351
354
|
|
|
352
355
|
export function createClassifyRequestBodyToJSON(
|
|
@@ -126,6 +126,7 @@ export type CreateDecisionsRequestBody = {
|
|
|
126
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
127
|
*/
|
|
128
128
|
state: string | { [k: string]: any } | Array<any>;
|
|
129
|
+
timeout?: components.ClassifyTimeoutConfig | undefined;
|
|
129
130
|
};
|
|
130
131
|
|
|
131
132
|
/**
|
|
@@ -378,6 +379,7 @@ export type CreateDecisionsRequestBody$Outbound = {
|
|
|
378
379
|
};
|
|
379
380
|
retry?: components.ClassifyRetryConfig$Outbound | undefined;
|
|
380
381
|
state: string | { [k: string]: any } | Array<any>;
|
|
382
|
+
timeout?: components.ClassifyTimeoutConfig$Outbound | undefined;
|
|
381
383
|
};
|
|
382
384
|
|
|
383
385
|
/** @internal */
|
|
@@ -401,6 +403,7 @@ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
|
|
|
401
403
|
),
|
|
402
404
|
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
403
405
|
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
406
|
+
timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
|
|
404
407
|
});
|
|
405
408
|
|
|
406
409
|
export function createDecisionsRequestBodyToJSON(
|
|
@@ -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_01M4H4GSX47EMC9A1DFA4BFYBH"),
|
|
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_01M4H4GSX3V0CXGEJGRFEQXXPM"),
|
|
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_01M4H4GSX25BPW648GDBQZB408"),
|
|
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_01M4H4GSX2YVB3D1A8ENXEGQ22"),
|
|
1959
1959
|
path: z.string(),
|
|
1960
1960
|
key: z.string(),
|
|
1961
1961
|
display_name: z.string().optional(),
|