@orq-ai/node 4.3.0-rc.6 → 4.3.0-rc.60
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 +16 -11
- package/examples/package-lock.json +3 -3
- package/funcs/agentsList.js +1 -1
- package/funcs/agentsList.js.map +1 -1
- package/funcs/evalsInvoke.d.ts +1 -1
- package/funcs/evalsInvoke.d.ts.map +1 -1
- package/funcs/evalsInvoke.js +2 -2
- package/funcs/evalsInvoke.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/event-streams.d.ts.map +1 -1
- package/lib/event-streams.js +40 -21
- package/lib/event-streams.js.map +1 -1
- package/models/components/agentstartedstreamingevent.d.ts +5 -0
- package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
- package/models/components/agentstartedstreamingevent.js +4 -0
- package/models/components/agentstartedstreamingevent.js.map +1 -1
- package/models/components/conversationresponse.js +1 -1
- package/models/components/conversationwithmessagesresponse.js +1 -1
- package/models/components/partdoneevent.js +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/toolexecutionstartedstreamingevent.d.ts +1 -0
- package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -1
- package/models/components/toolexecutionstartedstreamingevent.js +2 -0
- package/models/components/toolexecutionstartedstreamingevent.js.map +1 -1
- package/models/errors/invokeeval.d.ts +23 -3
- package/models/errors/invokeeval.d.ts.map +1 -1
- package/models/errors/invokeeval.js +28 -2
- package/models/errors/invokeeval.js.map +1 -1
- package/models/operations/createagentrequest.d.ts +9 -0
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +4 -0
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +2 -2
- package/models/operations/createcompletion.d.ts +2 -2
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createconversation.js +1 -1
- package/models/operations/createconversationresponse.js +2 -2
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +14 -14
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deployments.js +1 -1
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/fileget.js +1 -1
- package/models/operations/filelist.js +2 -2
- package/models/operations/filelist.js.map +1 -1
- package/models/operations/fileupload.js +1 -1
- package/models/operations/generateconversationname.js +1 -1
- package/models/operations/getallmemories.js +1 -1
- package/models/operations/getallmemories.js.map +1 -1
- package/models/operations/getallmemorydocuments.js +1 -1
- package/models/operations/getallmemorydocuments.js.map +1 -1
- package/models/operations/getallmemorystores.js +1 -1
- package/models/operations/getallmemorystores.js.map +1 -1
- package/models/operations/getallprompts.js +1 -1
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +15 -15
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getv2evaluatorsidversions.js +1 -1
- package/models/operations/getv2evaluatorsidversions.js.map +1 -1
- package/models/operations/getv2toolstoolidversions.js +1 -1
- package/models/operations/getv2toolstoolidversions.js.map +1 -1
- package/models/operations/invokeeval.d.ts +15 -1
- package/models/operations/invokeeval.d.ts.map +1 -1
- package/models/operations/invokeeval.js +12 -1
- package/models/operations/invokeeval.js.map +1 -1
- package/models/operations/listagents.d.ts +4 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +2 -0
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listchunks.js +1 -1
- package/models/operations/listchunks.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasetdatapoints.js.map +1 -1
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasets.js.map +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +2 -2
- package/models/operations/listidentities.js.map +1 -1
- package/models/operations/listknowledgebases.js +1 -1
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.js +1 -1
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrieveagentrequest.d.ts +4 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +2 -0
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +5 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +3 -1
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/searchknowledge.d.ts +2 -2
- package/models/operations/streamrunagent.d.ts +5 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +3 -1
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +9 -0
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +4 -0
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updateconversation.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +14 -14
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatememorydocument.d.ts +2 -2
- package/models/operations/updatememorydocument.d.ts.map +1 -1
- package/models/operations/updatememorydocument.js +1 -1
- package/models/operations/updatememorydocument.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +3 -3
- package/sdk/agents.d.ts +7 -7
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +9 -9
- package/sdk/agents.js.map +1 -1
- package/src/funcs/agentsList.ts +1 -1
- package/src/funcs/evalsInvoke.ts +7 -3
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +37 -20
- package/src/models/components/agentstartedstreamingevent.ts +9 -0
- package/src/models/components/conversationresponse.ts +1 -1
- package/src/models/components/conversationwithmessagesresponse.ts +1 -1
- package/src/models/components/partdoneevent.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/toolexecutionstartedstreamingevent.ts +3 -0
- package/src/models/errors/invokeeval.ts +48 -3
- package/src/models/operations/createagentrequest.ts +13 -0
- package/src/models/operations/createchatcompletion.ts +2 -2
- package/src/models/operations/createcompletion.ts +2 -2
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createconversation.ts +1 -1
- package/src/models/operations/createconversationresponse.ts +2 -2
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +14 -14
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deployments.ts +1 -1
- package/src/models/operations/fileget.ts +1 -1
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +1 -1
- package/src/models/operations/generateconversationname.ts +1 -1
- package/src/models/operations/getallmemories.ts +1 -1
- package/src/models/operations/getallmemorydocuments.ts +1 -1
- package/src/models/operations/getallmemorystores.ts +1 -1
- package/src/models/operations/getallprompts.ts +1 -1
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +15 -15
- package/src/models/operations/getv2evaluatorsidversions.ts +1 -1
- package/src/models/operations/getv2toolstoolidversions.ts +1 -1
- package/src/models/operations/invokeeval.ts +34 -1
- package/src/models/operations/listagents.ts +6 -0
- package/src/models/operations/listchunks.ts +1 -1
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +2 -2
- package/src/models/operations/listknowledgebases.ts +1 -1
- package/src/models/operations/listpromptversions.ts +1 -1
- package/src/models/operations/retrieveagentrequest.ts +6 -0
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +8 -1
- package/src/models/operations/searchknowledge.ts +2 -2
- package/src/models/operations/streamrunagent.ts +8 -1
- package/src/models/operations/updateagent.ts +13 -0
- package/src/models/operations/updateconversation.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +14 -14
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatememorydocument.ts +3 -3
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/agents.ts +21 -21
|
@@ -339,7 +339,7 @@ function updateToolRequestBodyToolsSchemaToJSON(updateToolRequestBodyToolsSchema
|
|
|
339
339
|
}
|
|
340
340
|
/** @internal */
|
|
341
341
|
exports.RequestBodyTools$outboundSchema = z.object({
|
|
342
|
-
id: z.string().default("
|
|
342
|
+
id: z.string().default("01KH91GGYCDXY3Y0786YB3TQZ9"),
|
|
343
343
|
name: z.string(),
|
|
344
344
|
description: z.string().optional(),
|
|
345
345
|
schema: z.lazy(() => exports.UpdateToolRequestBodyToolsSchema$outboundSchema),
|
|
@@ -612,7 +612,7 @@ function updateToolResponseBodyCodeToolFromJSON(jsonString) {
|
|
|
612
612
|
}
|
|
613
613
|
/** @internal */
|
|
614
614
|
exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
|
|
615
|
-
_id: z.string().default("
|
|
615
|
+
_id: z.string().default("tool_01KH91GGXYZSWSRCMTJDBF2ZDJ"),
|
|
616
616
|
path: z.string(),
|
|
617
617
|
key: z.string(),
|
|
618
618
|
display_name: z.string().optional(),
|
|
@@ -667,7 +667,7 @@ function updateToolResponseBodyToolsSchemaFromJSON(jsonString) {
|
|
|
667
667
|
}
|
|
668
668
|
/** @internal */
|
|
669
669
|
exports.UpdateToolResponseBodyTools$inboundSchema = z.object({
|
|
670
|
-
id: z.string().default("
|
|
670
|
+
id: z.string().default("01KH91GGXX8XRKQJ9N4ZC9FZWJ"),
|
|
671
671
|
name: z.string(),
|
|
672
672
|
description: z.string().optional(),
|
|
673
673
|
schema: z.lazy(() => exports.UpdateToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -695,7 +695,7 @@ function updateToolResponseBodyMcpFromJSON(jsonString) {
|
|
|
695
695
|
}
|
|
696
696
|
/** @internal */
|
|
697
697
|
exports.UpdateToolResponseBodyMCPTool$inboundSchema = z.object({
|
|
698
|
-
_id: z.string().default("
|
|
698
|
+
_id: z.string().default("tool_01KH91GGXWXE48N6TKY2SV5WGB"),
|
|
699
699
|
path: z.string(),
|
|
700
700
|
key: z.string(),
|
|
701
701
|
display_name: z.string().optional(),
|
|
@@ -784,7 +784,7 @@ function updateToolResponseBodyHttpFromJSON(jsonString) {
|
|
|
784
784
|
}
|
|
785
785
|
/** @internal */
|
|
786
786
|
exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
|
|
787
|
-
_id: z.string().default("
|
|
787
|
+
_id: z.string().default("tool_01KH91GGXT5CQKY6QYN4SBQG27"),
|
|
788
788
|
path: z.string(),
|
|
789
789
|
key: z.string(),
|
|
790
790
|
display_name: z.string().optional(),
|
|
@@ -836,7 +836,7 @@ function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
|
|
|
836
836
|
}
|
|
837
837
|
/** @internal */
|
|
838
838
|
exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
|
|
839
|
-
_id: z.string().default("
|
|
839
|
+
_id: z.string().default("tool_01KH91GGXS4XZQC4HKSG0TNZ2V"),
|
|
840
840
|
path: z.string(),
|
|
841
841
|
key: z.string(),
|
|
842
842
|
display_name: z.string().optional(),
|
|
@@ -892,7 +892,7 @@ function updateToolResponseBodyFunctionFromJSON(jsonString) {
|
|
|
892
892
|
}
|
|
893
893
|
/** @internal */
|
|
894
894
|
exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
|
|
895
|
-
_id: z.string().default("
|
|
895
|
+
_id: z.string().default("tool_01KH91GGXQ8QQ6WZV6SWNENR2J"),
|
|
896
896
|
path: z.string(),
|
|
897
897
|
key: z.string(),
|
|
898
898
|
display_name: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orq-ai/node",
|
|
3
|
-
"version": "4.3.0-rc.
|
|
3
|
+
"version": "4.3.0-rc.60",
|
|
4
4
|
"author": "Orq",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@eslint/js": "^9.
|
|
22
|
-
"eslint": "^9.
|
|
21
|
+
"@eslint/js": "^9.26.0",
|
|
22
|
+
"eslint": "^9.26.0",
|
|
23
23
|
"globals": "^15.14.0",
|
|
24
24
|
"typescript": "~5.8.3",
|
|
25
25
|
"typescript-eslint": "^8.26.0"
|
package/sdk/agents.d.ts
CHANGED
|
@@ -12,6 +12,13 @@ export declare class Agents extends ClientSDK {
|
|
|
12
12
|
* Creates a new agent with the specified configuration, including model selection, instructions, tools, and knowledge bases. Agents are intelligent assistants that can execute tasks, interact with tools, and maintain context through memory stores. The agent can be configured with a primary model and optional fallback models for automatic failover, custom instructions for behavior control, and various settings to control execution limits and tool usage.
|
|
13
13
|
*/
|
|
14
14
|
create(request: operations.CreateAgentRequestRequestBody, options?: RequestOptions): Promise<operations.CreateAgentRequestResponseBody>;
|
|
15
|
+
/**
|
|
16
|
+
* List agents
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
|
|
20
|
+
*/
|
|
21
|
+
list(limit?: number | undefined, startingAfter?: string | undefined, endingBefore?: string | undefined, options?: RequestOptions): Promise<operations.ListAgentsResponseBody>;
|
|
15
22
|
/**
|
|
16
23
|
* Delete agent
|
|
17
24
|
*
|
|
@@ -42,13 +49,6 @@ export declare class Agents extends ClientSDK {
|
|
|
42
49
|
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
43
50
|
*/
|
|
44
51
|
invoke(key: string, requestBody?: operations.InvokeAgentRequestBody | undefined, options?: RequestOptions): Promise<operations.InvokeAgentA2ATaskResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* List agents
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
|
|
50
|
-
*/
|
|
51
|
-
list(limit?: number | undefined, startingAfter?: string | undefined, endingBefore?: string | undefined, options?: RequestOptions): Promise<operations.ListAgentsResponseBody>;
|
|
52
52
|
/**
|
|
53
53
|
* Run an agent with configuration
|
|
54
54
|
*
|
package/sdk/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/sdk/agents.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3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WAAW,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAQ9D;;;;;;;OAOG;IACG,MAAM,CACV,WAAW,EAAE,UAAU,CAAC,sBAAsB,EAC9C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;CAQ5D"}
|
package/sdk/agents.js
CHANGED
|
@@ -29,6 +29,15 @@ class Agents extends sdks_js_1.ClientSDK {
|
|
|
29
29
|
async create(request, options) {
|
|
30
30
|
return (0, fp_js_1.unwrapAsync)((0, agentsCreate_js_1.agentsCreate)(this, request, options));
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* List agents
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
|
|
37
|
+
*/
|
|
38
|
+
async list(limit, startingAfter, endingBefore, options) {
|
|
39
|
+
return (0, fp_js_1.unwrapAsync)((0, agentsList_js_1.agentsList)(this, limit, startingAfter, endingBefore, options));
|
|
40
|
+
}
|
|
32
41
|
/**
|
|
33
42
|
* Delete agent
|
|
34
43
|
*
|
|
@@ -67,15 +76,6 @@ class Agents extends sdks_js_1.ClientSDK {
|
|
|
67
76
|
async invoke(key, requestBody, options) {
|
|
68
77
|
return (0, fp_js_1.unwrapAsync)((0, agentsInvoke_js_1.agentsInvoke)(this, key, requestBody, options));
|
|
69
78
|
}
|
|
70
|
-
/**
|
|
71
|
-
* List agents
|
|
72
|
-
*
|
|
73
|
-
* @remarks
|
|
74
|
-
* Retrieves a comprehensive list of agents configured in your workspace. Supports pagination for large datasets and returns agents sorted by creation date (newest first). Each agent in the response includes its complete configuration: model settings with fallback options, instructions, tools, knowledge bases, memory stores, and execution parameters. Use pagination parameters to efficiently navigate through large collections of agents.
|
|
75
|
-
*/
|
|
76
|
-
async list(limit, startingAfter, endingBefore, options) {
|
|
77
|
-
return (0, fp_js_1.unwrapAsync)((0, agentsList_js_1.agentsList)(this, limit, startingAfter, endingBefore, options));
|
|
78
|
-
}
|
|
79
79
|
/**
|
|
80
80
|
* Run an agent with configuration
|
|
81
81
|
*
|
package/sdk/agents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/sdk/agents.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,8DAAwD;AACxD,8DAAwD;AACxD,0DAAoD;AACpD,kEAA4D;AAC5D,wDAAkD;AAClD,8DAAwD;AACxD,oEAA8D;AAC9D,8DAAwD;AAExD,4CAA2D;AAE3D,0CAA6C;AAC7C,iDAA2C;AAE3C,MAAa,MAAO,SAAQ,mBAAS;IAEnC,IAAI,SAAS;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,KAAf,IAAI,CAAC,UAAU,GAAK,IAAI,wBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/sdk/agents.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,8DAAwD;AACxD,8DAAwD;AACxD,0DAAoD;AACpD,kEAA4D;AAC5D,wDAAkD;AAClD,8DAAwD;AACxD,oEAA8D;AAC9D,8DAAwD;AAExD,4CAA2D;AAE3D,0CAA6C;AAC7C,iDAA2C;AAE3C,MAAa,MAA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Y,EAC7B,IAAI,EACJ,GAAG,EACH,WAAW,EACX,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,GAAG,CACP,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wBAAS,EAC1B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,SAAS,CACb,OAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CACV,WAA8C,EAC9C,GAAW,EACX,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,WAAW,EACX,GAAG,EACH,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAhLD,wBAgLC"}
|
package/src/funcs/agentsList.ts
CHANGED
package/src/funcs/evalsInvoke.ts
CHANGED
|
@@ -37,6 +37,7 @@ export function evalsInvoke(
|
|
|
37
37
|
operations.InvokeEvalResponseBody,
|
|
38
38
|
| errors.InvokeEvalResponseBody
|
|
39
39
|
| errors.InvokeEvalEvalsResponseBody
|
|
40
|
+
| errors.InvokeEvalEvalsResponseResponseBody
|
|
40
41
|
| OrqError
|
|
41
42
|
| ResponseValidationError
|
|
42
43
|
| ConnectionError
|
|
@@ -64,6 +65,7 @@ async function $do(
|
|
|
64
65
|
operations.InvokeEvalResponseBody,
|
|
65
66
|
| errors.InvokeEvalResponseBody
|
|
66
67
|
| errors.InvokeEvalEvalsResponseBody
|
|
68
|
+
| errors.InvokeEvalEvalsResponseResponseBody
|
|
67
69
|
| OrqError
|
|
68
70
|
| ResponseValidationError
|
|
69
71
|
| ConnectionError
|
|
@@ -137,7 +139,7 @@ async function $do(
|
|
|
137
139
|
|
|
138
140
|
const doResult = await client._do(req, {
|
|
139
141
|
context,
|
|
140
|
-
errorCodes: ["404", "4XX", "500", "5XX"],
|
|
142
|
+
errorCodes: ["400", "404", "4XX", "500", "5XX"],
|
|
141
143
|
retryConfig: context.retryConfig,
|
|
142
144
|
retryCodes: context.retryCodes,
|
|
143
145
|
});
|
|
@@ -154,6 +156,7 @@ async function $do(
|
|
|
154
156
|
operations.InvokeEvalResponseBody,
|
|
155
157
|
| errors.InvokeEvalResponseBody
|
|
156
158
|
| errors.InvokeEvalEvalsResponseBody
|
|
159
|
+
| errors.InvokeEvalEvalsResponseResponseBody
|
|
157
160
|
| OrqError
|
|
158
161
|
| ResponseValidationError
|
|
159
162
|
| ConnectionError
|
|
@@ -164,8 +167,9 @@ async function $do(
|
|
|
164
167
|
| SDKValidationError
|
|
165
168
|
>(
|
|
166
169
|
M.json(200, operations.InvokeEvalResponseBody$inboundSchema),
|
|
167
|
-
M.jsonErr(
|
|
168
|
-
M.jsonErr(
|
|
170
|
+
M.jsonErr(400, errors.InvokeEvalResponseBody$inboundSchema),
|
|
171
|
+
M.jsonErr(404, errors.InvokeEvalEvalsResponseBody$inboundSchema),
|
|
172
|
+
M.jsonErr(500, errors.InvokeEvalEvalsResponseResponseBody$inboundSchema),
|
|
169
173
|
M.fail("4XX"),
|
|
170
174
|
M.fail("5XX"),
|
|
171
175
|
)(response, req, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "2.0",
|
|
71
|
-
sdkVersion: "4.3.0-rc.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 4.3.0-rc.
|
|
71
|
+
sdkVersion: "4.3.0-rc.60",
|
|
72
|
+
genVersion: "2.821.4",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 4.3.0-rc.60 2.821.4 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
package/src/lib/event-streams.ts
CHANGED
|
@@ -17,6 +17,7 @@ export class EventStream<T extends SseMessage<unknown>>
|
|
|
17
17
|
) {
|
|
18
18
|
const upstream = responseBody.getReader();
|
|
19
19
|
let buffer: Uint8Array = new Uint8Array();
|
|
20
|
+
const state = { eventId: undefined as string | undefined };
|
|
20
21
|
super({
|
|
21
22
|
async pull(downstream) {
|
|
22
23
|
try {
|
|
@@ -30,7 +31,7 @@ export class EventStream<T extends SseMessage<unknown>>
|
|
|
30
31
|
}
|
|
31
32
|
const message = buffer.slice(0, match.index);
|
|
32
33
|
buffer = buffer.slice(match.index + match.length);
|
|
33
|
-
const item = parseMessage(message, parse);
|
|
34
|
+
const item = parseMessage(message, parse, state);
|
|
34
35
|
if (item && !item.done) return downstream.enqueue(item.value);
|
|
35
36
|
if (item?.done) {
|
|
36
37
|
await upstream.cancel("done");
|
|
@@ -84,24 +85,35 @@ function concatBuffer(a: Uint8Array, b: Uint8Array): Uint8Array {
|
|
|
84
85
|
return c;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
const CR = 13;
|
|
89
|
+
const LF = 10;
|
|
90
|
+
const BOUNDARIES = [
|
|
91
|
+
[CR, LF, CR, LF], // \r\n\r\n
|
|
92
|
+
[CR, LF, CR], // \r\n\r
|
|
93
|
+
[CR, LF, LF], // \r\n\n
|
|
94
|
+
[CR, CR, LF], // \r\r\n
|
|
95
|
+
[LF, CR, LF], // \n\r\n
|
|
96
|
+
[CR, CR], // \r\r
|
|
97
|
+
[LF, CR], // \n\r
|
|
98
|
+
[LF, LF], // \n\n
|
|
99
|
+
];
|
|
100
|
+
|
|
88
101
|
function findBoundary(
|
|
89
102
|
buf: Uint8Array,
|
|
90
103
|
): { index: number; length: number } | null {
|
|
91
104
|
const len = buf.length;
|
|
92
105
|
for (let i = 0; i < len; i++) {
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return { index: i, length: 2 };
|
|
106
|
+
if (buf[i] !== CR && buf[i] !== LF) continue;
|
|
107
|
+
for (const boundary of BOUNDARIES) {
|
|
108
|
+
if (i + boundary.length > len) continue;
|
|
109
|
+
let match = true;
|
|
110
|
+
for (let j = 0; j < boundary.length; j++) {
|
|
111
|
+
if (buf[i + j] !== boundary[j]) {
|
|
112
|
+
match = false;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (match) return { index: i, length: boundary.length };
|
|
105
117
|
}
|
|
106
118
|
}
|
|
107
119
|
return null;
|
|
@@ -109,6 +121,7 @@ function findBoundary(
|
|
|
109
121
|
function parseMessage<T extends SseMessage<unknown>>(
|
|
110
122
|
chunk: Uint8Array,
|
|
111
123
|
parse: (x: SseMessage<string>) => IteratorResult<T, undefined>,
|
|
124
|
+
state: { eventId: string | undefined },
|
|
112
125
|
) {
|
|
113
126
|
const text = new TextDecoder().decode(chunk);
|
|
114
127
|
const lines = text.split(/\r\n|\r|\n/);
|
|
@@ -119,17 +132,21 @@ function parseMessage<T extends SseMessage<unknown>>(
|
|
|
119
132
|
if (!line || line.startsWith(":")) continue;
|
|
120
133
|
ignore = false;
|
|
121
134
|
const i = line.indexOf(":");
|
|
122
|
-
|
|
123
|
-
|
|
135
|
+
let field = line;
|
|
136
|
+
let value = "";
|
|
137
|
+
if (i > 0) {
|
|
138
|
+
field = line.slice(0, i);
|
|
139
|
+
value = line[i + 1] === " " ? line.slice(i + 2) : line.slice(i + 1);
|
|
140
|
+
}
|
|
124
141
|
if (field === "data") dataLines.push(value);
|
|
125
142
|
else if (field === "event") ret.event = value;
|
|
126
|
-
else if (field === "id")
|
|
127
|
-
else if (field === "retry") {
|
|
128
|
-
|
|
129
|
-
if (!isNaN(n)) ret.retry = n;
|
|
143
|
+
else if (field === "id" && !value.includes("\0")) state.eventId = value;
|
|
144
|
+
else if (field === "retry" && /^\d+$/.test(value)) {
|
|
145
|
+
ret.retry = Number(value);
|
|
130
146
|
}
|
|
131
147
|
}
|
|
132
148
|
if (ignore) return;
|
|
149
|
+
ret.id = state.eventId;
|
|
133
150
|
if (dataLines.length) ret.data = dataLines.join("\n");
|
|
134
151
|
return parse(ret);
|
|
135
152
|
}
|
|
@@ -174,6 +174,10 @@ export type Settings = {
|
|
|
174
174
|
* Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
|
|
175
175
|
*/
|
|
176
176
|
maxExecutionTime: number;
|
|
177
|
+
/**
|
|
178
|
+
* Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
|
|
179
|
+
*/
|
|
180
|
+
maxCost: number;
|
|
177
181
|
/**
|
|
178
182
|
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
179
183
|
*/
|
|
@@ -199,6 +203,7 @@ export type AgentStartedStreamingEventData = {
|
|
|
199
203
|
settings?: Settings | undefined;
|
|
200
204
|
agentManifestId: string;
|
|
201
205
|
agentKey: string;
|
|
206
|
+
agentDescription?: string | null | undefined;
|
|
202
207
|
variables?: { [k: string]: any } | undefined;
|
|
203
208
|
toolExecutionId?: string | undefined;
|
|
204
209
|
isContinuation?: boolean | undefined;
|
|
@@ -407,6 +412,7 @@ export const Settings$inboundSchema: z.ZodType<
|
|
|
407
412
|
> = z.object({
|
|
408
413
|
max_iterations: z.number().int().default(100),
|
|
409
414
|
max_execution_time: z.number().int().default(600),
|
|
415
|
+
max_cost: z.number().default(0),
|
|
410
416
|
tool_approval_required: ToolApprovalRequired$inboundSchema.default(
|
|
411
417
|
"respect_tool",
|
|
412
418
|
),
|
|
@@ -417,6 +423,7 @@ export const Settings$inboundSchema: z.ZodType<
|
|
|
417
423
|
return remap$(v, {
|
|
418
424
|
"max_iterations": "maxIterations",
|
|
419
425
|
"max_execution_time": "maxExecutionTime",
|
|
426
|
+
"max_cost": "maxCost",
|
|
420
427
|
"tool_approval_required": "toolApprovalRequired",
|
|
421
428
|
});
|
|
422
429
|
});
|
|
@@ -446,6 +453,7 @@ export const AgentStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
446
453
|
settings: z.lazy(() => Settings$inboundSchema).optional(),
|
|
447
454
|
agent_manifest_id: z.string(),
|
|
448
455
|
agent_key: z.string(),
|
|
456
|
+
agent_description: z.nullable(z.string()).optional(),
|
|
449
457
|
variables: z.record(z.any()).optional(),
|
|
450
458
|
tool_execution_id: z.string().optional(),
|
|
451
459
|
is_continuation: z.boolean().optional(),
|
|
@@ -457,6 +465,7 @@ export const AgentStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
457
465
|
"system_prompt": "systemPrompt",
|
|
458
466
|
"agent_manifest_id": "agentManifestId",
|
|
459
467
|
"agent_key": "agentKey",
|
|
468
|
+
"agent_description": "agentDescription",
|
|
460
469
|
"tool_execution_id": "toolExecutionId",
|
|
461
470
|
"is_continuation": "isContinuation",
|
|
462
471
|
});
|
|
@@ -107,7 +107,7 @@ export const ConversationResponse$inboundSchema: z.ZodType<
|
|
|
107
107
|
z.ZodTypeDef,
|
|
108
108
|
unknown
|
|
109
109
|
> = z.object({
|
|
110
|
-
_id: z.string().default("
|
|
110
|
+
_id: z.string().default("conv_01kh91gghxenkjd24bzx9e3kh9"),
|
|
111
111
|
kind: ConversationResponseKind$inboundSchema,
|
|
112
112
|
displayName: z.string(),
|
|
113
113
|
createdAt: z.number(),
|
|
@@ -122,7 +122,7 @@ export const ConversationWithMessagesResponse$inboundSchema: z.ZodType<
|
|
|
122
122
|
z.ZodTypeDef,
|
|
123
123
|
unknown
|
|
124
124
|
> = z.object({
|
|
125
|
-
_id: z.string().default("
|
|
125
|
+
_id: z.string().default("conv_01kh91ggjfyfg809y7a1gan9xe"),
|
|
126
126
|
kind: ConversationWithMessagesResponseKind$inboundSchema,
|
|
127
127
|
displayName: z.string(),
|
|
128
128
|
createdAt: z.number(),
|
|
@@ -76,7 +76,7 @@ export const PartReasoningPart$inboundSchema: z.ZodType<
|
|
|
76
76
|
z.ZodTypeDef,
|
|
77
77
|
unknown
|
|
78
78
|
> = z.object({
|
|
79
|
-
_id: z.string().default("
|
|
79
|
+
_id: z.string().default("reasoning_01kh91gg71d5ygv4c9d705vw6b"),
|
|
80
80
|
metadata: z.record(z.any()).optional(),
|
|
81
81
|
kind: PartKind$inboundSchema,
|
|
82
82
|
reasoning: z.string(),
|
|
@@ -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_01kh91gg6vves3d8dd2jpj3f00"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -58,6 +58,7 @@ export type ToolExecutionStartedStreamingEventData = {
|
|
|
58
58
|
toolId: string;
|
|
59
59
|
toolKey?: string | undefined;
|
|
60
60
|
toolDisplayName?: string | undefined;
|
|
61
|
+
toolDescription?: string | null | undefined;
|
|
61
62
|
actionType: string;
|
|
62
63
|
toolArguments: { [k: string]: any };
|
|
63
64
|
toolExecutionContext: ToolExecutionContext;
|
|
@@ -146,6 +147,7 @@ export const ToolExecutionStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
146
147
|
tool_id: z.string(),
|
|
147
148
|
tool_key: z.string().optional(),
|
|
148
149
|
tool_display_name: z.string().optional(),
|
|
150
|
+
tool_description: z.nullable(z.string()).optional(),
|
|
149
151
|
action_type: z.string(),
|
|
150
152
|
tool_arguments: z.record(z.any()),
|
|
151
153
|
tool_execution_context: z.lazy(() => ToolExecutionContext$inboundSchema),
|
|
@@ -157,6 +159,7 @@ export const ToolExecutionStartedStreamingEventData$inboundSchema: z.ZodType<
|
|
|
157
159
|
"tool_id": "toolId",
|
|
158
160
|
"tool_key": "toolKey",
|
|
159
161
|
"tool_display_name": "toolDisplayName",
|
|
162
|
+
"tool_description": "toolDescription",
|
|
160
163
|
"action_type": "actionType",
|
|
161
164
|
"tool_arguments": "toolArguments",
|
|
162
165
|
"tool_execution_context": "toolExecutionContext",
|
|
@@ -8,13 +8,39 @@ import { OrqError } from "./orqerror.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* Error running the evaluator
|
|
10
10
|
*/
|
|
11
|
-
export type
|
|
11
|
+
export type InvokeEvalEvalsResponseResponseBodyData = {
|
|
12
12
|
message: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Error running the evaluator
|
|
17
17
|
*/
|
|
18
|
+
export class InvokeEvalEvalsResponseResponseBody extends OrqError {
|
|
19
|
+
/** The original data that was passed to this error instance. */
|
|
20
|
+
data$: InvokeEvalEvalsResponseResponseBodyData;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
err: InvokeEvalEvalsResponseResponseBodyData,
|
|
24
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
25
|
+
) {
|
|
26
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
+
super(message, httpMeta);
|
|
28
|
+
this.data$ = err;
|
|
29
|
+
|
|
30
|
+
this.name = "InvokeEvalEvalsResponseResponseBody";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Workspace ID is not found on the request
|
|
36
|
+
*/
|
|
37
|
+
export type InvokeEvalEvalsResponseBodyData = {
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Workspace ID is not found on the request
|
|
43
|
+
*/
|
|
18
44
|
export class InvokeEvalEvalsResponseBody extends OrqError {
|
|
19
45
|
/** The original data that was passed to this error instance. */
|
|
20
46
|
data$: InvokeEvalEvalsResponseBodyData;
|
|
@@ -32,14 +58,14 @@ export class InvokeEvalEvalsResponseBody extends OrqError {
|
|
|
32
58
|
}
|
|
33
59
|
|
|
34
60
|
/**
|
|
35
|
-
*
|
|
61
|
+
* Bad request
|
|
36
62
|
*/
|
|
37
63
|
export type InvokeEvalResponseBodyData = {
|
|
38
64
|
message: string;
|
|
39
65
|
};
|
|
40
66
|
|
|
41
67
|
/**
|
|
42
|
-
*
|
|
68
|
+
* Bad request
|
|
43
69
|
*/
|
|
44
70
|
export class InvokeEvalResponseBody extends OrqError {
|
|
45
71
|
/** The original data that was passed to this error instance. */
|
|
@@ -57,6 +83,25 @@ export class InvokeEvalResponseBody extends OrqError {
|
|
|
57
83
|
}
|
|
58
84
|
}
|
|
59
85
|
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const InvokeEvalEvalsResponseResponseBody$inboundSchema: z.ZodType<
|
|
88
|
+
InvokeEvalEvalsResponseResponseBody,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
message: z.string(),
|
|
93
|
+
request$: z.instanceof(Request),
|
|
94
|
+
response$: z.instanceof(Response),
|
|
95
|
+
body$: z.string(),
|
|
96
|
+
})
|
|
97
|
+
.transform((v) => {
|
|
98
|
+
return new InvokeEvalEvalsResponseResponseBody(v, {
|
|
99
|
+
request: v.request$,
|
|
100
|
+
response: v.response$,
|
|
101
|
+
body: v.body$,
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
60
105
|
/** @internal */
|
|
61
106
|
export const InvokeEvalEvalsResponseBody$inboundSchema: z.ZodType<
|
|
62
107
|
InvokeEvalEvalsResponseBody,
|
|
@@ -1502,6 +1502,10 @@ export type Settings = {
|
|
|
1502
1502
|
* Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
|
|
1503
1503
|
*/
|
|
1504
1504
|
maxExecutionTime?: number | undefined;
|
|
1505
|
+
/**
|
|
1506
|
+
* Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
|
|
1507
|
+
*/
|
|
1508
|
+
maxCost?: number | undefined;
|
|
1505
1509
|
/**
|
|
1506
1510
|
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
1507
1511
|
*/
|
|
@@ -1765,6 +1769,10 @@ export type CreateAgentRequestSettings = {
|
|
|
1765
1769
|
* Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
|
|
1766
1770
|
*/
|
|
1767
1771
|
maxExecutionTime: number;
|
|
1772
|
+
/**
|
|
1773
|
+
* Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
|
|
1774
|
+
*/
|
|
1775
|
+
maxCost: number;
|
|
1768
1776
|
/**
|
|
1769
1777
|
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
1770
1778
|
*/
|
|
@@ -5065,6 +5073,7 @@ export function createAgentRequestGuardrailsToJSON(
|
|
|
5065
5073
|
export type Settings$Outbound = {
|
|
5066
5074
|
max_iterations: number;
|
|
5067
5075
|
max_execution_time: number;
|
|
5076
|
+
max_cost: number;
|
|
5068
5077
|
tool_approval_required: string;
|
|
5069
5078
|
tools?:
|
|
5070
5079
|
| Array<
|
|
@@ -5098,6 +5107,7 @@ export const Settings$outboundSchema: z.ZodType<
|
|
|
5098
5107
|
> = z.object({
|
|
5099
5108
|
maxIterations: z.number().int().default(100),
|
|
5100
5109
|
maxExecutionTime: z.number().int().default(600),
|
|
5110
|
+
maxCost: z.number().default(0),
|
|
5101
5111
|
toolApprovalRequired: ToolApprovalRequired$outboundSchema.default(
|
|
5102
5112
|
"respect_tool",
|
|
5103
5113
|
),
|
|
@@ -5128,6 +5138,7 @@ export const Settings$outboundSchema: z.ZodType<
|
|
|
5128
5138
|
return remap$(v, {
|
|
5129
5139
|
maxIterations: "max_iterations",
|
|
5130
5140
|
maxExecutionTime: "max_execution_time",
|
|
5141
|
+
maxCost: "max_cost",
|
|
5131
5142
|
toolApprovalRequired: "tool_approval_required",
|
|
5132
5143
|
});
|
|
5133
5144
|
});
|
|
@@ -5391,6 +5402,7 @@ export const CreateAgentRequestSettings$inboundSchema: z.ZodType<
|
|
|
5391
5402
|
> = z.object({
|
|
5392
5403
|
max_iterations: z.number().int().default(100),
|
|
5393
5404
|
max_execution_time: z.number().int().default(600),
|
|
5405
|
+
max_cost: z.number().default(0),
|
|
5394
5406
|
tool_approval_required: CreateAgentRequestToolApprovalRequired$inboundSchema
|
|
5395
5407
|
.default("respect_tool"),
|
|
5396
5408
|
tools: z.array(z.lazy(() => CreateAgentRequestTools$inboundSchema))
|
|
@@ -5404,6 +5416,7 @@ export const CreateAgentRequestSettings$inboundSchema: z.ZodType<
|
|
|
5404
5416
|
return remap$(v, {
|
|
5405
5417
|
"max_iterations": "maxIterations",
|
|
5406
5418
|
"max_execution_time": "maxExecutionTime",
|
|
5419
|
+
"max_cost": "maxCost",
|
|
5407
5420
|
"tool_approval_required": "toolApprovalRequired",
|
|
5408
5421
|
});
|
|
5409
5422
|
});
|
|
@@ -1179,7 +1179,7 @@ export type CreateChatCompletionFilterBy1 =
|
|
|
1179
1179
|
| CreateChatCompletion1Exists;
|
|
1180
1180
|
|
|
1181
1181
|
/**
|
|
1182
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
1182
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
1183
1183
|
*/
|
|
1184
1184
|
export type CreateChatCompletionFilterBy =
|
|
1185
1185
|
| CreateChatCompletionFilterByAnd
|
|
@@ -1257,7 +1257,7 @@ export type CreateChatCompletionKnowledgeBases = {
|
|
|
1257
1257
|
*/
|
|
1258
1258
|
searchType?: CreateChatCompletionSearchType | undefined;
|
|
1259
1259
|
/**
|
|
1260
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
1260
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
1261
1261
|
*/
|
|
1262
1262
|
filterBy?:
|
|
1263
1263
|
| CreateChatCompletionFilterByAnd
|
|
@@ -486,7 +486,7 @@ export type CreateCompletionFilterBy1 =
|
|
|
486
486
|
| CreateCompletion1Exists;
|
|
487
487
|
|
|
488
488
|
/**
|
|
489
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
489
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
490
490
|
*/
|
|
491
491
|
export type CreateCompletionFilterBy =
|
|
492
492
|
| CreateCompletionFilterByAnd
|
|
@@ -564,7 +564,7 @@ export type CreateCompletionKnowledgeBases = {
|
|
|
564
564
|
*/
|
|
565
565
|
searchType?: CreateCompletionSearchType | undefined;
|
|
566
566
|
/**
|
|
567
|
-
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://
|
|
567
|
+
* The metadata filter to apply to the search. Check the [Searching a Knowledge Base](https://docs.orq.ai/docs/knowledge/api#knowledge-base-search) for more information.
|
|
568
568
|
*/
|
|
569
569
|
filterBy?: CreateCompletionFilterByAnd | CreateCompletionFilterByOr | {
|
|
570
570
|
[k: string]:
|
|
@@ -134,7 +134,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
134
134
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
135
135
|
.optional(),
|
|
136
136
|
updated: z.string().datetime({ offset: true }).default(
|
|
137
|
-
"2026-
|
|
137
|
+
"2026-02-12T13:43:53.762Z",
|
|
138
138
|
).transform(v => new Date(v)),
|
|
139
139
|
}).transform((v) => {
|
|
140
140
|
return remap$(v, {
|
|
@@ -201,7 +201,7 @@ export const CreateConversationResponseBody$inboundSchema: z.ZodType<
|
|
|
201
201
|
z.ZodTypeDef,
|
|
202
202
|
unknown
|
|
203
203
|
> = z.object({
|
|
204
|
-
_id: z.string().default("
|
|
204
|
+
_id: z.string().default("conv_01kh91ggj7q86gjndxts53kyp4"),
|
|
205
205
|
kind: CreateConversationKind$inboundSchema,
|
|
206
206
|
displayName: z.string(),
|
|
207
207
|
createdAt: z.number(),
|