@orq-ai/node 4.0.2 → 4.0.5
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/bin/mcp-server.js +213 -213
- package/bin/mcp-server.js.map +36 -36
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +12 -12
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/packages/orq-rc/README.md +38 -47
- package/packages/orq-rc/docs/sdks/agents/README.md +230 -529
- package/packages/orq-rc/docs/sdks/responses/README.md +60 -65
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/agentsCreate.ts +16 -14
- package/packages/orq-rc/src/funcs/agentsDelete.ts +10 -6
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsList.ts +18 -6
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +23 -12
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +21 -16
- package/packages/orq-rc/src/funcs/agentsRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsStream.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +14 -6
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +1 -9
- package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +9 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +8 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +8 -4
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +67 -0
- package/packages/orq-rc/src/models/errors/deleteagent.ts +2 -2
- package/packages/orq-rc/src/models/errors/index.ts +2 -3
- package/packages/orq-rc/src/models/errors/{listagenttasks.ts → retrieveagentrequest.ts} +15 -15
- package/packages/orq-rc/src/models/errors/updateagent.ts +2 -2
- package/packages/orq-rc/src/models/operations/{createagent.ts → createagentrequest.ts} +1643 -1485
- package/packages/orq-rc/src/models/operations/{createagentresponse.ts → createagentresponserequest.ts} +141 -127
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/createprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/index.ts +3 -7
- package/packages/orq-rc/src/models/operations/invokeagent.ts +153 -190
- package/packages/orq-rc/src/models/operations/listagents.ts +9 -21
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3741 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +53 -57
- package/packages/orq-rc/src/models/operations/streamagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +68 -82
- package/packages/orq-rc/src/models/operations/updateagent.ts +17 -17
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/agents.ts +51 -99
- package/packages/orq-rc/src/sdk/responses.ts +7 -5
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
- package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
- package/packages/orq-rc/src/models/errors/createagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/getagent.ts +0 -67
- package/packages/orq-rc/src/models/operations/getagent.ts +0 -3480
- package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -2389
- package/packages/orq-rc/src/models/operations/listactions.ts +0 -427
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -2614
- package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -354
|
@@ -0,0 +1,3741 @@
|
|
|
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 { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type RetrieveAgentRequestRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The unique key of the agent to retrieve
|
|
15
|
+
*/
|
|
16
|
+
agentKey: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
21
|
+
*/
|
|
22
|
+
export const RetrieveAgentRequestStatus = {
|
|
23
|
+
Live: "live",
|
|
24
|
+
Draft: "draft",
|
|
25
|
+
Pending: "pending",
|
|
26
|
+
Published: "published",
|
|
27
|
+
} as const;
|
|
28
|
+
/**
|
|
29
|
+
* The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
30
|
+
*/
|
|
31
|
+
export type RetrieveAgentRequestStatus = ClosedEnum<
|
|
32
|
+
typeof RetrieveAgentRequestStatus
|
|
33
|
+
>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*/
|
|
38
|
+
export const RetrieveAgentRequestToolApprovalRequired = {
|
|
39
|
+
All: "all",
|
|
40
|
+
RespectTool: "respect_tool",
|
|
41
|
+
None: "none",
|
|
42
|
+
} as const;
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
45
|
+
*/
|
|
46
|
+
export type RetrieveAgentRequestToolApprovalRequired = ClosedEnum<
|
|
47
|
+
typeof RetrieveAgentRequestToolApprovalRequired
|
|
48
|
+
>;
|
|
49
|
+
|
|
50
|
+
export type RetrieveAgentRequestConditions = {
|
|
51
|
+
/**
|
|
52
|
+
* The argument of the tool call to evaluate
|
|
53
|
+
*/
|
|
54
|
+
condition: string;
|
|
55
|
+
/**
|
|
56
|
+
* The operator to use
|
|
57
|
+
*/
|
|
58
|
+
operator: string;
|
|
59
|
+
/**
|
|
60
|
+
* The value to compare against
|
|
61
|
+
*/
|
|
62
|
+
value: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type RetrieveAgentRequestTools = {
|
|
66
|
+
/**
|
|
67
|
+
* The id of the resource
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
/**
|
|
71
|
+
* Optional tool key for custom tools
|
|
72
|
+
*/
|
|
73
|
+
key?: string | undefined;
|
|
74
|
+
actionType: string;
|
|
75
|
+
displayName?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Optional tool description
|
|
78
|
+
*/
|
|
79
|
+
description?: string | undefined;
|
|
80
|
+
requiresApproval?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Nested tool ID for MCP tools (identifies specific tool within MCP server)
|
|
83
|
+
*/
|
|
84
|
+
toolId?: string | undefined;
|
|
85
|
+
conditions?: Array<RetrieveAgentRequestConditions> | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Tool execution timeout in seconds (default: 2 minutes, max: 10 minutes)
|
|
88
|
+
*/
|
|
89
|
+
timeout?: number | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
94
|
+
*/
|
|
95
|
+
export const RetrieveAgentRequestExecuteOn = {
|
|
96
|
+
Input: "input",
|
|
97
|
+
Output: "output",
|
|
98
|
+
} as const;
|
|
99
|
+
/**
|
|
100
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
101
|
+
*/
|
|
102
|
+
export type RetrieveAgentRequestExecuteOn = ClosedEnum<
|
|
103
|
+
typeof RetrieveAgentRequestExecuteOn
|
|
104
|
+
>;
|
|
105
|
+
|
|
106
|
+
export type RetrieveAgentRequestEvaluators = {
|
|
107
|
+
/**
|
|
108
|
+
* Unique key or identifier of the evaluator
|
|
109
|
+
*/
|
|
110
|
+
id: string;
|
|
111
|
+
/**
|
|
112
|
+
* The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
|
|
113
|
+
*/
|
|
114
|
+
sampleRate?: number | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
117
|
+
*/
|
|
118
|
+
executeOn: RetrieveAgentRequestExecuteOn;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
123
|
+
*/
|
|
124
|
+
export const RetrieveAgentRequestAgentsExecuteOn = {
|
|
125
|
+
Input: "input",
|
|
126
|
+
Output: "output",
|
|
127
|
+
} as const;
|
|
128
|
+
/**
|
|
129
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
130
|
+
*/
|
|
131
|
+
export type RetrieveAgentRequestAgentsExecuteOn = ClosedEnum<
|
|
132
|
+
typeof RetrieveAgentRequestAgentsExecuteOn
|
|
133
|
+
>;
|
|
134
|
+
|
|
135
|
+
export type RetrieveAgentRequestGuardrails = {
|
|
136
|
+
/**
|
|
137
|
+
* Unique key or identifier of the evaluator
|
|
138
|
+
*/
|
|
139
|
+
id: string;
|
|
140
|
+
/**
|
|
141
|
+
* The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
|
|
142
|
+
*/
|
|
143
|
+
sampleRate?: number | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Determines whether the evaluator runs on the agent input (user message) or output (agent response).
|
|
146
|
+
*/
|
|
147
|
+
executeOn: RetrieveAgentRequestAgentsExecuteOn;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export type RetrieveAgentRequestSettings = {
|
|
151
|
+
/**
|
|
152
|
+
* Maximum iterations(llm calls) before the agent will stop executing.
|
|
153
|
+
*/
|
|
154
|
+
maxIterations?: number | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* 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.
|
|
157
|
+
*/
|
|
158
|
+
maxExecutionTime?: number | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* 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.
|
|
161
|
+
*/
|
|
162
|
+
toolApprovalRequired?: RetrieveAgentRequestToolApprovalRequired | undefined;
|
|
163
|
+
tools?: Array<RetrieveAgentRequestTools> | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Configuration for an evaluator applied to the agent
|
|
166
|
+
*/
|
|
167
|
+
evaluators?: Array<RetrieveAgentRequestEvaluators> | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Configuration for a guardrail applied to the agent
|
|
170
|
+
*/
|
|
171
|
+
guardrails?: Array<RetrieveAgentRequestGuardrails> | undefined;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
176
|
+
*/
|
|
177
|
+
export const RetrieveAgentRequestVoice = {
|
|
178
|
+
Alloy: "alloy",
|
|
179
|
+
Echo: "echo",
|
|
180
|
+
Fable: "fable",
|
|
181
|
+
Onyx: "onyx",
|
|
182
|
+
Nova: "nova",
|
|
183
|
+
Shimmer: "shimmer",
|
|
184
|
+
} as const;
|
|
185
|
+
/**
|
|
186
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
187
|
+
*/
|
|
188
|
+
export type RetrieveAgentRequestVoice = ClosedEnum<
|
|
189
|
+
typeof RetrieveAgentRequestVoice
|
|
190
|
+
>;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
194
|
+
*/
|
|
195
|
+
export const RetrieveAgentRequestFormat = {
|
|
196
|
+
Wav: "wav",
|
|
197
|
+
Mp3: "mp3",
|
|
198
|
+
Flac: "flac",
|
|
199
|
+
Opus: "opus",
|
|
200
|
+
Pcm16: "pcm16",
|
|
201
|
+
} as const;
|
|
202
|
+
/**
|
|
203
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
204
|
+
*/
|
|
205
|
+
export type RetrieveAgentRequestFormat = ClosedEnum<
|
|
206
|
+
typeof RetrieveAgentRequestFormat
|
|
207
|
+
>;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
211
|
+
*/
|
|
212
|
+
export type RetrieveAgentRequestAudio = {
|
|
213
|
+
/**
|
|
214
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
215
|
+
*/
|
|
216
|
+
voice: RetrieveAgentRequestVoice;
|
|
217
|
+
/**
|
|
218
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
219
|
+
*/
|
|
220
|
+
format: RetrieveAgentRequestFormat;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponseType = {
|
|
224
|
+
JsonSchema: "json_schema",
|
|
225
|
+
} as const;
|
|
226
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponseType = ClosedEnum<
|
|
227
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponseType
|
|
228
|
+
>;
|
|
229
|
+
|
|
230
|
+
export type RetrieveAgentRequestResponseFormatJsonSchema = {
|
|
231
|
+
/**
|
|
232
|
+
* A description of what the response format is for, used by the model to determine how to respond in the format.
|
|
233
|
+
*/
|
|
234
|
+
description?: string | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
237
|
+
*/
|
|
238
|
+
name: string;
|
|
239
|
+
/**
|
|
240
|
+
* The schema for the response format, described as a JSON Schema object.
|
|
241
|
+
*/
|
|
242
|
+
schema?: any | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
|
|
245
|
+
*/
|
|
246
|
+
strict?: boolean | undefined;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @remarks
|
|
251
|
+
*
|
|
252
|
+
* JSON Schema response format. Used to generate structured JSON responses
|
|
253
|
+
*/
|
|
254
|
+
export type RetrieveAgentRequestResponseFormatAgentsJSONSchema = {
|
|
255
|
+
type: RetrieveAgentRequestResponseFormatAgentsResponseType;
|
|
256
|
+
jsonSchema: RetrieveAgentRequestResponseFormatJsonSchema;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export const RetrieveAgentRequestResponseFormatAgentsType = {
|
|
260
|
+
JsonObject: "json_object",
|
|
261
|
+
} as const;
|
|
262
|
+
export type RetrieveAgentRequestResponseFormatAgentsType = ClosedEnum<
|
|
263
|
+
typeof RetrieveAgentRequestResponseFormatAgentsType
|
|
264
|
+
>;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @remarks
|
|
268
|
+
*
|
|
269
|
+
* JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
|
|
270
|
+
*/
|
|
271
|
+
export type RetrieveAgentRequestResponseFormatJSONObject = {
|
|
272
|
+
type: RetrieveAgentRequestResponseFormatAgentsType;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export const RetrieveAgentRequestResponseFormatType = {
|
|
276
|
+
Text: "text",
|
|
277
|
+
} as const;
|
|
278
|
+
export type RetrieveAgentRequestResponseFormatType = ClosedEnum<
|
|
279
|
+
typeof RetrieveAgentRequestResponseFormatType
|
|
280
|
+
>;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @remarks
|
|
284
|
+
*
|
|
285
|
+
* Default response format. Used to generate text responses
|
|
286
|
+
*/
|
|
287
|
+
export type RetrieveAgentRequestResponseFormatText = {
|
|
288
|
+
type: RetrieveAgentRequestResponseFormatType;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* An object specifying the format that the model must output
|
|
293
|
+
*/
|
|
294
|
+
export type RetrieveAgentRequestResponseFormat =
|
|
295
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONSchema
|
|
296
|
+
| RetrieveAgentRequestResponseFormatText
|
|
297
|
+
| RetrieveAgentRequestResponseFormatJSONObject;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
301
|
+
*/
|
|
302
|
+
export type RetrieveAgentRequestStop = string | Array<string>;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
306
|
+
*/
|
|
307
|
+
export type RetrieveAgentRequestStreamOptions = {
|
|
308
|
+
/**
|
|
309
|
+
* If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
|
|
310
|
+
*/
|
|
311
|
+
includeUsage?: boolean | undefined;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Enables or disables the thinking mode capability
|
|
316
|
+
*/
|
|
317
|
+
export const RetrieveAgentRequestType = {
|
|
318
|
+
Enabled: "enabled",
|
|
319
|
+
Disabled: "disabled",
|
|
320
|
+
} as const;
|
|
321
|
+
/**
|
|
322
|
+
* Enables or disables the thinking mode capability
|
|
323
|
+
*/
|
|
324
|
+
export type RetrieveAgentRequestType = ClosedEnum<
|
|
325
|
+
typeof RetrieveAgentRequestType
|
|
326
|
+
>;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The level of reasoning the model should use. This setting is supported only by `gemini-3` models. If budget_tokens is specified and `thinking_level` is available, `budget_tokens` will be ignored.
|
|
330
|
+
*/
|
|
331
|
+
export const RetrieveAgentRequestThinkingLevel = {
|
|
332
|
+
Low: "low",
|
|
333
|
+
High: "high",
|
|
334
|
+
} as const;
|
|
335
|
+
/**
|
|
336
|
+
* The level of reasoning the model should use. This setting is supported only by `gemini-3` models. If budget_tokens is specified and `thinking_level` is available, `budget_tokens` will be ignored.
|
|
337
|
+
*/
|
|
338
|
+
export type RetrieveAgentRequestThinkingLevel = ClosedEnum<
|
|
339
|
+
typeof RetrieveAgentRequestThinkingLevel
|
|
340
|
+
>;
|
|
341
|
+
|
|
342
|
+
export type RetrieveAgentRequestThinking = {
|
|
343
|
+
/**
|
|
344
|
+
* Enables or disables the thinking mode capability
|
|
345
|
+
*/
|
|
346
|
+
type: RetrieveAgentRequestType;
|
|
347
|
+
/**
|
|
348
|
+
* Determines how many tokens the model can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than `max_tokens`.
|
|
349
|
+
*/
|
|
350
|
+
budgetTokens: number;
|
|
351
|
+
/**
|
|
352
|
+
* The level of reasoning the model should use. This setting is supported only by `gemini-3` models. If budget_tokens is specified and `thinking_level` is available, `budget_tokens` will be ignored.
|
|
353
|
+
*/
|
|
354
|
+
thinkingLevel?: RetrieveAgentRequestThinkingLevel | undefined;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* The type of the tool. Currently, only function is supported.
|
|
359
|
+
*/
|
|
360
|
+
export const RetrieveAgentRequestToolChoiceType = {
|
|
361
|
+
Function: "function",
|
|
362
|
+
} as const;
|
|
363
|
+
/**
|
|
364
|
+
* The type of the tool. Currently, only function is supported.
|
|
365
|
+
*/
|
|
366
|
+
export type RetrieveAgentRequestToolChoiceType = ClosedEnum<
|
|
367
|
+
typeof RetrieveAgentRequestToolChoiceType
|
|
368
|
+
>;
|
|
369
|
+
|
|
370
|
+
export type RetrieveAgentRequestToolChoiceFunction = {
|
|
371
|
+
/**
|
|
372
|
+
* The name of the function to call.
|
|
373
|
+
*/
|
|
374
|
+
name?: string | undefined;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
export type RetrieveAgentRequestToolChoice2 = {
|
|
378
|
+
/**
|
|
379
|
+
* The type of the tool. Currently, only function is supported.
|
|
380
|
+
*/
|
|
381
|
+
type?: RetrieveAgentRequestToolChoiceType | undefined;
|
|
382
|
+
function: RetrieveAgentRequestToolChoiceFunction;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
export const RetrieveAgentRequestToolChoice1 = {
|
|
386
|
+
None: "none",
|
|
387
|
+
Auto: "auto",
|
|
388
|
+
Required: "required",
|
|
389
|
+
} as const;
|
|
390
|
+
export type RetrieveAgentRequestToolChoice1 = ClosedEnum<
|
|
391
|
+
typeof RetrieveAgentRequestToolChoice1
|
|
392
|
+
>;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Controls which (if any) tool is called by the model.
|
|
396
|
+
*/
|
|
397
|
+
export type RetrieveAgentRequestToolChoice =
|
|
398
|
+
| RetrieveAgentRequestToolChoice2
|
|
399
|
+
| RetrieveAgentRequestToolChoice1;
|
|
400
|
+
|
|
401
|
+
export const RetrieveAgentRequestModalities = {
|
|
402
|
+
Text: "text",
|
|
403
|
+
Audio: "audio",
|
|
404
|
+
} as const;
|
|
405
|
+
export type RetrieveAgentRequestModalities = ClosedEnum<
|
|
406
|
+
typeof RetrieveAgentRequestModalities
|
|
407
|
+
>;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults.
|
|
411
|
+
*/
|
|
412
|
+
export type RetrieveAgentRequestParameters = {
|
|
413
|
+
/**
|
|
414
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
415
|
+
*/
|
|
416
|
+
audio?: RetrieveAgentRequestAudio | null | undefined;
|
|
417
|
+
/**
|
|
418
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
|
|
419
|
+
*/
|
|
420
|
+
frequencyPenalty?: number | null | undefined;
|
|
421
|
+
/**
|
|
422
|
+
* `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
|
|
423
|
+
*
|
|
424
|
+
* @remarks
|
|
425
|
+
*
|
|
426
|
+
* This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
|
|
427
|
+
*/
|
|
428
|
+
maxTokens?: number | null | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
|
|
431
|
+
*/
|
|
432
|
+
maxCompletionTokens?: number | null | undefined;
|
|
433
|
+
/**
|
|
434
|
+
* Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
|
|
435
|
+
*/
|
|
436
|
+
logprobs?: boolean | null | undefined;
|
|
437
|
+
/**
|
|
438
|
+
* An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
|
|
439
|
+
*/
|
|
440
|
+
topLogprobs?: number | null | undefined;
|
|
441
|
+
/**
|
|
442
|
+
* How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
|
|
443
|
+
*/
|
|
444
|
+
n?: number | null | undefined;
|
|
445
|
+
/**
|
|
446
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
|
|
447
|
+
*/
|
|
448
|
+
presencePenalty?: number | null | undefined;
|
|
449
|
+
/**
|
|
450
|
+
* An object specifying the format that the model must output
|
|
451
|
+
*/
|
|
452
|
+
responseFormat?:
|
|
453
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONSchema
|
|
454
|
+
| RetrieveAgentRequestResponseFormatText
|
|
455
|
+
| RetrieveAgentRequestResponseFormatJSONObject
|
|
456
|
+
| undefined;
|
|
457
|
+
/**
|
|
458
|
+
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
459
|
+
*/
|
|
460
|
+
reasoningEffort?: string | undefined;
|
|
461
|
+
/**
|
|
462
|
+
* Adjusts response verbosity. Lower levels yield shorter answers.
|
|
463
|
+
*/
|
|
464
|
+
verbosity?: string | undefined;
|
|
465
|
+
/**
|
|
466
|
+
* If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
|
|
467
|
+
*/
|
|
468
|
+
seed?: number | null | undefined;
|
|
469
|
+
/**
|
|
470
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
471
|
+
*/
|
|
472
|
+
stop?: string | Array<string> | null | undefined;
|
|
473
|
+
/**
|
|
474
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
475
|
+
*/
|
|
476
|
+
streamOptions?: RetrieveAgentRequestStreamOptions | null | undefined;
|
|
477
|
+
thinking?: RetrieveAgentRequestThinking | undefined;
|
|
478
|
+
/**
|
|
479
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
|
|
480
|
+
*/
|
|
481
|
+
temperature?: number | null | undefined;
|
|
482
|
+
/**
|
|
483
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
|
|
484
|
+
*/
|
|
485
|
+
topP?: number | null | undefined;
|
|
486
|
+
/**
|
|
487
|
+
* Limits the model to consider only the top k most likely tokens at each step.
|
|
488
|
+
*/
|
|
489
|
+
topK?: number | null | undefined;
|
|
490
|
+
/**
|
|
491
|
+
* Controls which (if any) tool is called by the model.
|
|
492
|
+
*/
|
|
493
|
+
toolChoice?:
|
|
494
|
+
| RetrieveAgentRequestToolChoice2
|
|
495
|
+
| RetrieveAgentRequestToolChoice1
|
|
496
|
+
| undefined;
|
|
497
|
+
/**
|
|
498
|
+
* Whether to enable parallel function calling during tool use.
|
|
499
|
+
*/
|
|
500
|
+
parallelToolCalls?: boolean | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
|
|
503
|
+
*/
|
|
504
|
+
modalities?: Array<RetrieveAgentRequestModalities> | null | undefined;
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Retry configuration for model requests. Allows customizing retry count (1-5) and HTTP status codes that trigger retries. Default codes: [429]. Common codes: 500 (internal error), 429 (rate limit), 502/503/504 (gateway errors).
|
|
509
|
+
*/
|
|
510
|
+
export type RetrieveAgentRequestRetry = {
|
|
511
|
+
/**
|
|
512
|
+
* Number of retry attempts (1-5)
|
|
513
|
+
*/
|
|
514
|
+
count?: number | undefined;
|
|
515
|
+
/**
|
|
516
|
+
* HTTP status codes that trigger retry logic
|
|
517
|
+
*/
|
|
518
|
+
onCodes?: Array<number> | undefined;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
523
|
+
*/
|
|
524
|
+
export const RetrieveAgentRequestFallbackModelConfigurationVoice = {
|
|
525
|
+
Alloy: "alloy",
|
|
526
|
+
Echo: "echo",
|
|
527
|
+
Fable: "fable",
|
|
528
|
+
Onyx: "onyx",
|
|
529
|
+
Nova: "nova",
|
|
530
|
+
Shimmer: "shimmer",
|
|
531
|
+
} as const;
|
|
532
|
+
/**
|
|
533
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
534
|
+
*/
|
|
535
|
+
export type RetrieveAgentRequestFallbackModelConfigurationVoice = ClosedEnum<
|
|
536
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationVoice
|
|
537
|
+
>;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
541
|
+
*/
|
|
542
|
+
export const RetrieveAgentRequestFallbackModelConfigurationFormat = {
|
|
543
|
+
Wav: "wav",
|
|
544
|
+
Mp3: "mp3",
|
|
545
|
+
Flac: "flac",
|
|
546
|
+
Opus: "opus",
|
|
547
|
+
Pcm16: "pcm16",
|
|
548
|
+
} as const;
|
|
549
|
+
/**
|
|
550
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
551
|
+
*/
|
|
552
|
+
export type RetrieveAgentRequestFallbackModelConfigurationFormat = ClosedEnum<
|
|
553
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationFormat
|
|
554
|
+
>;
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
558
|
+
*/
|
|
559
|
+
export type RetrieveAgentRequestFallbackModelConfigurationAudio = {
|
|
560
|
+
/**
|
|
561
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
562
|
+
*/
|
|
563
|
+
voice: RetrieveAgentRequestFallbackModelConfigurationVoice;
|
|
564
|
+
/**
|
|
565
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
566
|
+
*/
|
|
567
|
+
format: RetrieveAgentRequestFallbackModelConfigurationFormat;
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType =
|
|
571
|
+
{
|
|
572
|
+
JsonSchema: "json_schema",
|
|
573
|
+
} as const;
|
|
574
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType =
|
|
575
|
+
ClosedEnum<
|
|
576
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType
|
|
577
|
+
>;
|
|
578
|
+
|
|
579
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema = {
|
|
580
|
+
/**
|
|
581
|
+
* A description of what the response format is for, used by the model to determine how to respond in the format.
|
|
582
|
+
*/
|
|
583
|
+
description?: string | undefined;
|
|
584
|
+
/**
|
|
585
|
+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
586
|
+
*/
|
|
587
|
+
name: string;
|
|
588
|
+
/**
|
|
589
|
+
* The schema for the response format, described as a JSON Schema object.
|
|
590
|
+
*/
|
|
591
|
+
schema?: any | undefined;
|
|
592
|
+
/**
|
|
593
|
+
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
|
|
594
|
+
*/
|
|
595
|
+
strict?: boolean | undefined;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* @remarks
|
|
600
|
+
*
|
|
601
|
+
* JSON Schema response format. Used to generate structured JSON responses
|
|
602
|
+
*/
|
|
603
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema = {
|
|
604
|
+
type:
|
|
605
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType;
|
|
606
|
+
jsonSchema: RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema;
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType =
|
|
610
|
+
{
|
|
611
|
+
JsonObject: "json_object",
|
|
612
|
+
} as const;
|
|
613
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType =
|
|
614
|
+
ClosedEnum<
|
|
615
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType
|
|
616
|
+
>;
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* @remarks
|
|
620
|
+
*
|
|
621
|
+
* JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
|
|
622
|
+
*/
|
|
623
|
+
export type RetrieveAgentRequestResponseFormatAgentsJSONObject = {
|
|
624
|
+
type: RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType;
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200Type = {
|
|
628
|
+
Text: "text",
|
|
629
|
+
} as const;
|
|
630
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponse200Type =
|
|
631
|
+
ClosedEnum<typeof RetrieveAgentRequestResponseFormatAgentsResponse200Type>;
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* @remarks
|
|
635
|
+
*
|
|
636
|
+
* Default response format. Used to generate text responses
|
|
637
|
+
*/
|
|
638
|
+
export type RetrieveAgentRequestResponseFormatAgentsText = {
|
|
639
|
+
type: RetrieveAgentRequestResponseFormatAgentsResponse200Type;
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* An object specifying the format that the model must output
|
|
644
|
+
*/
|
|
645
|
+
export type RetrieveAgentRequestFallbackModelConfigurationResponseFormat =
|
|
646
|
+
| RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema
|
|
647
|
+
| RetrieveAgentRequestResponseFormatAgentsText
|
|
648
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONObject;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
652
|
+
*/
|
|
653
|
+
export type RetrieveAgentRequestFallbackModelConfigurationStop =
|
|
654
|
+
| string
|
|
655
|
+
| Array<string>;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
659
|
+
*/
|
|
660
|
+
export type RetrieveAgentRequestFallbackModelConfigurationStreamOptions = {
|
|
661
|
+
/**
|
|
662
|
+
* If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
|
|
663
|
+
*/
|
|
664
|
+
includeUsage?: boolean | undefined;
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Enables or disables the thinking mode capability
|
|
669
|
+
*/
|
|
670
|
+
export const RetrieveAgentRequestFallbackModelConfigurationType = {
|
|
671
|
+
Enabled: "enabled",
|
|
672
|
+
Disabled: "disabled",
|
|
673
|
+
} as const;
|
|
674
|
+
/**
|
|
675
|
+
* Enables or disables the thinking mode capability
|
|
676
|
+
*/
|
|
677
|
+
export type RetrieveAgentRequestFallbackModelConfigurationType = ClosedEnum<
|
|
678
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationType
|
|
679
|
+
>;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* The level of reasoning the model should use. This setting is supported only by `gemini-3` models. If budget_tokens is specified and `thinking_level` is available, `budget_tokens` will be ignored.
|
|
683
|
+
*/
|
|
684
|
+
export const RetrieveAgentRequestFallbackModelConfigurationThinkingLevel = {
|
|
685
|
+
Low: "low",
|
|
686
|
+
High: "high",
|
|
687
|
+
} as const;
|
|
688
|
+
/**
|
|
689
|
+
* The level of reasoning the model should use. This setting is supported only by `gemini-3` models. If budget_tokens is specified and `thinking_level` is available, `budget_tokens` will be ignored.
|
|
690
|
+
*/
|
|
691
|
+
export type RetrieveAgentRequestFallbackModelConfigurationThinkingLevel =
|
|
692
|
+
ClosedEnum<
|
|
693
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationThinkingLevel
|
|
694
|
+
>;
|
|
695
|
+
|
|
696
|
+
export type RetrieveAgentRequestFallbackModelConfigurationThinking = {
|
|
697
|
+
/**
|
|
698
|
+
* Enables or disables the thinking mode capability
|
|
699
|
+
*/
|
|
700
|
+
type: RetrieveAgentRequestFallbackModelConfigurationType;
|
|
701
|
+
/**
|
|
702
|
+
* Determines how many tokens the model can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than `max_tokens`.
|
|
703
|
+
*/
|
|
704
|
+
budgetTokens: number;
|
|
705
|
+
/**
|
|
706
|
+
* The level of reasoning the model should use. This setting is supported only by `gemini-3` models. If budget_tokens is specified and `thinking_level` is available, `budget_tokens` will be ignored.
|
|
707
|
+
*/
|
|
708
|
+
thinkingLevel?:
|
|
709
|
+
| RetrieveAgentRequestFallbackModelConfigurationThinkingLevel
|
|
710
|
+
| undefined;
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* The type of the tool. Currently, only function is supported.
|
|
715
|
+
*/
|
|
716
|
+
export const RetrieveAgentRequestToolChoiceAgentsType = {
|
|
717
|
+
Function: "function",
|
|
718
|
+
} as const;
|
|
719
|
+
/**
|
|
720
|
+
* The type of the tool. Currently, only function is supported.
|
|
721
|
+
*/
|
|
722
|
+
export type RetrieveAgentRequestToolChoiceAgentsType = ClosedEnum<
|
|
723
|
+
typeof RetrieveAgentRequestToolChoiceAgentsType
|
|
724
|
+
>;
|
|
725
|
+
|
|
726
|
+
export type RetrieveAgentRequestToolChoiceAgentsFunction = {
|
|
727
|
+
/**
|
|
728
|
+
* The name of the function to call.
|
|
729
|
+
*/
|
|
730
|
+
name?: string | undefined;
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
export type RetrieveAgentRequestToolChoiceAgents2 = {
|
|
734
|
+
/**
|
|
735
|
+
* The type of the tool. Currently, only function is supported.
|
|
736
|
+
*/
|
|
737
|
+
type?: RetrieveAgentRequestToolChoiceAgentsType | undefined;
|
|
738
|
+
function: RetrieveAgentRequestToolChoiceAgentsFunction;
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
export const RetrieveAgentRequestToolChoiceAgents1 = {
|
|
742
|
+
None: "none",
|
|
743
|
+
Auto: "auto",
|
|
744
|
+
Required: "required",
|
|
745
|
+
} as const;
|
|
746
|
+
export type RetrieveAgentRequestToolChoiceAgents1 = ClosedEnum<
|
|
747
|
+
typeof RetrieveAgentRequestToolChoiceAgents1
|
|
748
|
+
>;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Controls which (if any) tool is called by the model.
|
|
752
|
+
*/
|
|
753
|
+
export type RetrieveAgentRequestFallbackModelConfigurationToolChoice =
|
|
754
|
+
| RetrieveAgentRequestToolChoiceAgents2
|
|
755
|
+
| RetrieveAgentRequestToolChoiceAgents1;
|
|
756
|
+
|
|
757
|
+
export const RetrieveAgentRequestFallbackModelConfigurationModalities = {
|
|
758
|
+
Text: "text",
|
|
759
|
+
Audio: "audio",
|
|
760
|
+
} as const;
|
|
761
|
+
export type RetrieveAgentRequestFallbackModelConfigurationModalities =
|
|
762
|
+
ClosedEnum<typeof RetrieveAgentRequestFallbackModelConfigurationModalities>;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used.
|
|
766
|
+
*/
|
|
767
|
+
export type RetrieveAgentRequestFallbackModelConfigurationParameters = {
|
|
768
|
+
/**
|
|
769
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
770
|
+
*/
|
|
771
|
+
audio?:
|
|
772
|
+
| RetrieveAgentRequestFallbackModelConfigurationAudio
|
|
773
|
+
| null
|
|
774
|
+
| undefined;
|
|
775
|
+
/**
|
|
776
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
|
|
777
|
+
*/
|
|
778
|
+
frequencyPenalty?: number | null | undefined;
|
|
779
|
+
/**
|
|
780
|
+
* `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
|
|
781
|
+
*
|
|
782
|
+
* @remarks
|
|
783
|
+
*
|
|
784
|
+
* This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
|
|
785
|
+
*/
|
|
786
|
+
maxTokens?: number | null | undefined;
|
|
787
|
+
/**
|
|
788
|
+
* An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
|
|
789
|
+
*/
|
|
790
|
+
maxCompletionTokens?: number | null | undefined;
|
|
791
|
+
/**
|
|
792
|
+
* Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
|
|
793
|
+
*/
|
|
794
|
+
logprobs?: boolean | null | undefined;
|
|
795
|
+
/**
|
|
796
|
+
* An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
|
|
797
|
+
*/
|
|
798
|
+
topLogprobs?: number | null | undefined;
|
|
799
|
+
/**
|
|
800
|
+
* How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
|
|
801
|
+
*/
|
|
802
|
+
n?: number | null | undefined;
|
|
803
|
+
/**
|
|
804
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
|
|
805
|
+
*/
|
|
806
|
+
presencePenalty?: number | null | undefined;
|
|
807
|
+
/**
|
|
808
|
+
* An object specifying the format that the model must output
|
|
809
|
+
*/
|
|
810
|
+
responseFormat?:
|
|
811
|
+
| RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema
|
|
812
|
+
| RetrieveAgentRequestResponseFormatAgentsText
|
|
813
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONObject
|
|
814
|
+
| undefined;
|
|
815
|
+
/**
|
|
816
|
+
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
817
|
+
*/
|
|
818
|
+
reasoningEffort?: string | undefined;
|
|
819
|
+
/**
|
|
820
|
+
* Adjusts response verbosity. Lower levels yield shorter answers.
|
|
821
|
+
*/
|
|
822
|
+
verbosity?: string | undefined;
|
|
823
|
+
/**
|
|
824
|
+
* If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
|
|
825
|
+
*/
|
|
826
|
+
seed?: number | null | undefined;
|
|
827
|
+
/**
|
|
828
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
829
|
+
*/
|
|
830
|
+
stop?: string | Array<string> | null | undefined;
|
|
831
|
+
/**
|
|
832
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
833
|
+
*/
|
|
834
|
+
streamOptions?:
|
|
835
|
+
| RetrieveAgentRequestFallbackModelConfigurationStreamOptions
|
|
836
|
+
| null
|
|
837
|
+
| undefined;
|
|
838
|
+
thinking?: RetrieveAgentRequestFallbackModelConfigurationThinking | undefined;
|
|
839
|
+
/**
|
|
840
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
|
|
841
|
+
*/
|
|
842
|
+
temperature?: number | null | undefined;
|
|
843
|
+
/**
|
|
844
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
|
|
845
|
+
*/
|
|
846
|
+
topP?: number | null | undefined;
|
|
847
|
+
/**
|
|
848
|
+
* Limits the model to consider only the top k most likely tokens at each step.
|
|
849
|
+
*/
|
|
850
|
+
topK?: number | null | undefined;
|
|
851
|
+
/**
|
|
852
|
+
* Controls which (if any) tool is called by the model.
|
|
853
|
+
*/
|
|
854
|
+
toolChoice?:
|
|
855
|
+
| RetrieveAgentRequestToolChoiceAgents2
|
|
856
|
+
| RetrieveAgentRequestToolChoiceAgents1
|
|
857
|
+
| undefined;
|
|
858
|
+
/**
|
|
859
|
+
* Whether to enable parallel function calling during tool use.
|
|
860
|
+
*/
|
|
861
|
+
parallelToolCalls?: boolean | undefined;
|
|
862
|
+
/**
|
|
863
|
+
* Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
|
|
864
|
+
*/
|
|
865
|
+
modalities?:
|
|
866
|
+
| Array<RetrieveAgentRequestFallbackModelConfigurationModalities>
|
|
867
|
+
| null
|
|
868
|
+
| undefined;
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Fallback model configuration with optional parameters.
|
|
873
|
+
*/
|
|
874
|
+
export type RetrieveAgentRequestFallbackModelConfiguration2 = {
|
|
875
|
+
/**
|
|
876
|
+
* A fallback model ID string. Must support tool calling.
|
|
877
|
+
*/
|
|
878
|
+
id: string;
|
|
879
|
+
/**
|
|
880
|
+
* Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used.
|
|
881
|
+
*/
|
|
882
|
+
parameters?:
|
|
883
|
+
| RetrieveAgentRequestFallbackModelConfigurationParameters
|
|
884
|
+
| undefined;
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Fallback model for automatic failover when primary model request fails. Supports optional parameter overrides. Can be a simple model ID string or a configuration object with model-specific parameters. Fallbacks are tried in order.
|
|
889
|
+
*/
|
|
890
|
+
export type RetrieveAgentRequestFallbackModelConfiguration =
|
|
891
|
+
| RetrieveAgentRequestFallbackModelConfiguration2
|
|
892
|
+
| string;
|
|
893
|
+
|
|
894
|
+
export type RetrieveAgentRequestModel = {
|
|
895
|
+
/**
|
|
896
|
+
* The database ID of the primary model
|
|
897
|
+
*/
|
|
898
|
+
id: string;
|
|
899
|
+
/**
|
|
900
|
+
* Optional integration ID for custom model configurations
|
|
901
|
+
*/
|
|
902
|
+
integrationId?: string | null | undefined;
|
|
903
|
+
/**
|
|
904
|
+
* Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults.
|
|
905
|
+
*/
|
|
906
|
+
parameters?: RetrieveAgentRequestParameters | undefined;
|
|
907
|
+
/**
|
|
908
|
+
* Retry configuration for model requests. Allows customizing retry count (1-5) and HTTP status codes that trigger retries. Default codes: [429]. Common codes: 500 (internal error), 429 (rate limit), 502/503/504 (gateway errors).
|
|
909
|
+
*/
|
|
910
|
+
retry?: RetrieveAgentRequestRetry | undefined;
|
|
911
|
+
/**
|
|
912
|
+
* Optional array of fallback models (string IDs or config objects) that will be used automatically in order if the primary model fails
|
|
913
|
+
*/
|
|
914
|
+
fallbackModels?:
|
|
915
|
+
| Array<RetrieveAgentRequestFallbackModelConfiguration2 | string>
|
|
916
|
+
| null
|
|
917
|
+
| undefined;
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
export type RetrieveAgentRequestTeamOfAgents = {
|
|
921
|
+
/**
|
|
922
|
+
* The unique key of the agent within the workspace
|
|
923
|
+
*/
|
|
924
|
+
key: string;
|
|
925
|
+
/**
|
|
926
|
+
* The role of the agent in this context. This is used to give extra information to the leader to help it decide which agent to hand off to.
|
|
927
|
+
*/
|
|
928
|
+
role?: string | undefined;
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
export type RetrieveAgentRequestMetrics = {
|
|
932
|
+
totalCost?: number | undefined;
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
export type RetrieveAgentRequestKnowledgeBases = {
|
|
936
|
+
/**
|
|
937
|
+
* Unique identifier of the knowledge base to search
|
|
938
|
+
*/
|
|
939
|
+
knowledgeId: string;
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Agent successfully retrieved. Returns the complete agent manifest with all configuration details, including models, tools, knowledge bases, and execution settings.
|
|
944
|
+
*/
|
|
945
|
+
export type RetrieveAgentRequestResponseBody = {
|
|
946
|
+
id: string;
|
|
947
|
+
key: string;
|
|
948
|
+
displayName: string;
|
|
949
|
+
workspaceId: string;
|
|
950
|
+
projectId: string;
|
|
951
|
+
createdById?: string | null | undefined;
|
|
952
|
+
updatedById?: string | null | undefined;
|
|
953
|
+
created?: string | undefined;
|
|
954
|
+
updated?: string | undefined;
|
|
955
|
+
role: string;
|
|
956
|
+
description: string;
|
|
957
|
+
systemPrompt?: string | undefined;
|
|
958
|
+
instructions: string;
|
|
959
|
+
/**
|
|
960
|
+
* The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
961
|
+
*/
|
|
962
|
+
status: RetrieveAgentRequestStatus;
|
|
963
|
+
settings?: RetrieveAgentRequestSettings | undefined;
|
|
964
|
+
model: RetrieveAgentRequestModel;
|
|
965
|
+
versionHash?: string | undefined;
|
|
966
|
+
/**
|
|
967
|
+
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
968
|
+
*
|
|
969
|
+
* @remarks
|
|
970
|
+
*
|
|
971
|
+
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
972
|
+
*
|
|
973
|
+
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
974
|
+
*/
|
|
975
|
+
path: string;
|
|
976
|
+
/**
|
|
977
|
+
* Array of memory store identifiers. Accepts both memory store IDs and keys.
|
|
978
|
+
*/
|
|
979
|
+
memoryStores: Array<string>;
|
|
980
|
+
/**
|
|
981
|
+
* The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
|
|
982
|
+
*/
|
|
983
|
+
teamOfAgents: Array<RetrieveAgentRequestTeamOfAgents>;
|
|
984
|
+
metrics?: RetrieveAgentRequestMetrics | undefined;
|
|
985
|
+
/**
|
|
986
|
+
* Extracted variables from agent instructions
|
|
987
|
+
*/
|
|
988
|
+
variables?: { [k: string]: any } | undefined;
|
|
989
|
+
/**
|
|
990
|
+
* Agent knowledge bases reference
|
|
991
|
+
*/
|
|
992
|
+
knowledgeBases?: Array<RetrieveAgentRequestKnowledgeBases> | undefined;
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
/** @internal */
|
|
996
|
+
export const RetrieveAgentRequestRequest$inboundSchema: z.ZodType<
|
|
997
|
+
RetrieveAgentRequestRequest,
|
|
998
|
+
z.ZodTypeDef,
|
|
999
|
+
unknown
|
|
1000
|
+
> = z.object({
|
|
1001
|
+
agent_key: z.string(),
|
|
1002
|
+
}).transform((v) => {
|
|
1003
|
+
return remap$(v, {
|
|
1004
|
+
"agent_key": "agentKey",
|
|
1005
|
+
});
|
|
1006
|
+
});
|
|
1007
|
+
/** @internal */
|
|
1008
|
+
export type RetrieveAgentRequestRequest$Outbound = {
|
|
1009
|
+
agent_key: string;
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
/** @internal */
|
|
1013
|
+
export const RetrieveAgentRequestRequest$outboundSchema: z.ZodType<
|
|
1014
|
+
RetrieveAgentRequestRequest$Outbound,
|
|
1015
|
+
z.ZodTypeDef,
|
|
1016
|
+
RetrieveAgentRequestRequest
|
|
1017
|
+
> = z.object({
|
|
1018
|
+
agentKey: z.string(),
|
|
1019
|
+
}).transform((v) => {
|
|
1020
|
+
return remap$(v, {
|
|
1021
|
+
agentKey: "agent_key",
|
|
1022
|
+
});
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
export function retrieveAgentRequestRequestToJSON(
|
|
1026
|
+
retrieveAgentRequestRequest: RetrieveAgentRequestRequest,
|
|
1027
|
+
): string {
|
|
1028
|
+
return JSON.stringify(
|
|
1029
|
+
RetrieveAgentRequestRequest$outboundSchema.parse(
|
|
1030
|
+
retrieveAgentRequestRequest,
|
|
1031
|
+
),
|
|
1032
|
+
);
|
|
1033
|
+
}
|
|
1034
|
+
export function retrieveAgentRequestRequestFromJSON(
|
|
1035
|
+
jsonString: string,
|
|
1036
|
+
): SafeParseResult<RetrieveAgentRequestRequest, SDKValidationError> {
|
|
1037
|
+
return safeParse(
|
|
1038
|
+
jsonString,
|
|
1039
|
+
(x) => RetrieveAgentRequestRequest$inboundSchema.parse(JSON.parse(x)),
|
|
1040
|
+
`Failed to parse 'RetrieveAgentRequestRequest' from JSON`,
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/** @internal */
|
|
1045
|
+
export const RetrieveAgentRequestStatus$inboundSchema: z.ZodNativeEnum<
|
|
1046
|
+
typeof RetrieveAgentRequestStatus
|
|
1047
|
+
> = z.nativeEnum(RetrieveAgentRequestStatus);
|
|
1048
|
+
/** @internal */
|
|
1049
|
+
export const RetrieveAgentRequestStatus$outboundSchema: z.ZodNativeEnum<
|
|
1050
|
+
typeof RetrieveAgentRequestStatus
|
|
1051
|
+
> = RetrieveAgentRequestStatus$inboundSchema;
|
|
1052
|
+
|
|
1053
|
+
/** @internal */
|
|
1054
|
+
export const RetrieveAgentRequestToolApprovalRequired$inboundSchema:
|
|
1055
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestToolApprovalRequired> = z
|
|
1056
|
+
.nativeEnum(RetrieveAgentRequestToolApprovalRequired);
|
|
1057
|
+
/** @internal */
|
|
1058
|
+
export const RetrieveAgentRequestToolApprovalRequired$outboundSchema:
|
|
1059
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestToolApprovalRequired> =
|
|
1060
|
+
RetrieveAgentRequestToolApprovalRequired$inboundSchema;
|
|
1061
|
+
|
|
1062
|
+
/** @internal */
|
|
1063
|
+
export const RetrieveAgentRequestConditions$inboundSchema: z.ZodType<
|
|
1064
|
+
RetrieveAgentRequestConditions,
|
|
1065
|
+
z.ZodTypeDef,
|
|
1066
|
+
unknown
|
|
1067
|
+
> = z.object({
|
|
1068
|
+
condition: z.string(),
|
|
1069
|
+
operator: z.string(),
|
|
1070
|
+
value: z.string(),
|
|
1071
|
+
});
|
|
1072
|
+
/** @internal */
|
|
1073
|
+
export type RetrieveAgentRequestConditions$Outbound = {
|
|
1074
|
+
condition: string;
|
|
1075
|
+
operator: string;
|
|
1076
|
+
value: string;
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
/** @internal */
|
|
1080
|
+
export const RetrieveAgentRequestConditions$outboundSchema: z.ZodType<
|
|
1081
|
+
RetrieveAgentRequestConditions$Outbound,
|
|
1082
|
+
z.ZodTypeDef,
|
|
1083
|
+
RetrieveAgentRequestConditions
|
|
1084
|
+
> = z.object({
|
|
1085
|
+
condition: z.string(),
|
|
1086
|
+
operator: z.string(),
|
|
1087
|
+
value: z.string(),
|
|
1088
|
+
});
|
|
1089
|
+
|
|
1090
|
+
export function retrieveAgentRequestConditionsToJSON(
|
|
1091
|
+
retrieveAgentRequestConditions: RetrieveAgentRequestConditions,
|
|
1092
|
+
): string {
|
|
1093
|
+
return JSON.stringify(
|
|
1094
|
+
RetrieveAgentRequestConditions$outboundSchema.parse(
|
|
1095
|
+
retrieveAgentRequestConditions,
|
|
1096
|
+
),
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
export function retrieveAgentRequestConditionsFromJSON(
|
|
1100
|
+
jsonString: string,
|
|
1101
|
+
): SafeParseResult<RetrieveAgentRequestConditions, SDKValidationError> {
|
|
1102
|
+
return safeParse(
|
|
1103
|
+
jsonString,
|
|
1104
|
+
(x) => RetrieveAgentRequestConditions$inboundSchema.parse(JSON.parse(x)),
|
|
1105
|
+
`Failed to parse 'RetrieveAgentRequestConditions' from JSON`,
|
|
1106
|
+
);
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
/** @internal */
|
|
1110
|
+
export const RetrieveAgentRequestTools$inboundSchema: z.ZodType<
|
|
1111
|
+
RetrieveAgentRequestTools,
|
|
1112
|
+
z.ZodTypeDef,
|
|
1113
|
+
unknown
|
|
1114
|
+
> = z.object({
|
|
1115
|
+
id: z.string(),
|
|
1116
|
+
key: z.string().optional(),
|
|
1117
|
+
action_type: z.string(),
|
|
1118
|
+
display_name: z.string().optional(),
|
|
1119
|
+
description: z.string().optional(),
|
|
1120
|
+
requires_approval: z.boolean().default(false),
|
|
1121
|
+
tool_id: z.string().optional(),
|
|
1122
|
+
conditions: z.array(
|
|
1123
|
+
z.lazy(() => RetrieveAgentRequestConditions$inboundSchema),
|
|
1124
|
+
).optional(),
|
|
1125
|
+
timeout: z.number().default(120),
|
|
1126
|
+
}).transform((v) => {
|
|
1127
|
+
return remap$(v, {
|
|
1128
|
+
"action_type": "actionType",
|
|
1129
|
+
"display_name": "displayName",
|
|
1130
|
+
"requires_approval": "requiresApproval",
|
|
1131
|
+
"tool_id": "toolId",
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
/** @internal */
|
|
1135
|
+
export type RetrieveAgentRequestTools$Outbound = {
|
|
1136
|
+
id: string;
|
|
1137
|
+
key?: string | undefined;
|
|
1138
|
+
action_type: string;
|
|
1139
|
+
display_name?: string | undefined;
|
|
1140
|
+
description?: string | undefined;
|
|
1141
|
+
requires_approval: boolean;
|
|
1142
|
+
tool_id?: string | undefined;
|
|
1143
|
+
conditions?: Array<RetrieveAgentRequestConditions$Outbound> | undefined;
|
|
1144
|
+
timeout: number;
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
/** @internal */
|
|
1148
|
+
export const RetrieveAgentRequestTools$outboundSchema: z.ZodType<
|
|
1149
|
+
RetrieveAgentRequestTools$Outbound,
|
|
1150
|
+
z.ZodTypeDef,
|
|
1151
|
+
RetrieveAgentRequestTools
|
|
1152
|
+
> = z.object({
|
|
1153
|
+
id: z.string(),
|
|
1154
|
+
key: z.string().optional(),
|
|
1155
|
+
actionType: z.string(),
|
|
1156
|
+
displayName: z.string().optional(),
|
|
1157
|
+
description: z.string().optional(),
|
|
1158
|
+
requiresApproval: z.boolean().default(false),
|
|
1159
|
+
toolId: z.string().optional(),
|
|
1160
|
+
conditions: z.array(
|
|
1161
|
+
z.lazy(() => RetrieveAgentRequestConditions$outboundSchema),
|
|
1162
|
+
).optional(),
|
|
1163
|
+
timeout: z.number().default(120),
|
|
1164
|
+
}).transform((v) => {
|
|
1165
|
+
return remap$(v, {
|
|
1166
|
+
actionType: "action_type",
|
|
1167
|
+
displayName: "display_name",
|
|
1168
|
+
requiresApproval: "requires_approval",
|
|
1169
|
+
toolId: "tool_id",
|
|
1170
|
+
});
|
|
1171
|
+
});
|
|
1172
|
+
|
|
1173
|
+
export function retrieveAgentRequestToolsToJSON(
|
|
1174
|
+
retrieveAgentRequestTools: RetrieveAgentRequestTools,
|
|
1175
|
+
): string {
|
|
1176
|
+
return JSON.stringify(
|
|
1177
|
+
RetrieveAgentRequestTools$outboundSchema.parse(retrieveAgentRequestTools),
|
|
1178
|
+
);
|
|
1179
|
+
}
|
|
1180
|
+
export function retrieveAgentRequestToolsFromJSON(
|
|
1181
|
+
jsonString: string,
|
|
1182
|
+
): SafeParseResult<RetrieveAgentRequestTools, SDKValidationError> {
|
|
1183
|
+
return safeParse(
|
|
1184
|
+
jsonString,
|
|
1185
|
+
(x) => RetrieveAgentRequestTools$inboundSchema.parse(JSON.parse(x)),
|
|
1186
|
+
`Failed to parse 'RetrieveAgentRequestTools' from JSON`,
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/** @internal */
|
|
1191
|
+
export const RetrieveAgentRequestExecuteOn$inboundSchema: z.ZodNativeEnum<
|
|
1192
|
+
typeof RetrieveAgentRequestExecuteOn
|
|
1193
|
+
> = z.nativeEnum(RetrieveAgentRequestExecuteOn);
|
|
1194
|
+
/** @internal */
|
|
1195
|
+
export const RetrieveAgentRequestExecuteOn$outboundSchema: z.ZodNativeEnum<
|
|
1196
|
+
typeof RetrieveAgentRequestExecuteOn
|
|
1197
|
+
> = RetrieveAgentRequestExecuteOn$inboundSchema;
|
|
1198
|
+
|
|
1199
|
+
/** @internal */
|
|
1200
|
+
export const RetrieveAgentRequestEvaluators$inboundSchema: z.ZodType<
|
|
1201
|
+
RetrieveAgentRequestEvaluators,
|
|
1202
|
+
z.ZodTypeDef,
|
|
1203
|
+
unknown
|
|
1204
|
+
> = z.object({
|
|
1205
|
+
id: z.string(),
|
|
1206
|
+
sample_rate: z.number().default(50),
|
|
1207
|
+
execute_on: RetrieveAgentRequestExecuteOn$inboundSchema,
|
|
1208
|
+
}).transform((v) => {
|
|
1209
|
+
return remap$(v, {
|
|
1210
|
+
"sample_rate": "sampleRate",
|
|
1211
|
+
"execute_on": "executeOn",
|
|
1212
|
+
});
|
|
1213
|
+
});
|
|
1214
|
+
/** @internal */
|
|
1215
|
+
export type RetrieveAgentRequestEvaluators$Outbound = {
|
|
1216
|
+
id: string;
|
|
1217
|
+
sample_rate: number;
|
|
1218
|
+
execute_on: string;
|
|
1219
|
+
};
|
|
1220
|
+
|
|
1221
|
+
/** @internal */
|
|
1222
|
+
export const RetrieveAgentRequestEvaluators$outboundSchema: z.ZodType<
|
|
1223
|
+
RetrieveAgentRequestEvaluators$Outbound,
|
|
1224
|
+
z.ZodTypeDef,
|
|
1225
|
+
RetrieveAgentRequestEvaluators
|
|
1226
|
+
> = z.object({
|
|
1227
|
+
id: z.string(),
|
|
1228
|
+
sampleRate: z.number().default(50),
|
|
1229
|
+
executeOn: RetrieveAgentRequestExecuteOn$outboundSchema,
|
|
1230
|
+
}).transform((v) => {
|
|
1231
|
+
return remap$(v, {
|
|
1232
|
+
sampleRate: "sample_rate",
|
|
1233
|
+
executeOn: "execute_on",
|
|
1234
|
+
});
|
|
1235
|
+
});
|
|
1236
|
+
|
|
1237
|
+
export function retrieveAgentRequestEvaluatorsToJSON(
|
|
1238
|
+
retrieveAgentRequestEvaluators: RetrieveAgentRequestEvaluators,
|
|
1239
|
+
): string {
|
|
1240
|
+
return JSON.stringify(
|
|
1241
|
+
RetrieveAgentRequestEvaluators$outboundSchema.parse(
|
|
1242
|
+
retrieveAgentRequestEvaluators,
|
|
1243
|
+
),
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
export function retrieveAgentRequestEvaluatorsFromJSON(
|
|
1247
|
+
jsonString: string,
|
|
1248
|
+
): SafeParseResult<RetrieveAgentRequestEvaluators, SDKValidationError> {
|
|
1249
|
+
return safeParse(
|
|
1250
|
+
jsonString,
|
|
1251
|
+
(x) => RetrieveAgentRequestEvaluators$inboundSchema.parse(JSON.parse(x)),
|
|
1252
|
+
`Failed to parse 'RetrieveAgentRequestEvaluators' from JSON`,
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
/** @internal */
|
|
1257
|
+
export const RetrieveAgentRequestAgentsExecuteOn$inboundSchema: z.ZodNativeEnum<
|
|
1258
|
+
typeof RetrieveAgentRequestAgentsExecuteOn
|
|
1259
|
+
> = z.nativeEnum(RetrieveAgentRequestAgentsExecuteOn);
|
|
1260
|
+
/** @internal */
|
|
1261
|
+
export const RetrieveAgentRequestAgentsExecuteOn$outboundSchema:
|
|
1262
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestAgentsExecuteOn> =
|
|
1263
|
+
RetrieveAgentRequestAgentsExecuteOn$inboundSchema;
|
|
1264
|
+
|
|
1265
|
+
/** @internal */
|
|
1266
|
+
export const RetrieveAgentRequestGuardrails$inboundSchema: z.ZodType<
|
|
1267
|
+
RetrieveAgentRequestGuardrails,
|
|
1268
|
+
z.ZodTypeDef,
|
|
1269
|
+
unknown
|
|
1270
|
+
> = z.object({
|
|
1271
|
+
id: z.string(),
|
|
1272
|
+
sample_rate: z.number().default(50),
|
|
1273
|
+
execute_on: RetrieveAgentRequestAgentsExecuteOn$inboundSchema,
|
|
1274
|
+
}).transform((v) => {
|
|
1275
|
+
return remap$(v, {
|
|
1276
|
+
"sample_rate": "sampleRate",
|
|
1277
|
+
"execute_on": "executeOn",
|
|
1278
|
+
});
|
|
1279
|
+
});
|
|
1280
|
+
/** @internal */
|
|
1281
|
+
export type RetrieveAgentRequestGuardrails$Outbound = {
|
|
1282
|
+
id: string;
|
|
1283
|
+
sample_rate: number;
|
|
1284
|
+
execute_on: string;
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
/** @internal */
|
|
1288
|
+
export const RetrieveAgentRequestGuardrails$outboundSchema: z.ZodType<
|
|
1289
|
+
RetrieveAgentRequestGuardrails$Outbound,
|
|
1290
|
+
z.ZodTypeDef,
|
|
1291
|
+
RetrieveAgentRequestGuardrails
|
|
1292
|
+
> = z.object({
|
|
1293
|
+
id: z.string(),
|
|
1294
|
+
sampleRate: z.number().default(50),
|
|
1295
|
+
executeOn: RetrieveAgentRequestAgentsExecuteOn$outboundSchema,
|
|
1296
|
+
}).transform((v) => {
|
|
1297
|
+
return remap$(v, {
|
|
1298
|
+
sampleRate: "sample_rate",
|
|
1299
|
+
executeOn: "execute_on",
|
|
1300
|
+
});
|
|
1301
|
+
});
|
|
1302
|
+
|
|
1303
|
+
export function retrieveAgentRequestGuardrailsToJSON(
|
|
1304
|
+
retrieveAgentRequestGuardrails: RetrieveAgentRequestGuardrails,
|
|
1305
|
+
): string {
|
|
1306
|
+
return JSON.stringify(
|
|
1307
|
+
RetrieveAgentRequestGuardrails$outboundSchema.parse(
|
|
1308
|
+
retrieveAgentRequestGuardrails,
|
|
1309
|
+
),
|
|
1310
|
+
);
|
|
1311
|
+
}
|
|
1312
|
+
export function retrieveAgentRequestGuardrailsFromJSON(
|
|
1313
|
+
jsonString: string,
|
|
1314
|
+
): SafeParseResult<RetrieveAgentRequestGuardrails, SDKValidationError> {
|
|
1315
|
+
return safeParse(
|
|
1316
|
+
jsonString,
|
|
1317
|
+
(x) => RetrieveAgentRequestGuardrails$inboundSchema.parse(JSON.parse(x)),
|
|
1318
|
+
`Failed to parse 'RetrieveAgentRequestGuardrails' from JSON`,
|
|
1319
|
+
);
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/** @internal */
|
|
1323
|
+
export const RetrieveAgentRequestSettings$inboundSchema: z.ZodType<
|
|
1324
|
+
RetrieveAgentRequestSettings,
|
|
1325
|
+
z.ZodTypeDef,
|
|
1326
|
+
unknown
|
|
1327
|
+
> = z.object({
|
|
1328
|
+
max_iterations: z.number().int().default(100),
|
|
1329
|
+
max_execution_time: z.number().int().default(300),
|
|
1330
|
+
tool_approval_required: RetrieveAgentRequestToolApprovalRequired$inboundSchema
|
|
1331
|
+
.default("respect_tool"),
|
|
1332
|
+
tools: z.array(z.lazy(() => RetrieveAgentRequestTools$inboundSchema))
|
|
1333
|
+
.optional(),
|
|
1334
|
+
evaluators: z.array(
|
|
1335
|
+
z.lazy(() => RetrieveAgentRequestEvaluators$inboundSchema),
|
|
1336
|
+
).optional(),
|
|
1337
|
+
guardrails: z.array(
|
|
1338
|
+
z.lazy(() => RetrieveAgentRequestGuardrails$inboundSchema),
|
|
1339
|
+
).optional(),
|
|
1340
|
+
}).transform((v) => {
|
|
1341
|
+
return remap$(v, {
|
|
1342
|
+
"max_iterations": "maxIterations",
|
|
1343
|
+
"max_execution_time": "maxExecutionTime",
|
|
1344
|
+
"tool_approval_required": "toolApprovalRequired",
|
|
1345
|
+
});
|
|
1346
|
+
});
|
|
1347
|
+
/** @internal */
|
|
1348
|
+
export type RetrieveAgentRequestSettings$Outbound = {
|
|
1349
|
+
max_iterations: number;
|
|
1350
|
+
max_execution_time: number;
|
|
1351
|
+
tool_approval_required: string;
|
|
1352
|
+
tools?: Array<RetrieveAgentRequestTools$Outbound> | undefined;
|
|
1353
|
+
evaluators?: Array<RetrieveAgentRequestEvaluators$Outbound> | undefined;
|
|
1354
|
+
guardrails?: Array<RetrieveAgentRequestGuardrails$Outbound> | undefined;
|
|
1355
|
+
};
|
|
1356
|
+
|
|
1357
|
+
/** @internal */
|
|
1358
|
+
export const RetrieveAgentRequestSettings$outboundSchema: z.ZodType<
|
|
1359
|
+
RetrieveAgentRequestSettings$Outbound,
|
|
1360
|
+
z.ZodTypeDef,
|
|
1361
|
+
RetrieveAgentRequestSettings
|
|
1362
|
+
> = z.object({
|
|
1363
|
+
maxIterations: z.number().int().default(100),
|
|
1364
|
+
maxExecutionTime: z.number().int().default(300),
|
|
1365
|
+
toolApprovalRequired: RetrieveAgentRequestToolApprovalRequired$outboundSchema
|
|
1366
|
+
.default("respect_tool"),
|
|
1367
|
+
tools: z.array(z.lazy(() => RetrieveAgentRequestTools$outboundSchema))
|
|
1368
|
+
.optional(),
|
|
1369
|
+
evaluators: z.array(
|
|
1370
|
+
z.lazy(() => RetrieveAgentRequestEvaluators$outboundSchema),
|
|
1371
|
+
).optional(),
|
|
1372
|
+
guardrails: z.array(
|
|
1373
|
+
z.lazy(() => RetrieveAgentRequestGuardrails$outboundSchema),
|
|
1374
|
+
).optional(),
|
|
1375
|
+
}).transform((v) => {
|
|
1376
|
+
return remap$(v, {
|
|
1377
|
+
maxIterations: "max_iterations",
|
|
1378
|
+
maxExecutionTime: "max_execution_time",
|
|
1379
|
+
toolApprovalRequired: "tool_approval_required",
|
|
1380
|
+
});
|
|
1381
|
+
});
|
|
1382
|
+
|
|
1383
|
+
export function retrieveAgentRequestSettingsToJSON(
|
|
1384
|
+
retrieveAgentRequestSettings: RetrieveAgentRequestSettings,
|
|
1385
|
+
): string {
|
|
1386
|
+
return JSON.stringify(
|
|
1387
|
+
RetrieveAgentRequestSettings$outboundSchema.parse(
|
|
1388
|
+
retrieveAgentRequestSettings,
|
|
1389
|
+
),
|
|
1390
|
+
);
|
|
1391
|
+
}
|
|
1392
|
+
export function retrieveAgentRequestSettingsFromJSON(
|
|
1393
|
+
jsonString: string,
|
|
1394
|
+
): SafeParseResult<RetrieveAgentRequestSettings, SDKValidationError> {
|
|
1395
|
+
return safeParse(
|
|
1396
|
+
jsonString,
|
|
1397
|
+
(x) => RetrieveAgentRequestSettings$inboundSchema.parse(JSON.parse(x)),
|
|
1398
|
+
`Failed to parse 'RetrieveAgentRequestSettings' from JSON`,
|
|
1399
|
+
);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
/** @internal */
|
|
1403
|
+
export const RetrieveAgentRequestVoice$inboundSchema: z.ZodNativeEnum<
|
|
1404
|
+
typeof RetrieveAgentRequestVoice
|
|
1405
|
+
> = z.nativeEnum(RetrieveAgentRequestVoice);
|
|
1406
|
+
/** @internal */
|
|
1407
|
+
export const RetrieveAgentRequestVoice$outboundSchema: z.ZodNativeEnum<
|
|
1408
|
+
typeof RetrieveAgentRequestVoice
|
|
1409
|
+
> = RetrieveAgentRequestVoice$inboundSchema;
|
|
1410
|
+
|
|
1411
|
+
/** @internal */
|
|
1412
|
+
export const RetrieveAgentRequestFormat$inboundSchema: z.ZodNativeEnum<
|
|
1413
|
+
typeof RetrieveAgentRequestFormat
|
|
1414
|
+
> = z.nativeEnum(RetrieveAgentRequestFormat);
|
|
1415
|
+
/** @internal */
|
|
1416
|
+
export const RetrieveAgentRequestFormat$outboundSchema: z.ZodNativeEnum<
|
|
1417
|
+
typeof RetrieveAgentRequestFormat
|
|
1418
|
+
> = RetrieveAgentRequestFormat$inboundSchema;
|
|
1419
|
+
|
|
1420
|
+
/** @internal */
|
|
1421
|
+
export const RetrieveAgentRequestAudio$inboundSchema: z.ZodType<
|
|
1422
|
+
RetrieveAgentRequestAudio,
|
|
1423
|
+
z.ZodTypeDef,
|
|
1424
|
+
unknown
|
|
1425
|
+
> = z.object({
|
|
1426
|
+
voice: RetrieveAgentRequestVoice$inboundSchema,
|
|
1427
|
+
format: RetrieveAgentRequestFormat$inboundSchema,
|
|
1428
|
+
});
|
|
1429
|
+
/** @internal */
|
|
1430
|
+
export type RetrieveAgentRequestAudio$Outbound = {
|
|
1431
|
+
voice: string;
|
|
1432
|
+
format: string;
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
/** @internal */
|
|
1436
|
+
export const RetrieveAgentRequestAudio$outboundSchema: z.ZodType<
|
|
1437
|
+
RetrieveAgentRequestAudio$Outbound,
|
|
1438
|
+
z.ZodTypeDef,
|
|
1439
|
+
RetrieveAgentRequestAudio
|
|
1440
|
+
> = z.object({
|
|
1441
|
+
voice: RetrieveAgentRequestVoice$outboundSchema,
|
|
1442
|
+
format: RetrieveAgentRequestFormat$outboundSchema,
|
|
1443
|
+
});
|
|
1444
|
+
|
|
1445
|
+
export function retrieveAgentRequestAudioToJSON(
|
|
1446
|
+
retrieveAgentRequestAudio: RetrieveAgentRequestAudio,
|
|
1447
|
+
): string {
|
|
1448
|
+
return JSON.stringify(
|
|
1449
|
+
RetrieveAgentRequestAudio$outboundSchema.parse(retrieveAgentRequestAudio),
|
|
1450
|
+
);
|
|
1451
|
+
}
|
|
1452
|
+
export function retrieveAgentRequestAudioFromJSON(
|
|
1453
|
+
jsonString: string,
|
|
1454
|
+
): SafeParseResult<RetrieveAgentRequestAudio, SDKValidationError> {
|
|
1455
|
+
return safeParse(
|
|
1456
|
+
jsonString,
|
|
1457
|
+
(x) => RetrieveAgentRequestAudio$inboundSchema.parse(JSON.parse(x)),
|
|
1458
|
+
`Failed to parse 'RetrieveAgentRequestAudio' from JSON`,
|
|
1459
|
+
);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/** @internal */
|
|
1463
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponseType$inboundSchema:
|
|
1464
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestResponseFormatAgentsResponseType> =
|
|
1465
|
+
z.nativeEnum(RetrieveAgentRequestResponseFormatAgentsResponseType);
|
|
1466
|
+
/** @internal */
|
|
1467
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponseType$outboundSchema:
|
|
1468
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestResponseFormatAgentsResponseType> =
|
|
1469
|
+
RetrieveAgentRequestResponseFormatAgentsResponseType$inboundSchema;
|
|
1470
|
+
|
|
1471
|
+
/** @internal */
|
|
1472
|
+
export const RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema:
|
|
1473
|
+
z.ZodType<
|
|
1474
|
+
RetrieveAgentRequestResponseFormatJsonSchema,
|
|
1475
|
+
z.ZodTypeDef,
|
|
1476
|
+
unknown
|
|
1477
|
+
> = z.object({
|
|
1478
|
+
description: z.string().optional(),
|
|
1479
|
+
name: z.string(),
|
|
1480
|
+
schema: z.any().optional(),
|
|
1481
|
+
strict: z.boolean().default(false),
|
|
1482
|
+
});
|
|
1483
|
+
/** @internal */
|
|
1484
|
+
export type RetrieveAgentRequestResponseFormatJsonSchema$Outbound = {
|
|
1485
|
+
description?: string | undefined;
|
|
1486
|
+
name: string;
|
|
1487
|
+
schema?: any | undefined;
|
|
1488
|
+
strict: boolean;
|
|
1489
|
+
};
|
|
1490
|
+
|
|
1491
|
+
/** @internal */
|
|
1492
|
+
export const RetrieveAgentRequestResponseFormatJsonSchema$outboundSchema:
|
|
1493
|
+
z.ZodType<
|
|
1494
|
+
RetrieveAgentRequestResponseFormatJsonSchema$Outbound,
|
|
1495
|
+
z.ZodTypeDef,
|
|
1496
|
+
RetrieveAgentRequestResponseFormatJsonSchema
|
|
1497
|
+
> = z.object({
|
|
1498
|
+
description: z.string().optional(),
|
|
1499
|
+
name: z.string(),
|
|
1500
|
+
schema: z.any().optional(),
|
|
1501
|
+
strict: z.boolean().default(false),
|
|
1502
|
+
});
|
|
1503
|
+
|
|
1504
|
+
export function retrieveAgentRequestResponseFormatJsonSchemaToJSON(
|
|
1505
|
+
retrieveAgentRequestResponseFormatJsonSchema:
|
|
1506
|
+
RetrieveAgentRequestResponseFormatJsonSchema,
|
|
1507
|
+
): string {
|
|
1508
|
+
return JSON.stringify(
|
|
1509
|
+
RetrieveAgentRequestResponseFormatJsonSchema$outboundSchema.parse(
|
|
1510
|
+
retrieveAgentRequestResponseFormatJsonSchema,
|
|
1511
|
+
),
|
|
1512
|
+
);
|
|
1513
|
+
}
|
|
1514
|
+
export function retrieveAgentRequestResponseFormatJsonSchemaFromJSON(
|
|
1515
|
+
jsonString: string,
|
|
1516
|
+
): SafeParseResult<
|
|
1517
|
+
RetrieveAgentRequestResponseFormatJsonSchema,
|
|
1518
|
+
SDKValidationError
|
|
1519
|
+
> {
|
|
1520
|
+
return safeParse(
|
|
1521
|
+
jsonString,
|
|
1522
|
+
(x) =>
|
|
1523
|
+
RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema.parse(
|
|
1524
|
+
JSON.parse(x),
|
|
1525
|
+
),
|
|
1526
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatJsonSchema' from JSON`,
|
|
1527
|
+
);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
/** @internal */
|
|
1531
|
+
export const RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema:
|
|
1532
|
+
z.ZodType<
|
|
1533
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema,
|
|
1534
|
+
z.ZodTypeDef,
|
|
1535
|
+
unknown
|
|
1536
|
+
> = z.object({
|
|
1537
|
+
type: RetrieveAgentRequestResponseFormatAgentsResponseType$inboundSchema,
|
|
1538
|
+
json_schema: z.lazy(() =>
|
|
1539
|
+
RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema
|
|
1540
|
+
),
|
|
1541
|
+
}).transform((v) => {
|
|
1542
|
+
return remap$(v, {
|
|
1543
|
+
"json_schema": "jsonSchema",
|
|
1544
|
+
});
|
|
1545
|
+
});
|
|
1546
|
+
/** @internal */
|
|
1547
|
+
export type RetrieveAgentRequestResponseFormatAgentsJSONSchema$Outbound = {
|
|
1548
|
+
type: string;
|
|
1549
|
+
json_schema: RetrieveAgentRequestResponseFormatJsonSchema$Outbound;
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
/** @internal */
|
|
1553
|
+
export const RetrieveAgentRequestResponseFormatAgentsJSONSchema$outboundSchema:
|
|
1554
|
+
z.ZodType<
|
|
1555
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema$Outbound,
|
|
1556
|
+
z.ZodTypeDef,
|
|
1557
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema
|
|
1558
|
+
> = z.object({
|
|
1559
|
+
type: RetrieveAgentRequestResponseFormatAgentsResponseType$outboundSchema,
|
|
1560
|
+
jsonSchema: z.lazy(() =>
|
|
1561
|
+
RetrieveAgentRequestResponseFormatJsonSchema$outboundSchema
|
|
1562
|
+
),
|
|
1563
|
+
}).transform((v) => {
|
|
1564
|
+
return remap$(v, {
|
|
1565
|
+
jsonSchema: "json_schema",
|
|
1566
|
+
});
|
|
1567
|
+
});
|
|
1568
|
+
|
|
1569
|
+
export function retrieveAgentRequestResponseFormatAgentsJSONSchemaToJSON(
|
|
1570
|
+
retrieveAgentRequestResponseFormatAgentsJSONSchema:
|
|
1571
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema,
|
|
1572
|
+
): string {
|
|
1573
|
+
return JSON.stringify(
|
|
1574
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema$outboundSchema.parse(
|
|
1575
|
+
retrieveAgentRequestResponseFormatAgentsJSONSchema,
|
|
1576
|
+
),
|
|
1577
|
+
);
|
|
1578
|
+
}
|
|
1579
|
+
export function retrieveAgentRequestResponseFormatAgentsJSONSchemaFromJSON(
|
|
1580
|
+
jsonString: string,
|
|
1581
|
+
): SafeParseResult<
|
|
1582
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema,
|
|
1583
|
+
SDKValidationError
|
|
1584
|
+
> {
|
|
1585
|
+
return safeParse(
|
|
1586
|
+
jsonString,
|
|
1587
|
+
(x) =>
|
|
1588
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema.parse(
|
|
1589
|
+
JSON.parse(x),
|
|
1590
|
+
),
|
|
1591
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatAgentsJSONSchema' from JSON`,
|
|
1592
|
+
);
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
/** @internal */
|
|
1596
|
+
export const RetrieveAgentRequestResponseFormatAgentsType$inboundSchema:
|
|
1597
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestResponseFormatAgentsType> = z
|
|
1598
|
+
.nativeEnum(RetrieveAgentRequestResponseFormatAgentsType);
|
|
1599
|
+
/** @internal */
|
|
1600
|
+
export const RetrieveAgentRequestResponseFormatAgentsType$outboundSchema:
|
|
1601
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestResponseFormatAgentsType> =
|
|
1602
|
+
RetrieveAgentRequestResponseFormatAgentsType$inboundSchema;
|
|
1603
|
+
|
|
1604
|
+
/** @internal */
|
|
1605
|
+
export const RetrieveAgentRequestResponseFormatJSONObject$inboundSchema:
|
|
1606
|
+
z.ZodType<
|
|
1607
|
+
RetrieveAgentRequestResponseFormatJSONObject,
|
|
1608
|
+
z.ZodTypeDef,
|
|
1609
|
+
unknown
|
|
1610
|
+
> = z.object({
|
|
1611
|
+
type: RetrieveAgentRequestResponseFormatAgentsType$inboundSchema,
|
|
1612
|
+
});
|
|
1613
|
+
/** @internal */
|
|
1614
|
+
export type RetrieveAgentRequestResponseFormatJSONObject$Outbound = {
|
|
1615
|
+
type: string;
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
/** @internal */
|
|
1619
|
+
export const RetrieveAgentRequestResponseFormatJSONObject$outboundSchema:
|
|
1620
|
+
z.ZodType<
|
|
1621
|
+
RetrieveAgentRequestResponseFormatJSONObject$Outbound,
|
|
1622
|
+
z.ZodTypeDef,
|
|
1623
|
+
RetrieveAgentRequestResponseFormatJSONObject
|
|
1624
|
+
> = z.object({
|
|
1625
|
+
type: RetrieveAgentRequestResponseFormatAgentsType$outboundSchema,
|
|
1626
|
+
});
|
|
1627
|
+
|
|
1628
|
+
export function retrieveAgentRequestResponseFormatJSONObjectToJSON(
|
|
1629
|
+
retrieveAgentRequestResponseFormatJSONObject:
|
|
1630
|
+
RetrieveAgentRequestResponseFormatJSONObject,
|
|
1631
|
+
): string {
|
|
1632
|
+
return JSON.stringify(
|
|
1633
|
+
RetrieveAgentRequestResponseFormatJSONObject$outboundSchema.parse(
|
|
1634
|
+
retrieveAgentRequestResponseFormatJSONObject,
|
|
1635
|
+
),
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1638
|
+
export function retrieveAgentRequestResponseFormatJSONObjectFromJSON(
|
|
1639
|
+
jsonString: string,
|
|
1640
|
+
): SafeParseResult<
|
|
1641
|
+
RetrieveAgentRequestResponseFormatJSONObject,
|
|
1642
|
+
SDKValidationError
|
|
1643
|
+
> {
|
|
1644
|
+
return safeParse(
|
|
1645
|
+
jsonString,
|
|
1646
|
+
(x) =>
|
|
1647
|
+
RetrieveAgentRequestResponseFormatJSONObject$inboundSchema.parse(
|
|
1648
|
+
JSON.parse(x),
|
|
1649
|
+
),
|
|
1650
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatJSONObject' from JSON`,
|
|
1651
|
+
);
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
/** @internal */
|
|
1655
|
+
export const RetrieveAgentRequestResponseFormatType$inboundSchema:
|
|
1656
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestResponseFormatType> = z.nativeEnum(
|
|
1657
|
+
RetrieveAgentRequestResponseFormatType,
|
|
1658
|
+
);
|
|
1659
|
+
/** @internal */
|
|
1660
|
+
export const RetrieveAgentRequestResponseFormatType$outboundSchema:
|
|
1661
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestResponseFormatType> =
|
|
1662
|
+
RetrieveAgentRequestResponseFormatType$inboundSchema;
|
|
1663
|
+
|
|
1664
|
+
/** @internal */
|
|
1665
|
+
export const RetrieveAgentRequestResponseFormatText$inboundSchema: z.ZodType<
|
|
1666
|
+
RetrieveAgentRequestResponseFormatText,
|
|
1667
|
+
z.ZodTypeDef,
|
|
1668
|
+
unknown
|
|
1669
|
+
> = z.object({
|
|
1670
|
+
type: RetrieveAgentRequestResponseFormatType$inboundSchema,
|
|
1671
|
+
});
|
|
1672
|
+
/** @internal */
|
|
1673
|
+
export type RetrieveAgentRequestResponseFormatText$Outbound = {
|
|
1674
|
+
type: string;
|
|
1675
|
+
};
|
|
1676
|
+
|
|
1677
|
+
/** @internal */
|
|
1678
|
+
export const RetrieveAgentRequestResponseFormatText$outboundSchema: z.ZodType<
|
|
1679
|
+
RetrieveAgentRequestResponseFormatText$Outbound,
|
|
1680
|
+
z.ZodTypeDef,
|
|
1681
|
+
RetrieveAgentRequestResponseFormatText
|
|
1682
|
+
> = z.object({
|
|
1683
|
+
type: RetrieveAgentRequestResponseFormatType$outboundSchema,
|
|
1684
|
+
});
|
|
1685
|
+
|
|
1686
|
+
export function retrieveAgentRequestResponseFormatTextToJSON(
|
|
1687
|
+
retrieveAgentRequestResponseFormatText:
|
|
1688
|
+
RetrieveAgentRequestResponseFormatText,
|
|
1689
|
+
): string {
|
|
1690
|
+
return JSON.stringify(
|
|
1691
|
+
RetrieveAgentRequestResponseFormatText$outboundSchema.parse(
|
|
1692
|
+
retrieveAgentRequestResponseFormatText,
|
|
1693
|
+
),
|
|
1694
|
+
);
|
|
1695
|
+
}
|
|
1696
|
+
export function retrieveAgentRequestResponseFormatTextFromJSON(
|
|
1697
|
+
jsonString: string,
|
|
1698
|
+
): SafeParseResult<RetrieveAgentRequestResponseFormatText, SDKValidationError> {
|
|
1699
|
+
return safeParse(
|
|
1700
|
+
jsonString,
|
|
1701
|
+
(x) =>
|
|
1702
|
+
RetrieveAgentRequestResponseFormatText$inboundSchema.parse(JSON.parse(x)),
|
|
1703
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatText' from JSON`,
|
|
1704
|
+
);
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
/** @internal */
|
|
1708
|
+
export const RetrieveAgentRequestResponseFormat$inboundSchema: z.ZodType<
|
|
1709
|
+
RetrieveAgentRequestResponseFormat,
|
|
1710
|
+
z.ZodTypeDef,
|
|
1711
|
+
unknown
|
|
1712
|
+
> = z.union([
|
|
1713
|
+
z.lazy(() =>
|
|
1714
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
|
|
1715
|
+
),
|
|
1716
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
|
|
1717
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
|
|
1718
|
+
]);
|
|
1719
|
+
/** @internal */
|
|
1720
|
+
export type RetrieveAgentRequestResponseFormat$Outbound =
|
|
1721
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONSchema$Outbound
|
|
1722
|
+
| RetrieveAgentRequestResponseFormatText$Outbound
|
|
1723
|
+
| RetrieveAgentRequestResponseFormatJSONObject$Outbound;
|
|
1724
|
+
|
|
1725
|
+
/** @internal */
|
|
1726
|
+
export const RetrieveAgentRequestResponseFormat$outboundSchema: z.ZodType<
|
|
1727
|
+
RetrieveAgentRequestResponseFormat$Outbound,
|
|
1728
|
+
z.ZodTypeDef,
|
|
1729
|
+
RetrieveAgentRequestResponseFormat
|
|
1730
|
+
> = z.union([
|
|
1731
|
+
z.lazy(() =>
|
|
1732
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema$outboundSchema
|
|
1733
|
+
),
|
|
1734
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatText$outboundSchema),
|
|
1735
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$outboundSchema),
|
|
1736
|
+
]);
|
|
1737
|
+
|
|
1738
|
+
export function retrieveAgentRequestResponseFormatToJSON(
|
|
1739
|
+
retrieveAgentRequestResponseFormat: RetrieveAgentRequestResponseFormat,
|
|
1740
|
+
): string {
|
|
1741
|
+
return JSON.stringify(
|
|
1742
|
+
RetrieveAgentRequestResponseFormat$outboundSchema.parse(
|
|
1743
|
+
retrieveAgentRequestResponseFormat,
|
|
1744
|
+
),
|
|
1745
|
+
);
|
|
1746
|
+
}
|
|
1747
|
+
export function retrieveAgentRequestResponseFormatFromJSON(
|
|
1748
|
+
jsonString: string,
|
|
1749
|
+
): SafeParseResult<RetrieveAgentRequestResponseFormat, SDKValidationError> {
|
|
1750
|
+
return safeParse(
|
|
1751
|
+
jsonString,
|
|
1752
|
+
(x) =>
|
|
1753
|
+
RetrieveAgentRequestResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1754
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormat' from JSON`,
|
|
1755
|
+
);
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
/** @internal */
|
|
1759
|
+
export const RetrieveAgentRequestStop$inboundSchema: z.ZodType<
|
|
1760
|
+
RetrieveAgentRequestStop,
|
|
1761
|
+
z.ZodTypeDef,
|
|
1762
|
+
unknown
|
|
1763
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
1764
|
+
/** @internal */
|
|
1765
|
+
export type RetrieveAgentRequestStop$Outbound = string | Array<string>;
|
|
1766
|
+
|
|
1767
|
+
/** @internal */
|
|
1768
|
+
export const RetrieveAgentRequestStop$outboundSchema: z.ZodType<
|
|
1769
|
+
RetrieveAgentRequestStop$Outbound,
|
|
1770
|
+
z.ZodTypeDef,
|
|
1771
|
+
RetrieveAgentRequestStop
|
|
1772
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
1773
|
+
|
|
1774
|
+
export function retrieveAgentRequestStopToJSON(
|
|
1775
|
+
retrieveAgentRequestStop: RetrieveAgentRequestStop,
|
|
1776
|
+
): string {
|
|
1777
|
+
return JSON.stringify(
|
|
1778
|
+
RetrieveAgentRequestStop$outboundSchema.parse(retrieveAgentRequestStop),
|
|
1779
|
+
);
|
|
1780
|
+
}
|
|
1781
|
+
export function retrieveAgentRequestStopFromJSON(
|
|
1782
|
+
jsonString: string,
|
|
1783
|
+
): SafeParseResult<RetrieveAgentRequestStop, SDKValidationError> {
|
|
1784
|
+
return safeParse(
|
|
1785
|
+
jsonString,
|
|
1786
|
+
(x) => RetrieveAgentRequestStop$inboundSchema.parse(JSON.parse(x)),
|
|
1787
|
+
`Failed to parse 'RetrieveAgentRequestStop' from JSON`,
|
|
1788
|
+
);
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
/** @internal */
|
|
1792
|
+
export const RetrieveAgentRequestStreamOptions$inboundSchema: z.ZodType<
|
|
1793
|
+
RetrieveAgentRequestStreamOptions,
|
|
1794
|
+
z.ZodTypeDef,
|
|
1795
|
+
unknown
|
|
1796
|
+
> = z.object({
|
|
1797
|
+
include_usage: z.boolean().optional(),
|
|
1798
|
+
}).transform((v) => {
|
|
1799
|
+
return remap$(v, {
|
|
1800
|
+
"include_usage": "includeUsage",
|
|
1801
|
+
});
|
|
1802
|
+
});
|
|
1803
|
+
/** @internal */
|
|
1804
|
+
export type RetrieveAgentRequestStreamOptions$Outbound = {
|
|
1805
|
+
include_usage?: boolean | undefined;
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
/** @internal */
|
|
1809
|
+
export const RetrieveAgentRequestStreamOptions$outboundSchema: z.ZodType<
|
|
1810
|
+
RetrieveAgentRequestStreamOptions$Outbound,
|
|
1811
|
+
z.ZodTypeDef,
|
|
1812
|
+
RetrieveAgentRequestStreamOptions
|
|
1813
|
+
> = z.object({
|
|
1814
|
+
includeUsage: z.boolean().optional(),
|
|
1815
|
+
}).transform((v) => {
|
|
1816
|
+
return remap$(v, {
|
|
1817
|
+
includeUsage: "include_usage",
|
|
1818
|
+
});
|
|
1819
|
+
});
|
|
1820
|
+
|
|
1821
|
+
export function retrieveAgentRequestStreamOptionsToJSON(
|
|
1822
|
+
retrieveAgentRequestStreamOptions: RetrieveAgentRequestStreamOptions,
|
|
1823
|
+
): string {
|
|
1824
|
+
return JSON.stringify(
|
|
1825
|
+
RetrieveAgentRequestStreamOptions$outboundSchema.parse(
|
|
1826
|
+
retrieveAgentRequestStreamOptions,
|
|
1827
|
+
),
|
|
1828
|
+
);
|
|
1829
|
+
}
|
|
1830
|
+
export function retrieveAgentRequestStreamOptionsFromJSON(
|
|
1831
|
+
jsonString: string,
|
|
1832
|
+
): SafeParseResult<RetrieveAgentRequestStreamOptions, SDKValidationError> {
|
|
1833
|
+
return safeParse(
|
|
1834
|
+
jsonString,
|
|
1835
|
+
(x) => RetrieveAgentRequestStreamOptions$inboundSchema.parse(JSON.parse(x)),
|
|
1836
|
+
`Failed to parse 'RetrieveAgentRequestStreamOptions' from JSON`,
|
|
1837
|
+
);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
/** @internal */
|
|
1841
|
+
export const RetrieveAgentRequestType$inboundSchema: z.ZodNativeEnum<
|
|
1842
|
+
typeof RetrieveAgentRequestType
|
|
1843
|
+
> = z.nativeEnum(RetrieveAgentRequestType);
|
|
1844
|
+
/** @internal */
|
|
1845
|
+
export const RetrieveAgentRequestType$outboundSchema: z.ZodNativeEnum<
|
|
1846
|
+
typeof RetrieveAgentRequestType
|
|
1847
|
+
> = RetrieveAgentRequestType$inboundSchema;
|
|
1848
|
+
|
|
1849
|
+
/** @internal */
|
|
1850
|
+
export const RetrieveAgentRequestThinkingLevel$inboundSchema: z.ZodNativeEnum<
|
|
1851
|
+
typeof RetrieveAgentRequestThinkingLevel
|
|
1852
|
+
> = z.nativeEnum(RetrieveAgentRequestThinkingLevel);
|
|
1853
|
+
/** @internal */
|
|
1854
|
+
export const RetrieveAgentRequestThinkingLevel$outboundSchema: z.ZodNativeEnum<
|
|
1855
|
+
typeof RetrieveAgentRequestThinkingLevel
|
|
1856
|
+
> = RetrieveAgentRequestThinkingLevel$inboundSchema;
|
|
1857
|
+
|
|
1858
|
+
/** @internal */
|
|
1859
|
+
export const RetrieveAgentRequestThinking$inboundSchema: z.ZodType<
|
|
1860
|
+
RetrieveAgentRequestThinking,
|
|
1861
|
+
z.ZodTypeDef,
|
|
1862
|
+
unknown
|
|
1863
|
+
> = z.object({
|
|
1864
|
+
type: RetrieveAgentRequestType$inboundSchema,
|
|
1865
|
+
budget_tokens: z.number(),
|
|
1866
|
+
thinking_level: RetrieveAgentRequestThinkingLevel$inboundSchema.optional(),
|
|
1867
|
+
}).transform((v) => {
|
|
1868
|
+
return remap$(v, {
|
|
1869
|
+
"budget_tokens": "budgetTokens",
|
|
1870
|
+
"thinking_level": "thinkingLevel",
|
|
1871
|
+
});
|
|
1872
|
+
});
|
|
1873
|
+
/** @internal */
|
|
1874
|
+
export type RetrieveAgentRequestThinking$Outbound = {
|
|
1875
|
+
type: string;
|
|
1876
|
+
budget_tokens: number;
|
|
1877
|
+
thinking_level?: string | undefined;
|
|
1878
|
+
};
|
|
1879
|
+
|
|
1880
|
+
/** @internal */
|
|
1881
|
+
export const RetrieveAgentRequestThinking$outboundSchema: z.ZodType<
|
|
1882
|
+
RetrieveAgentRequestThinking$Outbound,
|
|
1883
|
+
z.ZodTypeDef,
|
|
1884
|
+
RetrieveAgentRequestThinking
|
|
1885
|
+
> = z.object({
|
|
1886
|
+
type: RetrieveAgentRequestType$outboundSchema,
|
|
1887
|
+
budgetTokens: z.number(),
|
|
1888
|
+
thinkingLevel: RetrieveAgentRequestThinkingLevel$outboundSchema.optional(),
|
|
1889
|
+
}).transform((v) => {
|
|
1890
|
+
return remap$(v, {
|
|
1891
|
+
budgetTokens: "budget_tokens",
|
|
1892
|
+
thinkingLevel: "thinking_level",
|
|
1893
|
+
});
|
|
1894
|
+
});
|
|
1895
|
+
|
|
1896
|
+
export function retrieveAgentRequestThinkingToJSON(
|
|
1897
|
+
retrieveAgentRequestThinking: RetrieveAgentRequestThinking,
|
|
1898
|
+
): string {
|
|
1899
|
+
return JSON.stringify(
|
|
1900
|
+
RetrieveAgentRequestThinking$outboundSchema.parse(
|
|
1901
|
+
retrieveAgentRequestThinking,
|
|
1902
|
+
),
|
|
1903
|
+
);
|
|
1904
|
+
}
|
|
1905
|
+
export function retrieveAgentRequestThinkingFromJSON(
|
|
1906
|
+
jsonString: string,
|
|
1907
|
+
): SafeParseResult<RetrieveAgentRequestThinking, SDKValidationError> {
|
|
1908
|
+
return safeParse(
|
|
1909
|
+
jsonString,
|
|
1910
|
+
(x) => RetrieveAgentRequestThinking$inboundSchema.parse(JSON.parse(x)),
|
|
1911
|
+
`Failed to parse 'RetrieveAgentRequestThinking' from JSON`,
|
|
1912
|
+
);
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
/** @internal */
|
|
1916
|
+
export const RetrieveAgentRequestToolChoiceType$inboundSchema: z.ZodNativeEnum<
|
|
1917
|
+
typeof RetrieveAgentRequestToolChoiceType
|
|
1918
|
+
> = z.nativeEnum(RetrieveAgentRequestToolChoiceType);
|
|
1919
|
+
/** @internal */
|
|
1920
|
+
export const RetrieveAgentRequestToolChoiceType$outboundSchema: z.ZodNativeEnum<
|
|
1921
|
+
typeof RetrieveAgentRequestToolChoiceType
|
|
1922
|
+
> = RetrieveAgentRequestToolChoiceType$inboundSchema;
|
|
1923
|
+
|
|
1924
|
+
/** @internal */
|
|
1925
|
+
export const RetrieveAgentRequestToolChoiceFunction$inboundSchema: z.ZodType<
|
|
1926
|
+
RetrieveAgentRequestToolChoiceFunction,
|
|
1927
|
+
z.ZodTypeDef,
|
|
1928
|
+
unknown
|
|
1929
|
+
> = z.object({
|
|
1930
|
+
name: z.string().optional(),
|
|
1931
|
+
});
|
|
1932
|
+
/** @internal */
|
|
1933
|
+
export type RetrieveAgentRequestToolChoiceFunction$Outbound = {
|
|
1934
|
+
name?: string | undefined;
|
|
1935
|
+
};
|
|
1936
|
+
|
|
1937
|
+
/** @internal */
|
|
1938
|
+
export const RetrieveAgentRequestToolChoiceFunction$outboundSchema: z.ZodType<
|
|
1939
|
+
RetrieveAgentRequestToolChoiceFunction$Outbound,
|
|
1940
|
+
z.ZodTypeDef,
|
|
1941
|
+
RetrieveAgentRequestToolChoiceFunction
|
|
1942
|
+
> = z.object({
|
|
1943
|
+
name: z.string().optional(),
|
|
1944
|
+
});
|
|
1945
|
+
|
|
1946
|
+
export function retrieveAgentRequestToolChoiceFunctionToJSON(
|
|
1947
|
+
retrieveAgentRequestToolChoiceFunction:
|
|
1948
|
+
RetrieveAgentRequestToolChoiceFunction,
|
|
1949
|
+
): string {
|
|
1950
|
+
return JSON.stringify(
|
|
1951
|
+
RetrieveAgentRequestToolChoiceFunction$outboundSchema.parse(
|
|
1952
|
+
retrieveAgentRequestToolChoiceFunction,
|
|
1953
|
+
),
|
|
1954
|
+
);
|
|
1955
|
+
}
|
|
1956
|
+
export function retrieveAgentRequestToolChoiceFunctionFromJSON(
|
|
1957
|
+
jsonString: string,
|
|
1958
|
+
): SafeParseResult<RetrieveAgentRequestToolChoiceFunction, SDKValidationError> {
|
|
1959
|
+
return safeParse(
|
|
1960
|
+
jsonString,
|
|
1961
|
+
(x) =>
|
|
1962
|
+
RetrieveAgentRequestToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
|
|
1963
|
+
`Failed to parse 'RetrieveAgentRequestToolChoiceFunction' from JSON`,
|
|
1964
|
+
);
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
/** @internal */
|
|
1968
|
+
export const RetrieveAgentRequestToolChoice2$inboundSchema: z.ZodType<
|
|
1969
|
+
RetrieveAgentRequestToolChoice2,
|
|
1970
|
+
z.ZodTypeDef,
|
|
1971
|
+
unknown
|
|
1972
|
+
> = z.object({
|
|
1973
|
+
type: RetrieveAgentRequestToolChoiceType$inboundSchema.optional(),
|
|
1974
|
+
function: z.lazy(() => RetrieveAgentRequestToolChoiceFunction$inboundSchema),
|
|
1975
|
+
});
|
|
1976
|
+
/** @internal */
|
|
1977
|
+
export type RetrieveAgentRequestToolChoice2$Outbound = {
|
|
1978
|
+
type?: string | undefined;
|
|
1979
|
+
function: RetrieveAgentRequestToolChoiceFunction$Outbound;
|
|
1980
|
+
};
|
|
1981
|
+
|
|
1982
|
+
/** @internal */
|
|
1983
|
+
export const RetrieveAgentRequestToolChoice2$outboundSchema: z.ZodType<
|
|
1984
|
+
RetrieveAgentRequestToolChoice2$Outbound,
|
|
1985
|
+
z.ZodTypeDef,
|
|
1986
|
+
RetrieveAgentRequestToolChoice2
|
|
1987
|
+
> = z.object({
|
|
1988
|
+
type: RetrieveAgentRequestToolChoiceType$outboundSchema.optional(),
|
|
1989
|
+
function: z.lazy(() => RetrieveAgentRequestToolChoiceFunction$outboundSchema),
|
|
1990
|
+
});
|
|
1991
|
+
|
|
1992
|
+
export function retrieveAgentRequestToolChoice2ToJSON(
|
|
1993
|
+
retrieveAgentRequestToolChoice2: RetrieveAgentRequestToolChoice2,
|
|
1994
|
+
): string {
|
|
1995
|
+
return JSON.stringify(
|
|
1996
|
+
RetrieveAgentRequestToolChoice2$outboundSchema.parse(
|
|
1997
|
+
retrieveAgentRequestToolChoice2,
|
|
1998
|
+
),
|
|
1999
|
+
);
|
|
2000
|
+
}
|
|
2001
|
+
export function retrieveAgentRequestToolChoice2FromJSON(
|
|
2002
|
+
jsonString: string,
|
|
2003
|
+
): SafeParseResult<RetrieveAgentRequestToolChoice2, SDKValidationError> {
|
|
2004
|
+
return safeParse(
|
|
2005
|
+
jsonString,
|
|
2006
|
+
(x) => RetrieveAgentRequestToolChoice2$inboundSchema.parse(JSON.parse(x)),
|
|
2007
|
+
`Failed to parse 'RetrieveAgentRequestToolChoice2' from JSON`,
|
|
2008
|
+
);
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
/** @internal */
|
|
2012
|
+
export const RetrieveAgentRequestToolChoice1$inboundSchema: z.ZodNativeEnum<
|
|
2013
|
+
typeof RetrieveAgentRequestToolChoice1
|
|
2014
|
+
> = z.nativeEnum(RetrieveAgentRequestToolChoice1);
|
|
2015
|
+
/** @internal */
|
|
2016
|
+
export const RetrieveAgentRequestToolChoice1$outboundSchema: z.ZodNativeEnum<
|
|
2017
|
+
typeof RetrieveAgentRequestToolChoice1
|
|
2018
|
+
> = RetrieveAgentRequestToolChoice1$inboundSchema;
|
|
2019
|
+
|
|
2020
|
+
/** @internal */
|
|
2021
|
+
export const RetrieveAgentRequestToolChoice$inboundSchema: z.ZodType<
|
|
2022
|
+
RetrieveAgentRequestToolChoice,
|
|
2023
|
+
z.ZodTypeDef,
|
|
2024
|
+
unknown
|
|
2025
|
+
> = z.union([
|
|
2026
|
+
z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
|
|
2027
|
+
RetrieveAgentRequestToolChoice1$inboundSchema,
|
|
2028
|
+
]);
|
|
2029
|
+
/** @internal */
|
|
2030
|
+
export type RetrieveAgentRequestToolChoice$Outbound =
|
|
2031
|
+
| RetrieveAgentRequestToolChoice2$Outbound
|
|
2032
|
+
| string;
|
|
2033
|
+
|
|
2034
|
+
/** @internal */
|
|
2035
|
+
export const RetrieveAgentRequestToolChoice$outboundSchema: z.ZodType<
|
|
2036
|
+
RetrieveAgentRequestToolChoice$Outbound,
|
|
2037
|
+
z.ZodTypeDef,
|
|
2038
|
+
RetrieveAgentRequestToolChoice
|
|
2039
|
+
> = z.union([
|
|
2040
|
+
z.lazy(() => RetrieveAgentRequestToolChoice2$outboundSchema),
|
|
2041
|
+
RetrieveAgentRequestToolChoice1$outboundSchema,
|
|
2042
|
+
]);
|
|
2043
|
+
|
|
2044
|
+
export function retrieveAgentRequestToolChoiceToJSON(
|
|
2045
|
+
retrieveAgentRequestToolChoice: RetrieveAgentRequestToolChoice,
|
|
2046
|
+
): string {
|
|
2047
|
+
return JSON.stringify(
|
|
2048
|
+
RetrieveAgentRequestToolChoice$outboundSchema.parse(
|
|
2049
|
+
retrieveAgentRequestToolChoice,
|
|
2050
|
+
),
|
|
2051
|
+
);
|
|
2052
|
+
}
|
|
2053
|
+
export function retrieveAgentRequestToolChoiceFromJSON(
|
|
2054
|
+
jsonString: string,
|
|
2055
|
+
): SafeParseResult<RetrieveAgentRequestToolChoice, SDKValidationError> {
|
|
2056
|
+
return safeParse(
|
|
2057
|
+
jsonString,
|
|
2058
|
+
(x) => RetrieveAgentRequestToolChoice$inboundSchema.parse(JSON.parse(x)),
|
|
2059
|
+
`Failed to parse 'RetrieveAgentRequestToolChoice' from JSON`,
|
|
2060
|
+
);
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/** @internal */
|
|
2064
|
+
export const RetrieveAgentRequestModalities$inboundSchema: z.ZodNativeEnum<
|
|
2065
|
+
typeof RetrieveAgentRequestModalities
|
|
2066
|
+
> = z.nativeEnum(RetrieveAgentRequestModalities);
|
|
2067
|
+
/** @internal */
|
|
2068
|
+
export const RetrieveAgentRequestModalities$outboundSchema: z.ZodNativeEnum<
|
|
2069
|
+
typeof RetrieveAgentRequestModalities
|
|
2070
|
+
> = RetrieveAgentRequestModalities$inboundSchema;
|
|
2071
|
+
|
|
2072
|
+
/** @internal */
|
|
2073
|
+
export const RetrieveAgentRequestParameters$inboundSchema: z.ZodType<
|
|
2074
|
+
RetrieveAgentRequestParameters,
|
|
2075
|
+
z.ZodTypeDef,
|
|
2076
|
+
unknown
|
|
2077
|
+
> = z.object({
|
|
2078
|
+
audio: z.nullable(z.lazy(() => RetrieveAgentRequestAudio$inboundSchema))
|
|
2079
|
+
.optional(),
|
|
2080
|
+
frequency_penalty: z.nullable(z.number()).optional(),
|
|
2081
|
+
max_tokens: z.nullable(z.number().int()).optional(),
|
|
2082
|
+
max_completion_tokens: z.nullable(z.number().int()).optional(),
|
|
2083
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
2084
|
+
top_logprobs: z.nullable(z.number().int()).optional(),
|
|
2085
|
+
n: z.nullable(z.number().int()).optional(),
|
|
2086
|
+
presence_penalty: z.nullable(z.number()).optional(),
|
|
2087
|
+
response_format: z.union([
|
|
2088
|
+
z.lazy(() =>
|
|
2089
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
|
|
2090
|
+
),
|
|
2091
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
|
|
2092
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
|
|
2093
|
+
]).optional(),
|
|
2094
|
+
reasoning_effort: z.string().optional(),
|
|
2095
|
+
verbosity: z.string().optional(),
|
|
2096
|
+
seed: z.nullable(z.number()).optional(),
|
|
2097
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
2098
|
+
stream_options: z.nullable(
|
|
2099
|
+
z.lazy(() => RetrieveAgentRequestStreamOptions$inboundSchema),
|
|
2100
|
+
).optional(),
|
|
2101
|
+
thinking: z.lazy(() => RetrieveAgentRequestThinking$inboundSchema).optional(),
|
|
2102
|
+
temperature: z.nullable(z.number()).optional(),
|
|
2103
|
+
top_p: z.nullable(z.number()).optional(),
|
|
2104
|
+
top_k: z.nullable(z.number()).optional(),
|
|
2105
|
+
tool_choice: z.union([
|
|
2106
|
+
z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
|
|
2107
|
+
RetrieveAgentRequestToolChoice1$inboundSchema,
|
|
2108
|
+
]).optional(),
|
|
2109
|
+
parallel_tool_calls: z.boolean().optional(),
|
|
2110
|
+
modalities: z.nullable(z.array(RetrieveAgentRequestModalities$inboundSchema))
|
|
2111
|
+
.optional(),
|
|
2112
|
+
}).transform((v) => {
|
|
2113
|
+
return remap$(v, {
|
|
2114
|
+
"frequency_penalty": "frequencyPenalty",
|
|
2115
|
+
"max_tokens": "maxTokens",
|
|
2116
|
+
"max_completion_tokens": "maxCompletionTokens",
|
|
2117
|
+
"top_logprobs": "topLogprobs",
|
|
2118
|
+
"presence_penalty": "presencePenalty",
|
|
2119
|
+
"response_format": "responseFormat",
|
|
2120
|
+
"reasoning_effort": "reasoningEffort",
|
|
2121
|
+
"stream_options": "streamOptions",
|
|
2122
|
+
"top_p": "topP",
|
|
2123
|
+
"top_k": "topK",
|
|
2124
|
+
"tool_choice": "toolChoice",
|
|
2125
|
+
"parallel_tool_calls": "parallelToolCalls",
|
|
2126
|
+
});
|
|
2127
|
+
});
|
|
2128
|
+
/** @internal */
|
|
2129
|
+
export type RetrieveAgentRequestParameters$Outbound = {
|
|
2130
|
+
audio?: RetrieveAgentRequestAudio$Outbound | null | undefined;
|
|
2131
|
+
frequency_penalty?: number | null | undefined;
|
|
2132
|
+
max_tokens?: number | null | undefined;
|
|
2133
|
+
max_completion_tokens?: number | null | undefined;
|
|
2134
|
+
logprobs?: boolean | null | undefined;
|
|
2135
|
+
top_logprobs?: number | null | undefined;
|
|
2136
|
+
n?: number | null | undefined;
|
|
2137
|
+
presence_penalty?: number | null | undefined;
|
|
2138
|
+
response_format?:
|
|
2139
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONSchema$Outbound
|
|
2140
|
+
| RetrieveAgentRequestResponseFormatText$Outbound
|
|
2141
|
+
| RetrieveAgentRequestResponseFormatJSONObject$Outbound
|
|
2142
|
+
| undefined;
|
|
2143
|
+
reasoning_effort?: string | undefined;
|
|
2144
|
+
verbosity?: string | undefined;
|
|
2145
|
+
seed?: number | null | undefined;
|
|
2146
|
+
stop?: string | Array<string> | null | undefined;
|
|
2147
|
+
stream_options?:
|
|
2148
|
+
| RetrieveAgentRequestStreamOptions$Outbound
|
|
2149
|
+
| null
|
|
2150
|
+
| undefined;
|
|
2151
|
+
thinking?: RetrieveAgentRequestThinking$Outbound | undefined;
|
|
2152
|
+
temperature?: number | null | undefined;
|
|
2153
|
+
top_p?: number | null | undefined;
|
|
2154
|
+
top_k?: number | null | undefined;
|
|
2155
|
+
tool_choice?: RetrieveAgentRequestToolChoice2$Outbound | string | undefined;
|
|
2156
|
+
parallel_tool_calls?: boolean | undefined;
|
|
2157
|
+
modalities?: Array<string> | null | undefined;
|
|
2158
|
+
};
|
|
2159
|
+
|
|
2160
|
+
/** @internal */
|
|
2161
|
+
export const RetrieveAgentRequestParameters$outboundSchema: z.ZodType<
|
|
2162
|
+
RetrieveAgentRequestParameters$Outbound,
|
|
2163
|
+
z.ZodTypeDef,
|
|
2164
|
+
RetrieveAgentRequestParameters
|
|
2165
|
+
> = z.object({
|
|
2166
|
+
audio: z.nullable(z.lazy(() => RetrieveAgentRequestAudio$outboundSchema))
|
|
2167
|
+
.optional(),
|
|
2168
|
+
frequencyPenalty: z.nullable(z.number()).optional(),
|
|
2169
|
+
maxTokens: z.nullable(z.number().int()).optional(),
|
|
2170
|
+
maxCompletionTokens: z.nullable(z.number().int()).optional(),
|
|
2171
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
2172
|
+
topLogprobs: z.nullable(z.number().int()).optional(),
|
|
2173
|
+
n: z.nullable(z.number().int()).optional(),
|
|
2174
|
+
presencePenalty: z.nullable(z.number()).optional(),
|
|
2175
|
+
responseFormat: z.union([
|
|
2176
|
+
z.lazy(() =>
|
|
2177
|
+
RetrieveAgentRequestResponseFormatAgentsJSONSchema$outboundSchema
|
|
2178
|
+
),
|
|
2179
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatText$outboundSchema),
|
|
2180
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$outboundSchema),
|
|
2181
|
+
]).optional(),
|
|
2182
|
+
reasoningEffort: z.string().optional(),
|
|
2183
|
+
verbosity: z.string().optional(),
|
|
2184
|
+
seed: z.nullable(z.number()).optional(),
|
|
2185
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
2186
|
+
streamOptions: z.nullable(
|
|
2187
|
+
z.lazy(() => RetrieveAgentRequestStreamOptions$outboundSchema),
|
|
2188
|
+
).optional(),
|
|
2189
|
+
thinking: z.lazy(() => RetrieveAgentRequestThinking$outboundSchema)
|
|
2190
|
+
.optional(),
|
|
2191
|
+
temperature: z.nullable(z.number()).optional(),
|
|
2192
|
+
topP: z.nullable(z.number()).optional(),
|
|
2193
|
+
topK: z.nullable(z.number()).optional(),
|
|
2194
|
+
toolChoice: z.union([
|
|
2195
|
+
z.lazy(() => RetrieveAgentRequestToolChoice2$outboundSchema),
|
|
2196
|
+
RetrieveAgentRequestToolChoice1$outboundSchema,
|
|
2197
|
+
]).optional(),
|
|
2198
|
+
parallelToolCalls: z.boolean().optional(),
|
|
2199
|
+
modalities: z.nullable(z.array(RetrieveAgentRequestModalities$outboundSchema))
|
|
2200
|
+
.optional(),
|
|
2201
|
+
}).transform((v) => {
|
|
2202
|
+
return remap$(v, {
|
|
2203
|
+
frequencyPenalty: "frequency_penalty",
|
|
2204
|
+
maxTokens: "max_tokens",
|
|
2205
|
+
maxCompletionTokens: "max_completion_tokens",
|
|
2206
|
+
topLogprobs: "top_logprobs",
|
|
2207
|
+
presencePenalty: "presence_penalty",
|
|
2208
|
+
responseFormat: "response_format",
|
|
2209
|
+
reasoningEffort: "reasoning_effort",
|
|
2210
|
+
streamOptions: "stream_options",
|
|
2211
|
+
topP: "top_p",
|
|
2212
|
+
topK: "top_k",
|
|
2213
|
+
toolChoice: "tool_choice",
|
|
2214
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
2215
|
+
});
|
|
2216
|
+
});
|
|
2217
|
+
|
|
2218
|
+
export function retrieveAgentRequestParametersToJSON(
|
|
2219
|
+
retrieveAgentRequestParameters: RetrieveAgentRequestParameters,
|
|
2220
|
+
): string {
|
|
2221
|
+
return JSON.stringify(
|
|
2222
|
+
RetrieveAgentRequestParameters$outboundSchema.parse(
|
|
2223
|
+
retrieveAgentRequestParameters,
|
|
2224
|
+
),
|
|
2225
|
+
);
|
|
2226
|
+
}
|
|
2227
|
+
export function retrieveAgentRequestParametersFromJSON(
|
|
2228
|
+
jsonString: string,
|
|
2229
|
+
): SafeParseResult<RetrieveAgentRequestParameters, SDKValidationError> {
|
|
2230
|
+
return safeParse(
|
|
2231
|
+
jsonString,
|
|
2232
|
+
(x) => RetrieveAgentRequestParameters$inboundSchema.parse(JSON.parse(x)),
|
|
2233
|
+
`Failed to parse 'RetrieveAgentRequestParameters' from JSON`,
|
|
2234
|
+
);
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
/** @internal */
|
|
2238
|
+
export const RetrieveAgentRequestRetry$inboundSchema: z.ZodType<
|
|
2239
|
+
RetrieveAgentRequestRetry,
|
|
2240
|
+
z.ZodTypeDef,
|
|
2241
|
+
unknown
|
|
2242
|
+
> = z.object({
|
|
2243
|
+
count: z.number().default(3),
|
|
2244
|
+
on_codes: z.array(z.number()).optional(),
|
|
2245
|
+
}).transform((v) => {
|
|
2246
|
+
return remap$(v, {
|
|
2247
|
+
"on_codes": "onCodes",
|
|
2248
|
+
});
|
|
2249
|
+
});
|
|
2250
|
+
/** @internal */
|
|
2251
|
+
export type RetrieveAgentRequestRetry$Outbound = {
|
|
2252
|
+
count: number;
|
|
2253
|
+
on_codes?: Array<number> | undefined;
|
|
2254
|
+
};
|
|
2255
|
+
|
|
2256
|
+
/** @internal */
|
|
2257
|
+
export const RetrieveAgentRequestRetry$outboundSchema: z.ZodType<
|
|
2258
|
+
RetrieveAgentRequestRetry$Outbound,
|
|
2259
|
+
z.ZodTypeDef,
|
|
2260
|
+
RetrieveAgentRequestRetry
|
|
2261
|
+
> = z.object({
|
|
2262
|
+
count: z.number().default(3),
|
|
2263
|
+
onCodes: z.array(z.number()).optional(),
|
|
2264
|
+
}).transform((v) => {
|
|
2265
|
+
return remap$(v, {
|
|
2266
|
+
onCodes: "on_codes",
|
|
2267
|
+
});
|
|
2268
|
+
});
|
|
2269
|
+
|
|
2270
|
+
export function retrieveAgentRequestRetryToJSON(
|
|
2271
|
+
retrieveAgentRequestRetry: RetrieveAgentRequestRetry,
|
|
2272
|
+
): string {
|
|
2273
|
+
return JSON.stringify(
|
|
2274
|
+
RetrieveAgentRequestRetry$outboundSchema.parse(retrieveAgentRequestRetry),
|
|
2275
|
+
);
|
|
2276
|
+
}
|
|
2277
|
+
export function retrieveAgentRequestRetryFromJSON(
|
|
2278
|
+
jsonString: string,
|
|
2279
|
+
): SafeParseResult<RetrieveAgentRequestRetry, SDKValidationError> {
|
|
2280
|
+
return safeParse(
|
|
2281
|
+
jsonString,
|
|
2282
|
+
(x) => RetrieveAgentRequestRetry$inboundSchema.parse(JSON.parse(x)),
|
|
2283
|
+
`Failed to parse 'RetrieveAgentRequestRetry' from JSON`,
|
|
2284
|
+
);
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
/** @internal */
|
|
2288
|
+
export const RetrieveAgentRequestFallbackModelConfigurationVoice$inboundSchema:
|
|
2289
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationVoice> =
|
|
2290
|
+
z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationVoice);
|
|
2291
|
+
/** @internal */
|
|
2292
|
+
export const RetrieveAgentRequestFallbackModelConfigurationVoice$outboundSchema:
|
|
2293
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationVoice> =
|
|
2294
|
+
RetrieveAgentRequestFallbackModelConfigurationVoice$inboundSchema;
|
|
2295
|
+
|
|
2296
|
+
/** @internal */
|
|
2297
|
+
export const RetrieveAgentRequestFallbackModelConfigurationFormat$inboundSchema:
|
|
2298
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationFormat> =
|
|
2299
|
+
z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationFormat);
|
|
2300
|
+
/** @internal */
|
|
2301
|
+
export const RetrieveAgentRequestFallbackModelConfigurationFormat$outboundSchema:
|
|
2302
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationFormat> =
|
|
2303
|
+
RetrieveAgentRequestFallbackModelConfigurationFormat$inboundSchema;
|
|
2304
|
+
|
|
2305
|
+
/** @internal */
|
|
2306
|
+
export const RetrieveAgentRequestFallbackModelConfigurationAudio$inboundSchema:
|
|
2307
|
+
z.ZodType<
|
|
2308
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio,
|
|
2309
|
+
z.ZodTypeDef,
|
|
2310
|
+
unknown
|
|
2311
|
+
> = z.object({
|
|
2312
|
+
voice: RetrieveAgentRequestFallbackModelConfigurationVoice$inboundSchema,
|
|
2313
|
+
format: RetrieveAgentRequestFallbackModelConfigurationFormat$inboundSchema,
|
|
2314
|
+
});
|
|
2315
|
+
/** @internal */
|
|
2316
|
+
export type RetrieveAgentRequestFallbackModelConfigurationAudio$Outbound = {
|
|
2317
|
+
voice: string;
|
|
2318
|
+
format: string;
|
|
2319
|
+
};
|
|
2320
|
+
|
|
2321
|
+
/** @internal */
|
|
2322
|
+
export const RetrieveAgentRequestFallbackModelConfigurationAudio$outboundSchema:
|
|
2323
|
+
z.ZodType<
|
|
2324
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio$Outbound,
|
|
2325
|
+
z.ZodTypeDef,
|
|
2326
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio
|
|
2327
|
+
> = z.object({
|
|
2328
|
+
voice: RetrieveAgentRequestFallbackModelConfigurationVoice$outboundSchema,
|
|
2329
|
+
format: RetrieveAgentRequestFallbackModelConfigurationFormat$outboundSchema,
|
|
2330
|
+
});
|
|
2331
|
+
|
|
2332
|
+
export function retrieveAgentRequestFallbackModelConfigurationAudioToJSON(
|
|
2333
|
+
retrieveAgentRequestFallbackModelConfigurationAudio:
|
|
2334
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio,
|
|
2335
|
+
): string {
|
|
2336
|
+
return JSON.stringify(
|
|
2337
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio$outboundSchema.parse(
|
|
2338
|
+
retrieveAgentRequestFallbackModelConfigurationAudio,
|
|
2339
|
+
),
|
|
2340
|
+
);
|
|
2341
|
+
}
|
|
2342
|
+
export function retrieveAgentRequestFallbackModelConfigurationAudioFromJSON(
|
|
2343
|
+
jsonString: string,
|
|
2344
|
+
): SafeParseResult<
|
|
2345
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio,
|
|
2346
|
+
SDKValidationError
|
|
2347
|
+
> {
|
|
2348
|
+
return safeParse(
|
|
2349
|
+
jsonString,
|
|
2350
|
+
(x) =>
|
|
2351
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio$inboundSchema.parse(
|
|
2352
|
+
JSON.parse(x),
|
|
2353
|
+
),
|
|
2354
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationAudio' from JSON`,
|
|
2355
|
+
);
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
/** @internal */
|
|
2359
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema:
|
|
2360
|
+
z.ZodNativeEnum<
|
|
2361
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType
|
|
2362
|
+
> = z.nativeEnum(
|
|
2363
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType,
|
|
2364
|
+
);
|
|
2365
|
+
/** @internal */
|
|
2366
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema:
|
|
2367
|
+
z.ZodNativeEnum<
|
|
2368
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType
|
|
2369
|
+
> =
|
|
2370
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema;
|
|
2371
|
+
|
|
2372
|
+
/** @internal */
|
|
2373
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema:
|
|
2374
|
+
z.ZodType<
|
|
2375
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema,
|
|
2376
|
+
z.ZodTypeDef,
|
|
2377
|
+
unknown
|
|
2378
|
+
> = z.object({
|
|
2379
|
+
description: z.string().optional(),
|
|
2380
|
+
name: z.string(),
|
|
2381
|
+
schema: z.any().optional(),
|
|
2382
|
+
strict: z.boolean().default(false),
|
|
2383
|
+
});
|
|
2384
|
+
/** @internal */
|
|
2385
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$Outbound =
|
|
2386
|
+
{
|
|
2387
|
+
description?: string | undefined;
|
|
2388
|
+
name: string;
|
|
2389
|
+
schema?: any | undefined;
|
|
2390
|
+
strict: boolean;
|
|
2391
|
+
};
|
|
2392
|
+
|
|
2393
|
+
/** @internal */
|
|
2394
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$outboundSchema:
|
|
2395
|
+
z.ZodType<
|
|
2396
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$Outbound,
|
|
2397
|
+
z.ZodTypeDef,
|
|
2398
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema
|
|
2399
|
+
> = z.object({
|
|
2400
|
+
description: z.string().optional(),
|
|
2401
|
+
name: z.string(),
|
|
2402
|
+
schema: z.any().optional(),
|
|
2403
|
+
strict: z.boolean().default(false),
|
|
2404
|
+
});
|
|
2405
|
+
|
|
2406
|
+
export function retrieveAgentRequestResponseFormatAgentsResponseJsonSchemaToJSON(
|
|
2407
|
+
retrieveAgentRequestResponseFormatAgentsResponseJsonSchema:
|
|
2408
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema,
|
|
2409
|
+
): string {
|
|
2410
|
+
return JSON.stringify(
|
|
2411
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$outboundSchema
|
|
2412
|
+
.parse(retrieveAgentRequestResponseFormatAgentsResponseJsonSchema),
|
|
2413
|
+
);
|
|
2414
|
+
}
|
|
2415
|
+
export function retrieveAgentRequestResponseFormatAgentsResponseJsonSchemaFromJSON(
|
|
2416
|
+
jsonString: string,
|
|
2417
|
+
): SafeParseResult<
|
|
2418
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema,
|
|
2419
|
+
SDKValidationError
|
|
2420
|
+
> {
|
|
2421
|
+
return safeParse(
|
|
2422
|
+
jsonString,
|
|
2423
|
+
(x) =>
|
|
2424
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema
|
|
2425
|
+
.parse(JSON.parse(x)),
|
|
2426
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema' from JSON`,
|
|
2427
|
+
);
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
/** @internal */
|
|
2431
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema:
|
|
2432
|
+
z.ZodType<
|
|
2433
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema,
|
|
2434
|
+
z.ZodTypeDef,
|
|
2435
|
+
unknown
|
|
2436
|
+
> = z.object({
|
|
2437
|
+
type:
|
|
2438
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema,
|
|
2439
|
+
json_schema: z.lazy(() =>
|
|
2440
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema
|
|
2441
|
+
),
|
|
2442
|
+
}).transform((v) => {
|
|
2443
|
+
return remap$(v, {
|
|
2444
|
+
"json_schema": "jsonSchema",
|
|
2445
|
+
});
|
|
2446
|
+
});
|
|
2447
|
+
/** @internal */
|
|
2448
|
+
export type RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$Outbound =
|
|
2449
|
+
{
|
|
2450
|
+
type: string;
|
|
2451
|
+
json_schema:
|
|
2452
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$Outbound;
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
/** @internal */
|
|
2456
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$outboundSchema:
|
|
2457
|
+
z.ZodType<
|
|
2458
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$Outbound,
|
|
2459
|
+
z.ZodTypeDef,
|
|
2460
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema
|
|
2461
|
+
> = z.object({
|
|
2462
|
+
type:
|
|
2463
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema,
|
|
2464
|
+
jsonSchema: z.lazy(() =>
|
|
2465
|
+
RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$outboundSchema
|
|
2466
|
+
),
|
|
2467
|
+
}).transform((v) => {
|
|
2468
|
+
return remap$(v, {
|
|
2469
|
+
jsonSchema: "json_schema",
|
|
2470
|
+
});
|
|
2471
|
+
});
|
|
2472
|
+
|
|
2473
|
+
export function retrieveAgentRequestResponseFormatAgentsResponse200JSONSchemaToJSON(
|
|
2474
|
+
retrieveAgentRequestResponseFormatAgentsResponse200JSONSchema:
|
|
2475
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema,
|
|
2476
|
+
): string {
|
|
2477
|
+
return JSON.stringify(
|
|
2478
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$outboundSchema
|
|
2479
|
+
.parse(retrieveAgentRequestResponseFormatAgentsResponse200JSONSchema),
|
|
2480
|
+
);
|
|
2481
|
+
}
|
|
2482
|
+
export function retrieveAgentRequestResponseFormatAgentsResponse200JSONSchemaFromJSON(
|
|
2483
|
+
jsonString: string,
|
|
2484
|
+
): SafeParseResult<
|
|
2485
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema,
|
|
2486
|
+
SDKValidationError
|
|
2487
|
+
> {
|
|
2488
|
+
return safeParse(
|
|
2489
|
+
jsonString,
|
|
2490
|
+
(x) =>
|
|
2491
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema
|
|
2492
|
+
.parse(JSON.parse(x)),
|
|
2493
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema' from JSON`,
|
|
2494
|
+
);
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
/** @internal */
|
|
2498
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema:
|
|
2499
|
+
z.ZodNativeEnum<
|
|
2500
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType
|
|
2501
|
+
> = z.nativeEnum(
|
|
2502
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType,
|
|
2503
|
+
);
|
|
2504
|
+
/** @internal */
|
|
2505
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema:
|
|
2506
|
+
z.ZodNativeEnum<
|
|
2507
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType
|
|
2508
|
+
> =
|
|
2509
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema;
|
|
2510
|
+
|
|
2511
|
+
/** @internal */
|
|
2512
|
+
export const RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema:
|
|
2513
|
+
z.ZodType<
|
|
2514
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject,
|
|
2515
|
+
z.ZodTypeDef,
|
|
2516
|
+
unknown
|
|
2517
|
+
> = z.object({
|
|
2518
|
+
type:
|
|
2519
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema,
|
|
2520
|
+
});
|
|
2521
|
+
/** @internal */
|
|
2522
|
+
export type RetrieveAgentRequestResponseFormatAgentsJSONObject$Outbound = {
|
|
2523
|
+
type: string;
|
|
2524
|
+
};
|
|
2525
|
+
|
|
2526
|
+
/** @internal */
|
|
2527
|
+
export const RetrieveAgentRequestResponseFormatAgentsJSONObject$outboundSchema:
|
|
2528
|
+
z.ZodType<
|
|
2529
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject$Outbound,
|
|
2530
|
+
z.ZodTypeDef,
|
|
2531
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject
|
|
2532
|
+
> = z.object({
|
|
2533
|
+
type:
|
|
2534
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema,
|
|
2535
|
+
});
|
|
2536
|
+
|
|
2537
|
+
export function retrieveAgentRequestResponseFormatAgentsJSONObjectToJSON(
|
|
2538
|
+
retrieveAgentRequestResponseFormatAgentsJSONObject:
|
|
2539
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject,
|
|
2540
|
+
): string {
|
|
2541
|
+
return JSON.stringify(
|
|
2542
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject$outboundSchema.parse(
|
|
2543
|
+
retrieveAgentRequestResponseFormatAgentsJSONObject,
|
|
2544
|
+
),
|
|
2545
|
+
);
|
|
2546
|
+
}
|
|
2547
|
+
export function retrieveAgentRequestResponseFormatAgentsJSONObjectFromJSON(
|
|
2548
|
+
jsonString: string,
|
|
2549
|
+
): SafeParseResult<
|
|
2550
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject,
|
|
2551
|
+
SDKValidationError
|
|
2552
|
+
> {
|
|
2553
|
+
return safeParse(
|
|
2554
|
+
jsonString,
|
|
2555
|
+
(x) =>
|
|
2556
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema.parse(
|
|
2557
|
+
JSON.parse(x),
|
|
2558
|
+
),
|
|
2559
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatAgentsJSONObject' from JSON`,
|
|
2560
|
+
);
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
/** @internal */
|
|
2564
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200Type$inboundSchema:
|
|
2565
|
+
z.ZodNativeEnum<
|
|
2566
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200Type
|
|
2567
|
+
> = z.nativeEnum(RetrieveAgentRequestResponseFormatAgentsResponse200Type);
|
|
2568
|
+
/** @internal */
|
|
2569
|
+
export const RetrieveAgentRequestResponseFormatAgentsResponse200Type$outboundSchema:
|
|
2570
|
+
z.ZodNativeEnum<
|
|
2571
|
+
typeof RetrieveAgentRequestResponseFormatAgentsResponse200Type
|
|
2572
|
+
> = RetrieveAgentRequestResponseFormatAgentsResponse200Type$inboundSchema;
|
|
2573
|
+
|
|
2574
|
+
/** @internal */
|
|
2575
|
+
export const RetrieveAgentRequestResponseFormatAgentsText$inboundSchema:
|
|
2576
|
+
z.ZodType<
|
|
2577
|
+
RetrieveAgentRequestResponseFormatAgentsText,
|
|
2578
|
+
z.ZodTypeDef,
|
|
2579
|
+
unknown
|
|
2580
|
+
> = z.object({
|
|
2581
|
+
type: RetrieveAgentRequestResponseFormatAgentsResponse200Type$inboundSchema,
|
|
2582
|
+
});
|
|
2583
|
+
/** @internal */
|
|
2584
|
+
export type RetrieveAgentRequestResponseFormatAgentsText$Outbound = {
|
|
2585
|
+
type: string;
|
|
2586
|
+
};
|
|
2587
|
+
|
|
2588
|
+
/** @internal */
|
|
2589
|
+
export const RetrieveAgentRequestResponseFormatAgentsText$outboundSchema:
|
|
2590
|
+
z.ZodType<
|
|
2591
|
+
RetrieveAgentRequestResponseFormatAgentsText$Outbound,
|
|
2592
|
+
z.ZodTypeDef,
|
|
2593
|
+
RetrieveAgentRequestResponseFormatAgentsText
|
|
2594
|
+
> = z.object({
|
|
2595
|
+
type:
|
|
2596
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200Type$outboundSchema,
|
|
2597
|
+
});
|
|
2598
|
+
|
|
2599
|
+
export function retrieveAgentRequestResponseFormatAgentsTextToJSON(
|
|
2600
|
+
retrieveAgentRequestResponseFormatAgentsText:
|
|
2601
|
+
RetrieveAgentRequestResponseFormatAgentsText,
|
|
2602
|
+
): string {
|
|
2603
|
+
return JSON.stringify(
|
|
2604
|
+
RetrieveAgentRequestResponseFormatAgentsText$outboundSchema.parse(
|
|
2605
|
+
retrieveAgentRequestResponseFormatAgentsText,
|
|
2606
|
+
),
|
|
2607
|
+
);
|
|
2608
|
+
}
|
|
2609
|
+
export function retrieveAgentRequestResponseFormatAgentsTextFromJSON(
|
|
2610
|
+
jsonString: string,
|
|
2611
|
+
): SafeParseResult<
|
|
2612
|
+
RetrieveAgentRequestResponseFormatAgentsText,
|
|
2613
|
+
SDKValidationError
|
|
2614
|
+
> {
|
|
2615
|
+
return safeParse(
|
|
2616
|
+
jsonString,
|
|
2617
|
+
(x) =>
|
|
2618
|
+
RetrieveAgentRequestResponseFormatAgentsText$inboundSchema.parse(
|
|
2619
|
+
JSON.parse(x),
|
|
2620
|
+
),
|
|
2621
|
+
`Failed to parse 'RetrieveAgentRequestResponseFormatAgentsText' from JSON`,
|
|
2622
|
+
);
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
/** @internal */
|
|
2626
|
+
export const RetrieveAgentRequestFallbackModelConfigurationResponseFormat$inboundSchema:
|
|
2627
|
+
z.ZodType<
|
|
2628
|
+
RetrieveAgentRequestFallbackModelConfigurationResponseFormat,
|
|
2629
|
+
z.ZodTypeDef,
|
|
2630
|
+
unknown
|
|
2631
|
+
> = z.union([
|
|
2632
|
+
z.lazy(() =>
|
|
2633
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema
|
|
2634
|
+
),
|
|
2635
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatAgentsText$inboundSchema),
|
|
2636
|
+
z.lazy(() =>
|
|
2637
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema
|
|
2638
|
+
),
|
|
2639
|
+
]);
|
|
2640
|
+
/** @internal */
|
|
2641
|
+
export type RetrieveAgentRequestFallbackModelConfigurationResponseFormat$Outbound =
|
|
2642
|
+
| RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$Outbound
|
|
2643
|
+
| RetrieveAgentRequestResponseFormatAgentsText$Outbound
|
|
2644
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONObject$Outbound;
|
|
2645
|
+
|
|
2646
|
+
/** @internal */
|
|
2647
|
+
export const RetrieveAgentRequestFallbackModelConfigurationResponseFormat$outboundSchema:
|
|
2648
|
+
z.ZodType<
|
|
2649
|
+
RetrieveAgentRequestFallbackModelConfigurationResponseFormat$Outbound,
|
|
2650
|
+
z.ZodTypeDef,
|
|
2651
|
+
RetrieveAgentRequestFallbackModelConfigurationResponseFormat
|
|
2652
|
+
> = z.union([
|
|
2653
|
+
z.lazy(() =>
|
|
2654
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$outboundSchema
|
|
2655
|
+
),
|
|
2656
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatAgentsText$outboundSchema),
|
|
2657
|
+
z.lazy(() =>
|
|
2658
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject$outboundSchema
|
|
2659
|
+
),
|
|
2660
|
+
]);
|
|
2661
|
+
|
|
2662
|
+
export function retrieveAgentRequestFallbackModelConfigurationResponseFormatToJSON(
|
|
2663
|
+
retrieveAgentRequestFallbackModelConfigurationResponseFormat:
|
|
2664
|
+
RetrieveAgentRequestFallbackModelConfigurationResponseFormat,
|
|
2665
|
+
): string {
|
|
2666
|
+
return JSON.stringify(
|
|
2667
|
+
RetrieveAgentRequestFallbackModelConfigurationResponseFormat$outboundSchema
|
|
2668
|
+
.parse(retrieveAgentRequestFallbackModelConfigurationResponseFormat),
|
|
2669
|
+
);
|
|
2670
|
+
}
|
|
2671
|
+
export function retrieveAgentRequestFallbackModelConfigurationResponseFormatFromJSON(
|
|
2672
|
+
jsonString: string,
|
|
2673
|
+
): SafeParseResult<
|
|
2674
|
+
RetrieveAgentRequestFallbackModelConfigurationResponseFormat,
|
|
2675
|
+
SDKValidationError
|
|
2676
|
+
> {
|
|
2677
|
+
return safeParse(
|
|
2678
|
+
jsonString,
|
|
2679
|
+
(x) =>
|
|
2680
|
+
RetrieveAgentRequestFallbackModelConfigurationResponseFormat$inboundSchema
|
|
2681
|
+
.parse(JSON.parse(x)),
|
|
2682
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationResponseFormat' from JSON`,
|
|
2683
|
+
);
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
/** @internal */
|
|
2687
|
+
export const RetrieveAgentRequestFallbackModelConfigurationStop$inboundSchema:
|
|
2688
|
+
z.ZodType<
|
|
2689
|
+
RetrieveAgentRequestFallbackModelConfigurationStop,
|
|
2690
|
+
z.ZodTypeDef,
|
|
2691
|
+
unknown
|
|
2692
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
2693
|
+
/** @internal */
|
|
2694
|
+
export type RetrieveAgentRequestFallbackModelConfigurationStop$Outbound =
|
|
2695
|
+
| string
|
|
2696
|
+
| Array<string>;
|
|
2697
|
+
|
|
2698
|
+
/** @internal */
|
|
2699
|
+
export const RetrieveAgentRequestFallbackModelConfigurationStop$outboundSchema:
|
|
2700
|
+
z.ZodType<
|
|
2701
|
+
RetrieveAgentRequestFallbackModelConfigurationStop$Outbound,
|
|
2702
|
+
z.ZodTypeDef,
|
|
2703
|
+
RetrieveAgentRequestFallbackModelConfigurationStop
|
|
2704
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
2705
|
+
|
|
2706
|
+
export function retrieveAgentRequestFallbackModelConfigurationStopToJSON(
|
|
2707
|
+
retrieveAgentRequestFallbackModelConfigurationStop:
|
|
2708
|
+
RetrieveAgentRequestFallbackModelConfigurationStop,
|
|
2709
|
+
): string {
|
|
2710
|
+
return JSON.stringify(
|
|
2711
|
+
RetrieveAgentRequestFallbackModelConfigurationStop$outboundSchema.parse(
|
|
2712
|
+
retrieveAgentRequestFallbackModelConfigurationStop,
|
|
2713
|
+
),
|
|
2714
|
+
);
|
|
2715
|
+
}
|
|
2716
|
+
export function retrieveAgentRequestFallbackModelConfigurationStopFromJSON(
|
|
2717
|
+
jsonString: string,
|
|
2718
|
+
): SafeParseResult<
|
|
2719
|
+
RetrieveAgentRequestFallbackModelConfigurationStop,
|
|
2720
|
+
SDKValidationError
|
|
2721
|
+
> {
|
|
2722
|
+
return safeParse(
|
|
2723
|
+
jsonString,
|
|
2724
|
+
(x) =>
|
|
2725
|
+
RetrieveAgentRequestFallbackModelConfigurationStop$inboundSchema.parse(
|
|
2726
|
+
JSON.parse(x),
|
|
2727
|
+
),
|
|
2728
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationStop' from JSON`,
|
|
2729
|
+
);
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
/** @internal */
|
|
2733
|
+
export const RetrieveAgentRequestFallbackModelConfigurationStreamOptions$inboundSchema:
|
|
2734
|
+
z.ZodType<
|
|
2735
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions,
|
|
2736
|
+
z.ZodTypeDef,
|
|
2737
|
+
unknown
|
|
2738
|
+
> = z.object({
|
|
2739
|
+
include_usage: z.boolean().optional(),
|
|
2740
|
+
}).transform((v) => {
|
|
2741
|
+
return remap$(v, {
|
|
2742
|
+
"include_usage": "includeUsage",
|
|
2743
|
+
});
|
|
2744
|
+
});
|
|
2745
|
+
/** @internal */
|
|
2746
|
+
export type RetrieveAgentRequestFallbackModelConfigurationStreamOptions$Outbound =
|
|
2747
|
+
{
|
|
2748
|
+
include_usage?: boolean | undefined;
|
|
2749
|
+
};
|
|
2750
|
+
|
|
2751
|
+
/** @internal */
|
|
2752
|
+
export const RetrieveAgentRequestFallbackModelConfigurationStreamOptions$outboundSchema:
|
|
2753
|
+
z.ZodType<
|
|
2754
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions$Outbound,
|
|
2755
|
+
z.ZodTypeDef,
|
|
2756
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions
|
|
2757
|
+
> = z.object({
|
|
2758
|
+
includeUsage: z.boolean().optional(),
|
|
2759
|
+
}).transform((v) => {
|
|
2760
|
+
return remap$(v, {
|
|
2761
|
+
includeUsage: "include_usage",
|
|
2762
|
+
});
|
|
2763
|
+
});
|
|
2764
|
+
|
|
2765
|
+
export function retrieveAgentRequestFallbackModelConfigurationStreamOptionsToJSON(
|
|
2766
|
+
retrieveAgentRequestFallbackModelConfigurationStreamOptions:
|
|
2767
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions,
|
|
2768
|
+
): string {
|
|
2769
|
+
return JSON.stringify(
|
|
2770
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions$outboundSchema
|
|
2771
|
+
.parse(retrieveAgentRequestFallbackModelConfigurationStreamOptions),
|
|
2772
|
+
);
|
|
2773
|
+
}
|
|
2774
|
+
export function retrieveAgentRequestFallbackModelConfigurationStreamOptionsFromJSON(
|
|
2775
|
+
jsonString: string,
|
|
2776
|
+
): SafeParseResult<
|
|
2777
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions,
|
|
2778
|
+
SDKValidationError
|
|
2779
|
+
> {
|
|
2780
|
+
return safeParse(
|
|
2781
|
+
jsonString,
|
|
2782
|
+
(x) =>
|
|
2783
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions$inboundSchema
|
|
2784
|
+
.parse(JSON.parse(x)),
|
|
2785
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationStreamOptions' from JSON`,
|
|
2786
|
+
);
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
/** @internal */
|
|
2790
|
+
export const RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema:
|
|
2791
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationType> = z
|
|
2792
|
+
.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationType);
|
|
2793
|
+
/** @internal */
|
|
2794
|
+
export const RetrieveAgentRequestFallbackModelConfigurationType$outboundSchema:
|
|
2795
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationType> =
|
|
2796
|
+
RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema;
|
|
2797
|
+
|
|
2798
|
+
/** @internal */
|
|
2799
|
+
export const RetrieveAgentRequestFallbackModelConfigurationThinkingLevel$inboundSchema:
|
|
2800
|
+
z.ZodNativeEnum<
|
|
2801
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationThinkingLevel
|
|
2802
|
+
> = z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationThinkingLevel);
|
|
2803
|
+
/** @internal */
|
|
2804
|
+
export const RetrieveAgentRequestFallbackModelConfigurationThinkingLevel$outboundSchema:
|
|
2805
|
+
z.ZodNativeEnum<
|
|
2806
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationThinkingLevel
|
|
2807
|
+
> = RetrieveAgentRequestFallbackModelConfigurationThinkingLevel$inboundSchema;
|
|
2808
|
+
|
|
2809
|
+
/** @internal */
|
|
2810
|
+
export const RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema:
|
|
2811
|
+
z.ZodType<
|
|
2812
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking,
|
|
2813
|
+
z.ZodTypeDef,
|
|
2814
|
+
unknown
|
|
2815
|
+
> = z.object({
|
|
2816
|
+
type: RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema,
|
|
2817
|
+
budget_tokens: z.number(),
|
|
2818
|
+
thinking_level:
|
|
2819
|
+
RetrieveAgentRequestFallbackModelConfigurationThinkingLevel$inboundSchema
|
|
2820
|
+
.optional(),
|
|
2821
|
+
}).transform((v) => {
|
|
2822
|
+
return remap$(v, {
|
|
2823
|
+
"budget_tokens": "budgetTokens",
|
|
2824
|
+
"thinking_level": "thinkingLevel",
|
|
2825
|
+
});
|
|
2826
|
+
});
|
|
2827
|
+
/** @internal */
|
|
2828
|
+
export type RetrieveAgentRequestFallbackModelConfigurationThinking$Outbound = {
|
|
2829
|
+
type: string;
|
|
2830
|
+
budget_tokens: number;
|
|
2831
|
+
thinking_level?: string | undefined;
|
|
2832
|
+
};
|
|
2833
|
+
|
|
2834
|
+
/** @internal */
|
|
2835
|
+
export const RetrieveAgentRequestFallbackModelConfigurationThinking$outboundSchema:
|
|
2836
|
+
z.ZodType<
|
|
2837
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking$Outbound,
|
|
2838
|
+
z.ZodTypeDef,
|
|
2839
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking
|
|
2840
|
+
> = z.object({
|
|
2841
|
+
type: RetrieveAgentRequestFallbackModelConfigurationType$outboundSchema,
|
|
2842
|
+
budgetTokens: z.number(),
|
|
2843
|
+
thinkingLevel:
|
|
2844
|
+
RetrieveAgentRequestFallbackModelConfigurationThinkingLevel$outboundSchema
|
|
2845
|
+
.optional(),
|
|
2846
|
+
}).transform((v) => {
|
|
2847
|
+
return remap$(v, {
|
|
2848
|
+
budgetTokens: "budget_tokens",
|
|
2849
|
+
thinkingLevel: "thinking_level",
|
|
2850
|
+
});
|
|
2851
|
+
});
|
|
2852
|
+
|
|
2853
|
+
export function retrieveAgentRequestFallbackModelConfigurationThinkingToJSON(
|
|
2854
|
+
retrieveAgentRequestFallbackModelConfigurationThinking:
|
|
2855
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking,
|
|
2856
|
+
): string {
|
|
2857
|
+
return JSON.stringify(
|
|
2858
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking$outboundSchema.parse(
|
|
2859
|
+
retrieveAgentRequestFallbackModelConfigurationThinking,
|
|
2860
|
+
),
|
|
2861
|
+
);
|
|
2862
|
+
}
|
|
2863
|
+
export function retrieveAgentRequestFallbackModelConfigurationThinkingFromJSON(
|
|
2864
|
+
jsonString: string,
|
|
2865
|
+
): SafeParseResult<
|
|
2866
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking,
|
|
2867
|
+
SDKValidationError
|
|
2868
|
+
> {
|
|
2869
|
+
return safeParse(
|
|
2870
|
+
jsonString,
|
|
2871
|
+
(x) =>
|
|
2872
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema
|
|
2873
|
+
.parse(JSON.parse(x)),
|
|
2874
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationThinking' from JSON`,
|
|
2875
|
+
);
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
/** @internal */
|
|
2879
|
+
export const RetrieveAgentRequestToolChoiceAgentsType$inboundSchema:
|
|
2880
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestToolChoiceAgentsType> = z
|
|
2881
|
+
.nativeEnum(RetrieveAgentRequestToolChoiceAgentsType);
|
|
2882
|
+
/** @internal */
|
|
2883
|
+
export const RetrieveAgentRequestToolChoiceAgentsType$outboundSchema:
|
|
2884
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestToolChoiceAgentsType> =
|
|
2885
|
+
RetrieveAgentRequestToolChoiceAgentsType$inboundSchema;
|
|
2886
|
+
|
|
2887
|
+
/** @internal */
|
|
2888
|
+
export const RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema:
|
|
2889
|
+
z.ZodType<
|
|
2890
|
+
RetrieveAgentRequestToolChoiceAgentsFunction,
|
|
2891
|
+
z.ZodTypeDef,
|
|
2892
|
+
unknown
|
|
2893
|
+
> = z.object({
|
|
2894
|
+
name: z.string().optional(),
|
|
2895
|
+
});
|
|
2896
|
+
/** @internal */
|
|
2897
|
+
export type RetrieveAgentRequestToolChoiceAgentsFunction$Outbound = {
|
|
2898
|
+
name?: string | undefined;
|
|
2899
|
+
};
|
|
2900
|
+
|
|
2901
|
+
/** @internal */
|
|
2902
|
+
export const RetrieveAgentRequestToolChoiceAgentsFunction$outboundSchema:
|
|
2903
|
+
z.ZodType<
|
|
2904
|
+
RetrieveAgentRequestToolChoiceAgentsFunction$Outbound,
|
|
2905
|
+
z.ZodTypeDef,
|
|
2906
|
+
RetrieveAgentRequestToolChoiceAgentsFunction
|
|
2907
|
+
> = z.object({
|
|
2908
|
+
name: z.string().optional(),
|
|
2909
|
+
});
|
|
2910
|
+
|
|
2911
|
+
export function retrieveAgentRequestToolChoiceAgentsFunctionToJSON(
|
|
2912
|
+
retrieveAgentRequestToolChoiceAgentsFunction:
|
|
2913
|
+
RetrieveAgentRequestToolChoiceAgentsFunction,
|
|
2914
|
+
): string {
|
|
2915
|
+
return JSON.stringify(
|
|
2916
|
+
RetrieveAgentRequestToolChoiceAgentsFunction$outboundSchema.parse(
|
|
2917
|
+
retrieveAgentRequestToolChoiceAgentsFunction,
|
|
2918
|
+
),
|
|
2919
|
+
);
|
|
2920
|
+
}
|
|
2921
|
+
export function retrieveAgentRequestToolChoiceAgentsFunctionFromJSON(
|
|
2922
|
+
jsonString: string,
|
|
2923
|
+
): SafeParseResult<
|
|
2924
|
+
RetrieveAgentRequestToolChoiceAgentsFunction,
|
|
2925
|
+
SDKValidationError
|
|
2926
|
+
> {
|
|
2927
|
+
return safeParse(
|
|
2928
|
+
jsonString,
|
|
2929
|
+
(x) =>
|
|
2930
|
+
RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema.parse(
|
|
2931
|
+
JSON.parse(x),
|
|
2932
|
+
),
|
|
2933
|
+
`Failed to parse 'RetrieveAgentRequestToolChoiceAgentsFunction' from JSON`,
|
|
2934
|
+
);
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
/** @internal */
|
|
2938
|
+
export const RetrieveAgentRequestToolChoiceAgents2$inboundSchema: z.ZodType<
|
|
2939
|
+
RetrieveAgentRequestToolChoiceAgents2,
|
|
2940
|
+
z.ZodTypeDef,
|
|
2941
|
+
unknown
|
|
2942
|
+
> = z.object({
|
|
2943
|
+
type: RetrieveAgentRequestToolChoiceAgentsType$inboundSchema.optional(),
|
|
2944
|
+
function: z.lazy(() =>
|
|
2945
|
+
RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema
|
|
2946
|
+
),
|
|
2947
|
+
});
|
|
2948
|
+
/** @internal */
|
|
2949
|
+
export type RetrieveAgentRequestToolChoiceAgents2$Outbound = {
|
|
2950
|
+
type?: string | undefined;
|
|
2951
|
+
function: RetrieveAgentRequestToolChoiceAgentsFunction$Outbound;
|
|
2952
|
+
};
|
|
2953
|
+
|
|
2954
|
+
/** @internal */
|
|
2955
|
+
export const RetrieveAgentRequestToolChoiceAgents2$outboundSchema: z.ZodType<
|
|
2956
|
+
RetrieveAgentRequestToolChoiceAgents2$Outbound,
|
|
2957
|
+
z.ZodTypeDef,
|
|
2958
|
+
RetrieveAgentRequestToolChoiceAgents2
|
|
2959
|
+
> = z.object({
|
|
2960
|
+
type: RetrieveAgentRequestToolChoiceAgentsType$outboundSchema.optional(),
|
|
2961
|
+
function: z.lazy(() =>
|
|
2962
|
+
RetrieveAgentRequestToolChoiceAgentsFunction$outboundSchema
|
|
2963
|
+
),
|
|
2964
|
+
});
|
|
2965
|
+
|
|
2966
|
+
export function retrieveAgentRequestToolChoiceAgents2ToJSON(
|
|
2967
|
+
retrieveAgentRequestToolChoiceAgents2: RetrieveAgentRequestToolChoiceAgents2,
|
|
2968
|
+
): string {
|
|
2969
|
+
return JSON.stringify(
|
|
2970
|
+
RetrieveAgentRequestToolChoiceAgents2$outboundSchema.parse(
|
|
2971
|
+
retrieveAgentRequestToolChoiceAgents2,
|
|
2972
|
+
),
|
|
2973
|
+
);
|
|
2974
|
+
}
|
|
2975
|
+
export function retrieveAgentRequestToolChoiceAgents2FromJSON(
|
|
2976
|
+
jsonString: string,
|
|
2977
|
+
): SafeParseResult<RetrieveAgentRequestToolChoiceAgents2, SDKValidationError> {
|
|
2978
|
+
return safeParse(
|
|
2979
|
+
jsonString,
|
|
2980
|
+
(x) =>
|
|
2981
|
+
RetrieveAgentRequestToolChoiceAgents2$inboundSchema.parse(JSON.parse(x)),
|
|
2982
|
+
`Failed to parse 'RetrieveAgentRequestToolChoiceAgents2' from JSON`,
|
|
2983
|
+
);
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
/** @internal */
|
|
2987
|
+
export const RetrieveAgentRequestToolChoiceAgents1$inboundSchema:
|
|
2988
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestToolChoiceAgents1> = z.nativeEnum(
|
|
2989
|
+
RetrieveAgentRequestToolChoiceAgents1,
|
|
2990
|
+
);
|
|
2991
|
+
/** @internal */
|
|
2992
|
+
export const RetrieveAgentRequestToolChoiceAgents1$outboundSchema:
|
|
2993
|
+
z.ZodNativeEnum<typeof RetrieveAgentRequestToolChoiceAgents1> =
|
|
2994
|
+
RetrieveAgentRequestToolChoiceAgents1$inboundSchema;
|
|
2995
|
+
|
|
2996
|
+
/** @internal */
|
|
2997
|
+
export const RetrieveAgentRequestFallbackModelConfigurationToolChoice$inboundSchema:
|
|
2998
|
+
z.ZodType<
|
|
2999
|
+
RetrieveAgentRequestFallbackModelConfigurationToolChoice,
|
|
3000
|
+
z.ZodTypeDef,
|
|
3001
|
+
unknown
|
|
3002
|
+
> = z.union([
|
|
3003
|
+
z.lazy(() => RetrieveAgentRequestToolChoiceAgents2$inboundSchema),
|
|
3004
|
+
RetrieveAgentRequestToolChoiceAgents1$inboundSchema,
|
|
3005
|
+
]);
|
|
3006
|
+
/** @internal */
|
|
3007
|
+
export type RetrieveAgentRequestFallbackModelConfigurationToolChoice$Outbound =
|
|
3008
|
+
| RetrieveAgentRequestToolChoiceAgents2$Outbound
|
|
3009
|
+
| string;
|
|
3010
|
+
|
|
3011
|
+
/** @internal */
|
|
3012
|
+
export const RetrieveAgentRequestFallbackModelConfigurationToolChoice$outboundSchema:
|
|
3013
|
+
z.ZodType<
|
|
3014
|
+
RetrieveAgentRequestFallbackModelConfigurationToolChoice$Outbound,
|
|
3015
|
+
z.ZodTypeDef,
|
|
3016
|
+
RetrieveAgentRequestFallbackModelConfigurationToolChoice
|
|
3017
|
+
> = z.union([
|
|
3018
|
+
z.lazy(() => RetrieveAgentRequestToolChoiceAgents2$outboundSchema),
|
|
3019
|
+
RetrieveAgentRequestToolChoiceAgents1$outboundSchema,
|
|
3020
|
+
]);
|
|
3021
|
+
|
|
3022
|
+
export function retrieveAgentRequestFallbackModelConfigurationToolChoiceToJSON(
|
|
3023
|
+
retrieveAgentRequestFallbackModelConfigurationToolChoice:
|
|
3024
|
+
RetrieveAgentRequestFallbackModelConfigurationToolChoice,
|
|
3025
|
+
): string {
|
|
3026
|
+
return JSON.stringify(
|
|
3027
|
+
RetrieveAgentRequestFallbackModelConfigurationToolChoice$outboundSchema
|
|
3028
|
+
.parse(retrieveAgentRequestFallbackModelConfigurationToolChoice),
|
|
3029
|
+
);
|
|
3030
|
+
}
|
|
3031
|
+
export function retrieveAgentRequestFallbackModelConfigurationToolChoiceFromJSON(
|
|
3032
|
+
jsonString: string,
|
|
3033
|
+
): SafeParseResult<
|
|
3034
|
+
RetrieveAgentRequestFallbackModelConfigurationToolChoice,
|
|
3035
|
+
SDKValidationError
|
|
3036
|
+
> {
|
|
3037
|
+
return safeParse(
|
|
3038
|
+
jsonString,
|
|
3039
|
+
(x) =>
|
|
3040
|
+
RetrieveAgentRequestFallbackModelConfigurationToolChoice$inboundSchema
|
|
3041
|
+
.parse(JSON.parse(x)),
|
|
3042
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationToolChoice' from JSON`,
|
|
3043
|
+
);
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
/** @internal */
|
|
3047
|
+
export const RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema:
|
|
3048
|
+
z.ZodNativeEnum<
|
|
3049
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationModalities
|
|
3050
|
+
> = z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationModalities);
|
|
3051
|
+
/** @internal */
|
|
3052
|
+
export const RetrieveAgentRequestFallbackModelConfigurationModalities$outboundSchema:
|
|
3053
|
+
z.ZodNativeEnum<
|
|
3054
|
+
typeof RetrieveAgentRequestFallbackModelConfigurationModalities
|
|
3055
|
+
> = RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema;
|
|
3056
|
+
|
|
3057
|
+
/** @internal */
|
|
3058
|
+
export const RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema:
|
|
3059
|
+
z.ZodType<
|
|
3060
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters,
|
|
3061
|
+
z.ZodTypeDef,
|
|
3062
|
+
unknown
|
|
3063
|
+
> = z.object({
|
|
3064
|
+
audio: z.nullable(
|
|
3065
|
+
z.lazy(() =>
|
|
3066
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio$inboundSchema
|
|
3067
|
+
),
|
|
3068
|
+
).optional(),
|
|
3069
|
+
frequency_penalty: z.nullable(z.number()).optional(),
|
|
3070
|
+
max_tokens: z.nullable(z.number().int()).optional(),
|
|
3071
|
+
max_completion_tokens: z.nullable(z.number().int()).optional(),
|
|
3072
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
3073
|
+
top_logprobs: z.nullable(z.number().int()).optional(),
|
|
3074
|
+
n: z.nullable(z.number().int()).optional(),
|
|
3075
|
+
presence_penalty: z.nullable(z.number()).optional(),
|
|
3076
|
+
response_format: z.union([
|
|
3077
|
+
z.lazy(() =>
|
|
3078
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema
|
|
3079
|
+
),
|
|
3080
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatAgentsText$inboundSchema),
|
|
3081
|
+
z.lazy(() =>
|
|
3082
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema
|
|
3083
|
+
),
|
|
3084
|
+
]).optional(),
|
|
3085
|
+
reasoning_effort: z.string().optional(),
|
|
3086
|
+
verbosity: z.string().optional(),
|
|
3087
|
+
seed: z.nullable(z.number()).optional(),
|
|
3088
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
3089
|
+
stream_options: z.nullable(
|
|
3090
|
+
z.lazy(() =>
|
|
3091
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions$inboundSchema
|
|
3092
|
+
),
|
|
3093
|
+
).optional(),
|
|
3094
|
+
thinking: z.lazy(() =>
|
|
3095
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema
|
|
3096
|
+
).optional(),
|
|
3097
|
+
temperature: z.nullable(z.number()).optional(),
|
|
3098
|
+
top_p: z.nullable(z.number()).optional(),
|
|
3099
|
+
top_k: z.nullable(z.number()).optional(),
|
|
3100
|
+
tool_choice: z.union([
|
|
3101
|
+
z.lazy(() => RetrieveAgentRequestToolChoiceAgents2$inboundSchema),
|
|
3102
|
+
RetrieveAgentRequestToolChoiceAgents1$inboundSchema,
|
|
3103
|
+
]).optional(),
|
|
3104
|
+
parallel_tool_calls: z.boolean().optional(),
|
|
3105
|
+
modalities: z.nullable(
|
|
3106
|
+
z.array(
|
|
3107
|
+
RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema,
|
|
3108
|
+
),
|
|
3109
|
+
).optional(),
|
|
3110
|
+
}).transform((v) => {
|
|
3111
|
+
return remap$(v, {
|
|
3112
|
+
"frequency_penalty": "frequencyPenalty",
|
|
3113
|
+
"max_tokens": "maxTokens",
|
|
3114
|
+
"max_completion_tokens": "maxCompletionTokens",
|
|
3115
|
+
"top_logprobs": "topLogprobs",
|
|
3116
|
+
"presence_penalty": "presencePenalty",
|
|
3117
|
+
"response_format": "responseFormat",
|
|
3118
|
+
"reasoning_effort": "reasoningEffort",
|
|
3119
|
+
"stream_options": "streamOptions",
|
|
3120
|
+
"top_p": "topP",
|
|
3121
|
+
"top_k": "topK",
|
|
3122
|
+
"tool_choice": "toolChoice",
|
|
3123
|
+
"parallel_tool_calls": "parallelToolCalls",
|
|
3124
|
+
});
|
|
3125
|
+
});
|
|
3126
|
+
/** @internal */
|
|
3127
|
+
export type RetrieveAgentRequestFallbackModelConfigurationParameters$Outbound =
|
|
3128
|
+
{
|
|
3129
|
+
audio?:
|
|
3130
|
+
| RetrieveAgentRequestFallbackModelConfigurationAudio$Outbound
|
|
3131
|
+
| null
|
|
3132
|
+
| undefined;
|
|
3133
|
+
frequency_penalty?: number | null | undefined;
|
|
3134
|
+
max_tokens?: number | null | undefined;
|
|
3135
|
+
max_completion_tokens?: number | null | undefined;
|
|
3136
|
+
logprobs?: boolean | null | undefined;
|
|
3137
|
+
top_logprobs?: number | null | undefined;
|
|
3138
|
+
n?: number | null | undefined;
|
|
3139
|
+
presence_penalty?: number | null | undefined;
|
|
3140
|
+
response_format?:
|
|
3141
|
+
| RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$Outbound
|
|
3142
|
+
| RetrieveAgentRequestResponseFormatAgentsText$Outbound
|
|
3143
|
+
| RetrieveAgentRequestResponseFormatAgentsJSONObject$Outbound
|
|
3144
|
+
| undefined;
|
|
3145
|
+
reasoning_effort?: string | undefined;
|
|
3146
|
+
verbosity?: string | undefined;
|
|
3147
|
+
seed?: number | null | undefined;
|
|
3148
|
+
stop?: string | Array<string> | null | undefined;
|
|
3149
|
+
stream_options?:
|
|
3150
|
+
| RetrieveAgentRequestFallbackModelConfigurationStreamOptions$Outbound
|
|
3151
|
+
| null
|
|
3152
|
+
| undefined;
|
|
3153
|
+
thinking?:
|
|
3154
|
+
| RetrieveAgentRequestFallbackModelConfigurationThinking$Outbound
|
|
3155
|
+
| undefined;
|
|
3156
|
+
temperature?: number | null | undefined;
|
|
3157
|
+
top_p?: number | null | undefined;
|
|
3158
|
+
top_k?: number | null | undefined;
|
|
3159
|
+
tool_choice?:
|
|
3160
|
+
| RetrieveAgentRequestToolChoiceAgents2$Outbound
|
|
3161
|
+
| string
|
|
3162
|
+
| undefined;
|
|
3163
|
+
parallel_tool_calls?: boolean | undefined;
|
|
3164
|
+
modalities?: Array<string> | null | undefined;
|
|
3165
|
+
};
|
|
3166
|
+
|
|
3167
|
+
/** @internal */
|
|
3168
|
+
export const RetrieveAgentRequestFallbackModelConfigurationParameters$outboundSchema:
|
|
3169
|
+
z.ZodType<
|
|
3170
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters$Outbound,
|
|
3171
|
+
z.ZodTypeDef,
|
|
3172
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters
|
|
3173
|
+
> = z.object({
|
|
3174
|
+
audio: z.nullable(
|
|
3175
|
+
z.lazy(() =>
|
|
3176
|
+
RetrieveAgentRequestFallbackModelConfigurationAudio$outboundSchema
|
|
3177
|
+
),
|
|
3178
|
+
).optional(),
|
|
3179
|
+
frequencyPenalty: z.nullable(z.number()).optional(),
|
|
3180
|
+
maxTokens: z.nullable(z.number().int()).optional(),
|
|
3181
|
+
maxCompletionTokens: z.nullable(z.number().int()).optional(),
|
|
3182
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
3183
|
+
topLogprobs: z.nullable(z.number().int()).optional(),
|
|
3184
|
+
n: z.nullable(z.number().int()).optional(),
|
|
3185
|
+
presencePenalty: z.nullable(z.number()).optional(),
|
|
3186
|
+
responseFormat: z.union([
|
|
3187
|
+
z.lazy(() =>
|
|
3188
|
+
RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$outboundSchema
|
|
3189
|
+
),
|
|
3190
|
+
z.lazy(() => RetrieveAgentRequestResponseFormatAgentsText$outboundSchema),
|
|
3191
|
+
z.lazy(() =>
|
|
3192
|
+
RetrieveAgentRequestResponseFormatAgentsJSONObject$outboundSchema
|
|
3193
|
+
),
|
|
3194
|
+
]).optional(),
|
|
3195
|
+
reasoningEffort: z.string().optional(),
|
|
3196
|
+
verbosity: z.string().optional(),
|
|
3197
|
+
seed: z.nullable(z.number()).optional(),
|
|
3198
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
3199
|
+
streamOptions: z.nullable(
|
|
3200
|
+
z.lazy(() =>
|
|
3201
|
+
RetrieveAgentRequestFallbackModelConfigurationStreamOptions$outboundSchema
|
|
3202
|
+
),
|
|
3203
|
+
).optional(),
|
|
3204
|
+
thinking: z.lazy(() =>
|
|
3205
|
+
RetrieveAgentRequestFallbackModelConfigurationThinking$outboundSchema
|
|
3206
|
+
).optional(),
|
|
3207
|
+
temperature: z.nullable(z.number()).optional(),
|
|
3208
|
+
topP: z.nullable(z.number()).optional(),
|
|
3209
|
+
topK: z.nullable(z.number()).optional(),
|
|
3210
|
+
toolChoice: z.union([
|
|
3211
|
+
z.lazy(() => RetrieveAgentRequestToolChoiceAgents2$outboundSchema),
|
|
3212
|
+
RetrieveAgentRequestToolChoiceAgents1$outboundSchema,
|
|
3213
|
+
]).optional(),
|
|
3214
|
+
parallelToolCalls: z.boolean().optional(),
|
|
3215
|
+
modalities: z.nullable(
|
|
3216
|
+
z.array(
|
|
3217
|
+
RetrieveAgentRequestFallbackModelConfigurationModalities$outboundSchema,
|
|
3218
|
+
),
|
|
3219
|
+
).optional(),
|
|
3220
|
+
}).transform((v) => {
|
|
3221
|
+
return remap$(v, {
|
|
3222
|
+
frequencyPenalty: "frequency_penalty",
|
|
3223
|
+
maxTokens: "max_tokens",
|
|
3224
|
+
maxCompletionTokens: "max_completion_tokens",
|
|
3225
|
+
topLogprobs: "top_logprobs",
|
|
3226
|
+
presencePenalty: "presence_penalty",
|
|
3227
|
+
responseFormat: "response_format",
|
|
3228
|
+
reasoningEffort: "reasoning_effort",
|
|
3229
|
+
streamOptions: "stream_options",
|
|
3230
|
+
topP: "top_p",
|
|
3231
|
+
topK: "top_k",
|
|
3232
|
+
toolChoice: "tool_choice",
|
|
3233
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
3234
|
+
});
|
|
3235
|
+
});
|
|
3236
|
+
|
|
3237
|
+
export function retrieveAgentRequestFallbackModelConfigurationParametersToJSON(
|
|
3238
|
+
retrieveAgentRequestFallbackModelConfigurationParameters:
|
|
3239
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters,
|
|
3240
|
+
): string {
|
|
3241
|
+
return JSON.stringify(
|
|
3242
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters$outboundSchema
|
|
3243
|
+
.parse(retrieveAgentRequestFallbackModelConfigurationParameters),
|
|
3244
|
+
);
|
|
3245
|
+
}
|
|
3246
|
+
export function retrieveAgentRequestFallbackModelConfigurationParametersFromJSON(
|
|
3247
|
+
jsonString: string,
|
|
3248
|
+
): SafeParseResult<
|
|
3249
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters,
|
|
3250
|
+
SDKValidationError
|
|
3251
|
+
> {
|
|
3252
|
+
return safeParse(
|
|
3253
|
+
jsonString,
|
|
3254
|
+
(x) =>
|
|
3255
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema
|
|
3256
|
+
.parse(JSON.parse(x)),
|
|
3257
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationParameters' from JSON`,
|
|
3258
|
+
);
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
/** @internal */
|
|
3262
|
+
export const RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema:
|
|
3263
|
+
z.ZodType<
|
|
3264
|
+
RetrieveAgentRequestFallbackModelConfiguration2,
|
|
3265
|
+
z.ZodTypeDef,
|
|
3266
|
+
unknown
|
|
3267
|
+
> = z.object({
|
|
3268
|
+
id: z.string(),
|
|
3269
|
+
parameters: z.lazy(() =>
|
|
3270
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema
|
|
3271
|
+
).optional(),
|
|
3272
|
+
});
|
|
3273
|
+
/** @internal */
|
|
3274
|
+
export type RetrieveAgentRequestFallbackModelConfiguration2$Outbound = {
|
|
3275
|
+
id: string;
|
|
3276
|
+
parameters?:
|
|
3277
|
+
| RetrieveAgentRequestFallbackModelConfigurationParameters$Outbound
|
|
3278
|
+
| undefined;
|
|
3279
|
+
};
|
|
3280
|
+
|
|
3281
|
+
/** @internal */
|
|
3282
|
+
export const RetrieveAgentRequestFallbackModelConfiguration2$outboundSchema:
|
|
3283
|
+
z.ZodType<
|
|
3284
|
+
RetrieveAgentRequestFallbackModelConfiguration2$Outbound,
|
|
3285
|
+
z.ZodTypeDef,
|
|
3286
|
+
RetrieveAgentRequestFallbackModelConfiguration2
|
|
3287
|
+
> = z.object({
|
|
3288
|
+
id: z.string(),
|
|
3289
|
+
parameters: z.lazy(() =>
|
|
3290
|
+
RetrieveAgentRequestFallbackModelConfigurationParameters$outboundSchema
|
|
3291
|
+
).optional(),
|
|
3292
|
+
});
|
|
3293
|
+
|
|
3294
|
+
export function retrieveAgentRequestFallbackModelConfiguration2ToJSON(
|
|
3295
|
+
retrieveAgentRequestFallbackModelConfiguration2:
|
|
3296
|
+
RetrieveAgentRequestFallbackModelConfiguration2,
|
|
3297
|
+
): string {
|
|
3298
|
+
return JSON.stringify(
|
|
3299
|
+
RetrieveAgentRequestFallbackModelConfiguration2$outboundSchema.parse(
|
|
3300
|
+
retrieveAgentRequestFallbackModelConfiguration2,
|
|
3301
|
+
),
|
|
3302
|
+
);
|
|
3303
|
+
}
|
|
3304
|
+
export function retrieveAgentRequestFallbackModelConfiguration2FromJSON(
|
|
3305
|
+
jsonString: string,
|
|
3306
|
+
): SafeParseResult<
|
|
3307
|
+
RetrieveAgentRequestFallbackModelConfiguration2,
|
|
3308
|
+
SDKValidationError
|
|
3309
|
+
> {
|
|
3310
|
+
return safeParse(
|
|
3311
|
+
jsonString,
|
|
3312
|
+
(x) =>
|
|
3313
|
+
RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema.parse(
|
|
3314
|
+
JSON.parse(x),
|
|
3315
|
+
),
|
|
3316
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfiguration2' from JSON`,
|
|
3317
|
+
);
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
/** @internal */
|
|
3321
|
+
export const RetrieveAgentRequestFallbackModelConfiguration$inboundSchema:
|
|
3322
|
+
z.ZodType<
|
|
3323
|
+
RetrieveAgentRequestFallbackModelConfiguration,
|
|
3324
|
+
z.ZodTypeDef,
|
|
3325
|
+
unknown
|
|
3326
|
+
> = z.union([
|
|
3327
|
+
z.lazy(() => RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema),
|
|
3328
|
+
z.string(),
|
|
3329
|
+
]);
|
|
3330
|
+
/** @internal */
|
|
3331
|
+
export type RetrieveAgentRequestFallbackModelConfiguration$Outbound =
|
|
3332
|
+
| RetrieveAgentRequestFallbackModelConfiguration2$Outbound
|
|
3333
|
+
| string;
|
|
3334
|
+
|
|
3335
|
+
/** @internal */
|
|
3336
|
+
export const RetrieveAgentRequestFallbackModelConfiguration$outboundSchema:
|
|
3337
|
+
z.ZodType<
|
|
3338
|
+
RetrieveAgentRequestFallbackModelConfiguration$Outbound,
|
|
3339
|
+
z.ZodTypeDef,
|
|
3340
|
+
RetrieveAgentRequestFallbackModelConfiguration
|
|
3341
|
+
> = z.union([
|
|
3342
|
+
z.lazy(() =>
|
|
3343
|
+
RetrieveAgentRequestFallbackModelConfiguration2$outboundSchema
|
|
3344
|
+
),
|
|
3345
|
+
z.string(),
|
|
3346
|
+
]);
|
|
3347
|
+
|
|
3348
|
+
export function retrieveAgentRequestFallbackModelConfigurationToJSON(
|
|
3349
|
+
retrieveAgentRequestFallbackModelConfiguration:
|
|
3350
|
+
RetrieveAgentRequestFallbackModelConfiguration,
|
|
3351
|
+
): string {
|
|
3352
|
+
return JSON.stringify(
|
|
3353
|
+
RetrieveAgentRequestFallbackModelConfiguration$outboundSchema.parse(
|
|
3354
|
+
retrieveAgentRequestFallbackModelConfiguration,
|
|
3355
|
+
),
|
|
3356
|
+
);
|
|
3357
|
+
}
|
|
3358
|
+
export function retrieveAgentRequestFallbackModelConfigurationFromJSON(
|
|
3359
|
+
jsonString: string,
|
|
3360
|
+
): SafeParseResult<
|
|
3361
|
+
RetrieveAgentRequestFallbackModelConfiguration,
|
|
3362
|
+
SDKValidationError
|
|
3363
|
+
> {
|
|
3364
|
+
return safeParse(
|
|
3365
|
+
jsonString,
|
|
3366
|
+
(x) =>
|
|
3367
|
+
RetrieveAgentRequestFallbackModelConfiguration$inboundSchema.parse(
|
|
3368
|
+
JSON.parse(x),
|
|
3369
|
+
),
|
|
3370
|
+
`Failed to parse 'RetrieveAgentRequestFallbackModelConfiguration' from JSON`,
|
|
3371
|
+
);
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
/** @internal */
|
|
3375
|
+
export const RetrieveAgentRequestModel$inboundSchema: z.ZodType<
|
|
3376
|
+
RetrieveAgentRequestModel,
|
|
3377
|
+
z.ZodTypeDef,
|
|
3378
|
+
unknown
|
|
3379
|
+
> = z.object({
|
|
3380
|
+
id: z.string(),
|
|
3381
|
+
integration_id: z.nullable(z.string()).optional(),
|
|
3382
|
+
parameters: z.lazy(() => RetrieveAgentRequestParameters$inboundSchema)
|
|
3383
|
+
.optional(),
|
|
3384
|
+
retry: z.lazy(() => RetrieveAgentRequestRetry$inboundSchema).optional(),
|
|
3385
|
+
fallback_models: z.nullable(
|
|
3386
|
+
z.array(z.union([
|
|
3387
|
+
z.lazy(() =>
|
|
3388
|
+
RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema
|
|
3389
|
+
),
|
|
3390
|
+
z.string(),
|
|
3391
|
+
])),
|
|
3392
|
+
).optional(),
|
|
3393
|
+
}).transform((v) => {
|
|
3394
|
+
return remap$(v, {
|
|
3395
|
+
"integration_id": "integrationId",
|
|
3396
|
+
"fallback_models": "fallbackModels",
|
|
3397
|
+
});
|
|
3398
|
+
});
|
|
3399
|
+
/** @internal */
|
|
3400
|
+
export type RetrieveAgentRequestModel$Outbound = {
|
|
3401
|
+
id: string;
|
|
3402
|
+
integration_id?: string | null | undefined;
|
|
3403
|
+
parameters?: RetrieveAgentRequestParameters$Outbound | undefined;
|
|
3404
|
+
retry?: RetrieveAgentRequestRetry$Outbound | undefined;
|
|
3405
|
+
fallback_models?:
|
|
3406
|
+
| Array<RetrieveAgentRequestFallbackModelConfiguration2$Outbound | string>
|
|
3407
|
+
| null
|
|
3408
|
+
| undefined;
|
|
3409
|
+
};
|
|
3410
|
+
|
|
3411
|
+
/** @internal */
|
|
3412
|
+
export const RetrieveAgentRequestModel$outboundSchema: z.ZodType<
|
|
3413
|
+
RetrieveAgentRequestModel$Outbound,
|
|
3414
|
+
z.ZodTypeDef,
|
|
3415
|
+
RetrieveAgentRequestModel
|
|
3416
|
+
> = z.object({
|
|
3417
|
+
id: z.string(),
|
|
3418
|
+
integrationId: z.nullable(z.string()).optional(),
|
|
3419
|
+
parameters: z.lazy(() => RetrieveAgentRequestParameters$outboundSchema)
|
|
3420
|
+
.optional(),
|
|
3421
|
+
retry: z.lazy(() => RetrieveAgentRequestRetry$outboundSchema).optional(),
|
|
3422
|
+
fallbackModels: z.nullable(
|
|
3423
|
+
z.array(z.union([
|
|
3424
|
+
z.lazy(() =>
|
|
3425
|
+
RetrieveAgentRequestFallbackModelConfiguration2$outboundSchema
|
|
3426
|
+
),
|
|
3427
|
+
z.string(),
|
|
3428
|
+
])),
|
|
3429
|
+
).optional(),
|
|
3430
|
+
}).transform((v) => {
|
|
3431
|
+
return remap$(v, {
|
|
3432
|
+
integrationId: "integration_id",
|
|
3433
|
+
fallbackModels: "fallback_models",
|
|
3434
|
+
});
|
|
3435
|
+
});
|
|
3436
|
+
|
|
3437
|
+
export function retrieveAgentRequestModelToJSON(
|
|
3438
|
+
retrieveAgentRequestModel: RetrieveAgentRequestModel,
|
|
3439
|
+
): string {
|
|
3440
|
+
return JSON.stringify(
|
|
3441
|
+
RetrieveAgentRequestModel$outboundSchema.parse(retrieveAgentRequestModel),
|
|
3442
|
+
);
|
|
3443
|
+
}
|
|
3444
|
+
export function retrieveAgentRequestModelFromJSON(
|
|
3445
|
+
jsonString: string,
|
|
3446
|
+
): SafeParseResult<RetrieveAgentRequestModel, SDKValidationError> {
|
|
3447
|
+
return safeParse(
|
|
3448
|
+
jsonString,
|
|
3449
|
+
(x) => RetrieveAgentRequestModel$inboundSchema.parse(JSON.parse(x)),
|
|
3450
|
+
`Failed to parse 'RetrieveAgentRequestModel' from JSON`,
|
|
3451
|
+
);
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
/** @internal */
|
|
3455
|
+
export const RetrieveAgentRequestTeamOfAgents$inboundSchema: z.ZodType<
|
|
3456
|
+
RetrieveAgentRequestTeamOfAgents,
|
|
3457
|
+
z.ZodTypeDef,
|
|
3458
|
+
unknown
|
|
3459
|
+
> = z.object({
|
|
3460
|
+
key: z.string(),
|
|
3461
|
+
role: z.string().optional(),
|
|
3462
|
+
});
|
|
3463
|
+
/** @internal */
|
|
3464
|
+
export type RetrieveAgentRequestTeamOfAgents$Outbound = {
|
|
3465
|
+
key: string;
|
|
3466
|
+
role?: string | undefined;
|
|
3467
|
+
};
|
|
3468
|
+
|
|
3469
|
+
/** @internal */
|
|
3470
|
+
export const RetrieveAgentRequestTeamOfAgents$outboundSchema: z.ZodType<
|
|
3471
|
+
RetrieveAgentRequestTeamOfAgents$Outbound,
|
|
3472
|
+
z.ZodTypeDef,
|
|
3473
|
+
RetrieveAgentRequestTeamOfAgents
|
|
3474
|
+
> = z.object({
|
|
3475
|
+
key: z.string(),
|
|
3476
|
+
role: z.string().optional(),
|
|
3477
|
+
});
|
|
3478
|
+
|
|
3479
|
+
export function retrieveAgentRequestTeamOfAgentsToJSON(
|
|
3480
|
+
retrieveAgentRequestTeamOfAgents: RetrieveAgentRequestTeamOfAgents,
|
|
3481
|
+
): string {
|
|
3482
|
+
return JSON.stringify(
|
|
3483
|
+
RetrieveAgentRequestTeamOfAgents$outboundSchema.parse(
|
|
3484
|
+
retrieveAgentRequestTeamOfAgents,
|
|
3485
|
+
),
|
|
3486
|
+
);
|
|
3487
|
+
}
|
|
3488
|
+
export function retrieveAgentRequestTeamOfAgentsFromJSON(
|
|
3489
|
+
jsonString: string,
|
|
3490
|
+
): SafeParseResult<RetrieveAgentRequestTeamOfAgents, SDKValidationError> {
|
|
3491
|
+
return safeParse(
|
|
3492
|
+
jsonString,
|
|
3493
|
+
(x) => RetrieveAgentRequestTeamOfAgents$inboundSchema.parse(JSON.parse(x)),
|
|
3494
|
+
`Failed to parse 'RetrieveAgentRequestTeamOfAgents' from JSON`,
|
|
3495
|
+
);
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
/** @internal */
|
|
3499
|
+
export const RetrieveAgentRequestMetrics$inboundSchema: z.ZodType<
|
|
3500
|
+
RetrieveAgentRequestMetrics,
|
|
3501
|
+
z.ZodTypeDef,
|
|
3502
|
+
unknown
|
|
3503
|
+
> = z.object({
|
|
3504
|
+
total_cost: z.number().default(0),
|
|
3505
|
+
}).transform((v) => {
|
|
3506
|
+
return remap$(v, {
|
|
3507
|
+
"total_cost": "totalCost",
|
|
3508
|
+
});
|
|
3509
|
+
});
|
|
3510
|
+
/** @internal */
|
|
3511
|
+
export type RetrieveAgentRequestMetrics$Outbound = {
|
|
3512
|
+
total_cost: number;
|
|
3513
|
+
};
|
|
3514
|
+
|
|
3515
|
+
/** @internal */
|
|
3516
|
+
export const RetrieveAgentRequestMetrics$outboundSchema: z.ZodType<
|
|
3517
|
+
RetrieveAgentRequestMetrics$Outbound,
|
|
3518
|
+
z.ZodTypeDef,
|
|
3519
|
+
RetrieveAgentRequestMetrics
|
|
3520
|
+
> = z.object({
|
|
3521
|
+
totalCost: z.number().default(0),
|
|
3522
|
+
}).transform((v) => {
|
|
3523
|
+
return remap$(v, {
|
|
3524
|
+
totalCost: "total_cost",
|
|
3525
|
+
});
|
|
3526
|
+
});
|
|
3527
|
+
|
|
3528
|
+
export function retrieveAgentRequestMetricsToJSON(
|
|
3529
|
+
retrieveAgentRequestMetrics: RetrieveAgentRequestMetrics,
|
|
3530
|
+
): string {
|
|
3531
|
+
return JSON.stringify(
|
|
3532
|
+
RetrieveAgentRequestMetrics$outboundSchema.parse(
|
|
3533
|
+
retrieveAgentRequestMetrics,
|
|
3534
|
+
),
|
|
3535
|
+
);
|
|
3536
|
+
}
|
|
3537
|
+
export function retrieveAgentRequestMetricsFromJSON(
|
|
3538
|
+
jsonString: string,
|
|
3539
|
+
): SafeParseResult<RetrieveAgentRequestMetrics, SDKValidationError> {
|
|
3540
|
+
return safeParse(
|
|
3541
|
+
jsonString,
|
|
3542
|
+
(x) => RetrieveAgentRequestMetrics$inboundSchema.parse(JSON.parse(x)),
|
|
3543
|
+
`Failed to parse 'RetrieveAgentRequestMetrics' from JSON`,
|
|
3544
|
+
);
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
/** @internal */
|
|
3548
|
+
export const RetrieveAgentRequestKnowledgeBases$inboundSchema: z.ZodType<
|
|
3549
|
+
RetrieveAgentRequestKnowledgeBases,
|
|
3550
|
+
z.ZodTypeDef,
|
|
3551
|
+
unknown
|
|
3552
|
+
> = z.object({
|
|
3553
|
+
knowledge_id: z.string(),
|
|
3554
|
+
}).transform((v) => {
|
|
3555
|
+
return remap$(v, {
|
|
3556
|
+
"knowledge_id": "knowledgeId",
|
|
3557
|
+
});
|
|
3558
|
+
});
|
|
3559
|
+
/** @internal */
|
|
3560
|
+
export type RetrieveAgentRequestKnowledgeBases$Outbound = {
|
|
3561
|
+
knowledge_id: string;
|
|
3562
|
+
};
|
|
3563
|
+
|
|
3564
|
+
/** @internal */
|
|
3565
|
+
export const RetrieveAgentRequestKnowledgeBases$outboundSchema: z.ZodType<
|
|
3566
|
+
RetrieveAgentRequestKnowledgeBases$Outbound,
|
|
3567
|
+
z.ZodTypeDef,
|
|
3568
|
+
RetrieveAgentRequestKnowledgeBases
|
|
3569
|
+
> = z.object({
|
|
3570
|
+
knowledgeId: z.string(),
|
|
3571
|
+
}).transform((v) => {
|
|
3572
|
+
return remap$(v, {
|
|
3573
|
+
knowledgeId: "knowledge_id",
|
|
3574
|
+
});
|
|
3575
|
+
});
|
|
3576
|
+
|
|
3577
|
+
export function retrieveAgentRequestKnowledgeBasesToJSON(
|
|
3578
|
+
retrieveAgentRequestKnowledgeBases: RetrieveAgentRequestKnowledgeBases,
|
|
3579
|
+
): string {
|
|
3580
|
+
return JSON.stringify(
|
|
3581
|
+
RetrieveAgentRequestKnowledgeBases$outboundSchema.parse(
|
|
3582
|
+
retrieveAgentRequestKnowledgeBases,
|
|
3583
|
+
),
|
|
3584
|
+
);
|
|
3585
|
+
}
|
|
3586
|
+
export function retrieveAgentRequestKnowledgeBasesFromJSON(
|
|
3587
|
+
jsonString: string,
|
|
3588
|
+
): SafeParseResult<RetrieveAgentRequestKnowledgeBases, SDKValidationError> {
|
|
3589
|
+
return safeParse(
|
|
3590
|
+
jsonString,
|
|
3591
|
+
(x) =>
|
|
3592
|
+
RetrieveAgentRequestKnowledgeBases$inboundSchema.parse(JSON.parse(x)),
|
|
3593
|
+
`Failed to parse 'RetrieveAgentRequestKnowledgeBases' from JSON`,
|
|
3594
|
+
);
|
|
3595
|
+
}
|
|
3596
|
+
|
|
3597
|
+
/** @internal */
|
|
3598
|
+
export const RetrieveAgentRequestResponseBody$inboundSchema: z.ZodType<
|
|
3599
|
+
RetrieveAgentRequestResponseBody,
|
|
3600
|
+
z.ZodTypeDef,
|
|
3601
|
+
unknown
|
|
3602
|
+
> = z.object({
|
|
3603
|
+
_id: z.string(),
|
|
3604
|
+
key: z.string(),
|
|
3605
|
+
display_name: z.string(),
|
|
3606
|
+
workspace_id: z.string(),
|
|
3607
|
+
project_id: z.string(),
|
|
3608
|
+
created_by_id: z.nullable(z.string()).optional(),
|
|
3609
|
+
updated_by_id: z.nullable(z.string()).optional(),
|
|
3610
|
+
created: z.string().optional(),
|
|
3611
|
+
updated: z.string().optional(),
|
|
3612
|
+
role: z.string(),
|
|
3613
|
+
description: z.string(),
|
|
3614
|
+
system_prompt: z.string().optional(),
|
|
3615
|
+
instructions: z.string(),
|
|
3616
|
+
status: RetrieveAgentRequestStatus$inboundSchema,
|
|
3617
|
+
settings: z.lazy(() => RetrieveAgentRequestSettings$inboundSchema).optional(),
|
|
3618
|
+
model: z.lazy(() => RetrieveAgentRequestModel$inboundSchema),
|
|
3619
|
+
version_hash: z.string().optional(),
|
|
3620
|
+
path: z.string(),
|
|
3621
|
+
memory_stores: z.array(z.string()),
|
|
3622
|
+
team_of_agents: z.array(
|
|
3623
|
+
z.lazy(() => RetrieveAgentRequestTeamOfAgents$inboundSchema),
|
|
3624
|
+
),
|
|
3625
|
+
metrics: z.lazy(() => RetrieveAgentRequestMetrics$inboundSchema).optional(),
|
|
3626
|
+
variables: z.record(z.any()).optional(),
|
|
3627
|
+
knowledge_bases: z.array(
|
|
3628
|
+
z.lazy(() => RetrieveAgentRequestKnowledgeBases$inboundSchema),
|
|
3629
|
+
).optional(),
|
|
3630
|
+
}).transform((v) => {
|
|
3631
|
+
return remap$(v, {
|
|
3632
|
+
"_id": "id",
|
|
3633
|
+
"display_name": "displayName",
|
|
3634
|
+
"workspace_id": "workspaceId",
|
|
3635
|
+
"project_id": "projectId",
|
|
3636
|
+
"created_by_id": "createdById",
|
|
3637
|
+
"updated_by_id": "updatedById",
|
|
3638
|
+
"system_prompt": "systemPrompt",
|
|
3639
|
+
"version_hash": "versionHash",
|
|
3640
|
+
"memory_stores": "memoryStores",
|
|
3641
|
+
"team_of_agents": "teamOfAgents",
|
|
3642
|
+
"knowledge_bases": "knowledgeBases",
|
|
3643
|
+
});
|
|
3644
|
+
});
|
|
3645
|
+
/** @internal */
|
|
3646
|
+
export type RetrieveAgentRequestResponseBody$Outbound = {
|
|
3647
|
+
_id: string;
|
|
3648
|
+
key: string;
|
|
3649
|
+
display_name: string;
|
|
3650
|
+
workspace_id: string;
|
|
3651
|
+
project_id: string;
|
|
3652
|
+
created_by_id?: string | null | undefined;
|
|
3653
|
+
updated_by_id?: string | null | undefined;
|
|
3654
|
+
created?: string | undefined;
|
|
3655
|
+
updated?: string | undefined;
|
|
3656
|
+
role: string;
|
|
3657
|
+
description: string;
|
|
3658
|
+
system_prompt?: string | undefined;
|
|
3659
|
+
instructions: string;
|
|
3660
|
+
status: string;
|
|
3661
|
+
settings?: RetrieveAgentRequestSettings$Outbound | undefined;
|
|
3662
|
+
model: RetrieveAgentRequestModel$Outbound;
|
|
3663
|
+
version_hash?: string | undefined;
|
|
3664
|
+
path: string;
|
|
3665
|
+
memory_stores: Array<string>;
|
|
3666
|
+
team_of_agents: Array<RetrieveAgentRequestTeamOfAgents$Outbound>;
|
|
3667
|
+
metrics?: RetrieveAgentRequestMetrics$Outbound | undefined;
|
|
3668
|
+
variables?: { [k: string]: any } | undefined;
|
|
3669
|
+
knowledge_bases?:
|
|
3670
|
+
| Array<RetrieveAgentRequestKnowledgeBases$Outbound>
|
|
3671
|
+
| undefined;
|
|
3672
|
+
};
|
|
3673
|
+
|
|
3674
|
+
/** @internal */
|
|
3675
|
+
export const RetrieveAgentRequestResponseBody$outboundSchema: z.ZodType<
|
|
3676
|
+
RetrieveAgentRequestResponseBody$Outbound,
|
|
3677
|
+
z.ZodTypeDef,
|
|
3678
|
+
RetrieveAgentRequestResponseBody
|
|
3679
|
+
> = z.object({
|
|
3680
|
+
id: z.string(),
|
|
3681
|
+
key: z.string(),
|
|
3682
|
+
displayName: z.string(),
|
|
3683
|
+
workspaceId: z.string(),
|
|
3684
|
+
projectId: z.string(),
|
|
3685
|
+
createdById: z.nullable(z.string()).optional(),
|
|
3686
|
+
updatedById: z.nullable(z.string()).optional(),
|
|
3687
|
+
created: z.string().optional(),
|
|
3688
|
+
updated: z.string().optional(),
|
|
3689
|
+
role: z.string(),
|
|
3690
|
+
description: z.string(),
|
|
3691
|
+
systemPrompt: z.string().optional(),
|
|
3692
|
+
instructions: z.string(),
|
|
3693
|
+
status: RetrieveAgentRequestStatus$outboundSchema,
|
|
3694
|
+
settings: z.lazy(() => RetrieveAgentRequestSettings$outboundSchema)
|
|
3695
|
+
.optional(),
|
|
3696
|
+
model: z.lazy(() => RetrieveAgentRequestModel$outboundSchema),
|
|
3697
|
+
versionHash: z.string().optional(),
|
|
3698
|
+
path: z.string(),
|
|
3699
|
+
memoryStores: z.array(z.string()),
|
|
3700
|
+
teamOfAgents: z.array(
|
|
3701
|
+
z.lazy(() => RetrieveAgentRequestTeamOfAgents$outboundSchema),
|
|
3702
|
+
),
|
|
3703
|
+
metrics: z.lazy(() => RetrieveAgentRequestMetrics$outboundSchema).optional(),
|
|
3704
|
+
variables: z.record(z.any()).optional(),
|
|
3705
|
+
knowledgeBases: z.array(
|
|
3706
|
+
z.lazy(() => RetrieveAgentRequestKnowledgeBases$outboundSchema),
|
|
3707
|
+
).optional(),
|
|
3708
|
+
}).transform((v) => {
|
|
3709
|
+
return remap$(v, {
|
|
3710
|
+
id: "_id",
|
|
3711
|
+
displayName: "display_name",
|
|
3712
|
+
workspaceId: "workspace_id",
|
|
3713
|
+
projectId: "project_id",
|
|
3714
|
+
createdById: "created_by_id",
|
|
3715
|
+
updatedById: "updated_by_id",
|
|
3716
|
+
systemPrompt: "system_prompt",
|
|
3717
|
+
versionHash: "version_hash",
|
|
3718
|
+
memoryStores: "memory_stores",
|
|
3719
|
+
teamOfAgents: "team_of_agents",
|
|
3720
|
+
knowledgeBases: "knowledge_bases",
|
|
3721
|
+
});
|
|
3722
|
+
});
|
|
3723
|
+
|
|
3724
|
+
export function retrieveAgentRequestResponseBodyToJSON(
|
|
3725
|
+
retrieveAgentRequestResponseBody: RetrieveAgentRequestResponseBody,
|
|
3726
|
+
): string {
|
|
3727
|
+
return JSON.stringify(
|
|
3728
|
+
RetrieveAgentRequestResponseBody$outboundSchema.parse(
|
|
3729
|
+
retrieveAgentRequestResponseBody,
|
|
3730
|
+
),
|
|
3731
|
+
);
|
|
3732
|
+
}
|
|
3733
|
+
export function retrieveAgentRequestResponseBodyFromJSON(
|
|
3734
|
+
jsonString: string,
|
|
3735
|
+
): SafeParseResult<RetrieveAgentRequestResponseBody, SDKValidationError> {
|
|
3736
|
+
return safeParse(
|
|
3737
|
+
jsonString,
|
|
3738
|
+
(x) => RetrieveAgentRequestResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
3739
|
+
`Failed to parse 'RetrieveAgentRequestResponseBody' from JSON`,
|
|
3740
|
+
);
|
|
3741
|
+
}
|