@orq-ai/node 4.0.0-rc.5 → 4.0.0-rc.7
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 +7487 -543
- package/bin/mcp-server.js.map +52 -52
- 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/createagent.d.ts +4141 -865
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +3767 -768
- package/models/operations/createagent.js.map +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/creatememorystore.d.ts +42 -42
- package/models/operations/creatememorystore.d.ts.map +1 -1
- package/models/operations/creatememorystore.js +61 -63
- package/models/operations/creatememorystore.js.map +1 -1
- package/models/operations/createprompt.d.ts +263 -263
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +345 -345
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +10 -10
- package/models/operations/deploymentgetconfig.d.ts +19 -19
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +22 -22
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deployments.d.ts +4 -4
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +4 -4
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/duplicatetool.js +10 -10
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getagent.d.ts +1614 -11
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js +1475 -9
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getallprompts.d.ts +4 -4
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +4 -4
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +10 -10
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/getoneprompt.d.ts +4 -4
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +4 -4
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +4 -4
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +4 -4
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/listagents.d.ts +1614 -11
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +1481 -9
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listagenttasks.d.ts +1614 -11
- package/models/operations/listagenttasks.d.ts.map +1 -1
- package/models/operations/listagenttasks.js +1479 -9
- package/models/operations/listagenttasks.js.map +1 -1
- 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/listpromptversions.d.ts +4 -4
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +4 -4
- package/models/operations/listpromptversions.js.map +1 -1
- 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 +10 -10
- package/models/operations/runagent.d.ts +2176 -503
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +1534 -9
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +2128 -455
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +1630 -89
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +4129 -853
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +3837 -825
- package/models/operations/updateagent.js.map +1 -1
- 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/updateprompt.d.ts +8 -8
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +8 -8
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +10 -10
- package/package.json +1 -1
- 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/createagent.ts +7853 -1626
- 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/creatememorystore.ts +120 -103
- package/src/models/operations/createprompt.ts +742 -621
- package/src/models/operations/createtool.ts +10 -10
- package/src/models/operations/deploymentgetconfig.ts +60 -44
- package/src/models/operations/deployments.ts +25 -20
- package/src/models/operations/duplicatetool.ts +10 -10
- 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/getagent.ts +3274 -246
- package/src/models/operations/getallprompts.ts +30 -20
- package/src/models/operations/getalltools.ts +10 -10
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/getoneprompt.ts +28 -20
- package/src/models/operations/getpromptversion.ts +30 -20
- package/src/models/operations/listagents.ts +3351 -270
- package/src/models/operations/listagenttasks.ts +3347 -180
- 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/listpromptversions.ts +30 -20
- 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 +10 -10
- package/src/models/operations/runagent.ts +3799 -610
- package/src/models/operations/streamrunagent.ts +3945 -605
- package/src/models/operations/updateagent.ts +8331 -1757
- 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/updateprompt.ts +58 -40
- package/src/models/operations/updatetool.ts +10 -10
|
@@ -10,896 +10,4079 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
16
|
-
|
|
15
|
+
export const RunAgentModelVoice = {
|
|
16
|
+
Alloy: "alloy",
|
|
17
|
+
Echo: "echo",
|
|
18
|
+
Fable: "fable",
|
|
19
|
+
Onyx: "onyx",
|
|
20
|
+
Nova: "nova",
|
|
21
|
+
Shimmer: "shimmer",
|
|
17
22
|
} as const;
|
|
18
23
|
/**
|
|
19
|
-
*
|
|
24
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
20
25
|
*/
|
|
21
|
-
export type
|
|
22
|
-
typeof RunAgentRoleToolMessage
|
|
23
|
-
>;
|
|
26
|
+
export type RunAgentModelVoice = ClosedEnum<typeof RunAgentModelVoice>;
|
|
24
27
|
|
|
25
28
|
/**
|
|
26
|
-
*
|
|
29
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
27
30
|
*/
|
|
28
|
-
export const
|
|
29
|
-
|
|
31
|
+
export const RunAgentModelFormat = {
|
|
32
|
+
Wav: "wav",
|
|
33
|
+
Mp3: "mp3",
|
|
34
|
+
Flac: "flac",
|
|
35
|
+
Opus: "opus",
|
|
36
|
+
Pcm16: "pcm16",
|
|
30
37
|
} as const;
|
|
31
38
|
/**
|
|
32
|
-
*
|
|
39
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
33
40
|
*/
|
|
34
|
-
export type
|
|
35
|
-
typeof RunAgentRoleUserMessage
|
|
36
|
-
>;
|
|
41
|
+
export type RunAgentModelFormat = ClosedEnum<typeof RunAgentModelFormat>;
|
|
37
42
|
|
|
38
43
|
/**
|
|
39
|
-
*
|
|
44
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
40
45
|
*/
|
|
41
|
-
export type
|
|
46
|
+
export type RunAgentModelAudio = {
|
|
47
|
+
/**
|
|
48
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
49
|
+
*/
|
|
50
|
+
voice: RunAgentModelVoice;
|
|
51
|
+
/**
|
|
52
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
53
|
+
*/
|
|
54
|
+
format: RunAgentModelFormat;
|
|
55
|
+
};
|
|
42
56
|
|
|
43
|
-
export const
|
|
44
|
-
|
|
57
|
+
export const RunAgentResponseFormatAgentsRequestType = {
|
|
58
|
+
JsonSchema: "json_schema",
|
|
45
59
|
} as const;
|
|
46
|
-
export type
|
|
47
|
-
typeof
|
|
60
|
+
export type RunAgentResponseFormatAgentsRequestType = ClosedEnum<
|
|
61
|
+
typeof RunAgentResponseFormatAgentsRequestType
|
|
48
62
|
>;
|
|
49
63
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
export type RunAgentResponseFormatJsonSchema = {
|
|
65
|
+
/**
|
|
66
|
+
* A description of what the response format is for, used by the model to determine how to respond in the format.
|
|
67
|
+
*/
|
|
68
|
+
description?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* 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.
|
|
71
|
+
*/
|
|
72
|
+
name: string;
|
|
73
|
+
/**
|
|
74
|
+
* The schema for the response format, described as a JSON Schema object.
|
|
75
|
+
*/
|
|
76
|
+
schema?: any | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* 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.
|
|
79
|
+
*/
|
|
80
|
+
strict?: boolean | undefined;
|
|
58
81
|
};
|
|
59
82
|
|
|
60
|
-
export
|
|
61
|
-
|
|
83
|
+
export type RunAgentResponseFormat3 = {
|
|
84
|
+
type: RunAgentResponseFormatAgentsRequestType;
|
|
85
|
+
jsonSchema: RunAgentResponseFormatJsonSchema;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const RunAgentResponseFormatAgentsType = {
|
|
89
|
+
JsonObject: "json_object",
|
|
62
90
|
} as const;
|
|
63
|
-
export type
|
|
64
|
-
typeof
|
|
91
|
+
export type RunAgentResponseFormatAgentsType = ClosedEnum<
|
|
92
|
+
typeof RunAgentResponseFormatAgentsType
|
|
93
|
+
>;
|
|
94
|
+
|
|
95
|
+
export type RunAgentResponseFormat2 = {
|
|
96
|
+
type: RunAgentResponseFormatAgentsType;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const RunAgentResponseFormatType = {
|
|
100
|
+
Text: "text",
|
|
101
|
+
} as const;
|
|
102
|
+
export type RunAgentResponseFormatType = ClosedEnum<
|
|
103
|
+
typeof RunAgentResponseFormatType
|
|
65
104
|
>;
|
|
66
105
|
|
|
106
|
+
export type RunAgentResponseFormat1 = {
|
|
107
|
+
type: RunAgentResponseFormatType;
|
|
108
|
+
};
|
|
109
|
+
|
|
67
110
|
/**
|
|
68
|
-
*
|
|
111
|
+
* An object specifying the format that the model must output
|
|
69
112
|
*/
|
|
70
|
-
export type
|
|
113
|
+
export type RunAgentModelResponseFormat =
|
|
114
|
+
| RunAgentResponseFormat3
|
|
115
|
+
| RunAgentResponseFormat1
|
|
116
|
+
| RunAgentResponseFormat2;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
120
|
+
*/
|
|
121
|
+
export type RunAgentModelStop = string | Array<string>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
125
|
+
*/
|
|
126
|
+
export type RunAgentModelStreamOptions = {
|
|
71
127
|
/**
|
|
72
|
-
*
|
|
128
|
+
* 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.
|
|
73
129
|
*/
|
|
74
|
-
|
|
130
|
+
includeUsage?: boolean | undefined;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Enables or disables the thinking mode capability
|
|
135
|
+
*/
|
|
136
|
+
export const RunAgentModelType = {
|
|
137
|
+
Enabled: "enabled",
|
|
138
|
+
Disabled: "disabled",
|
|
139
|
+
} as const;
|
|
140
|
+
/**
|
|
141
|
+
* Enables or disables the thinking mode capability
|
|
142
|
+
*/
|
|
143
|
+
export type RunAgentModelType = ClosedEnum<typeof RunAgentModelType>;
|
|
144
|
+
|
|
145
|
+
export type RunAgentModelThinking = {
|
|
75
146
|
/**
|
|
76
|
-
*
|
|
147
|
+
* Enables or disables the thinking mode capability
|
|
77
148
|
*/
|
|
78
|
-
|
|
149
|
+
type: RunAgentModelType;
|
|
79
150
|
/**
|
|
80
|
-
*
|
|
151
|
+
* 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`.
|
|
81
152
|
*/
|
|
82
|
-
|
|
153
|
+
budgetTokens: number;
|
|
83
154
|
};
|
|
84
155
|
|
|
85
156
|
/**
|
|
86
|
-
*
|
|
157
|
+
* The type of the tool. Currently, only function is supported.
|
|
87
158
|
*/
|
|
88
|
-
export
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
159
|
+
export const RunAgentToolChoiceType = {
|
|
160
|
+
Function: "function",
|
|
161
|
+
} as const;
|
|
162
|
+
/**
|
|
163
|
+
* The type of the tool. Currently, only function is supported.
|
|
164
|
+
*/
|
|
165
|
+
export type RunAgentToolChoiceType = ClosedEnum<typeof RunAgentToolChoiceType>;
|
|
166
|
+
|
|
167
|
+
export type RunAgentToolChoiceFunction = {
|
|
93
168
|
/**
|
|
94
|
-
*
|
|
169
|
+
* The name of the function to call.
|
|
95
170
|
*/
|
|
96
|
-
|
|
171
|
+
name?: string | undefined;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export type RunAgentToolChoice2 = {
|
|
97
175
|
/**
|
|
98
|
-
*
|
|
176
|
+
* The type of the tool. Currently, only function is supported.
|
|
99
177
|
*/
|
|
100
|
-
|
|
178
|
+
type?: RunAgentToolChoiceType | undefined;
|
|
179
|
+
function: RunAgentToolChoiceFunction;
|
|
101
180
|
};
|
|
102
181
|
|
|
103
|
-
export
|
|
104
|
-
|
|
105
|
-
|
|
182
|
+
export const RunAgentToolChoice1 = {
|
|
183
|
+
None: "none",
|
|
184
|
+
Auto: "auto",
|
|
185
|
+
Required: "required",
|
|
186
|
+
} as const;
|
|
187
|
+
export type RunAgentToolChoice1 = ClosedEnum<typeof RunAgentToolChoice1>;
|
|
106
188
|
|
|
107
189
|
/**
|
|
108
|
-
*
|
|
190
|
+
* Controls which (if any) tool is called by the model.
|
|
109
191
|
*/
|
|
110
|
-
export type
|
|
111
|
-
kind: RunAgentPublicMessagePartAgentsKind;
|
|
112
|
-
file: FileBinaryFormat | FileFileInURIFormat;
|
|
113
|
-
metadata?: { [k: string]: any } | undefined;
|
|
114
|
-
};
|
|
192
|
+
export type RunAgentModelToolChoice = RunAgentToolChoice2 | RunAgentToolChoice1;
|
|
115
193
|
|
|
116
|
-
export const
|
|
194
|
+
export const RunAgentModelModalities = {
|
|
117
195
|
Text: "text",
|
|
196
|
+
Audio: "audio",
|
|
118
197
|
} as const;
|
|
119
|
-
export type
|
|
120
|
-
typeof
|
|
198
|
+
export type RunAgentModelModalities = ClosedEnum<
|
|
199
|
+
typeof RunAgentModelModalities
|
|
121
200
|
>;
|
|
122
201
|
|
|
123
202
|
/**
|
|
124
|
-
*
|
|
203
|
+
* This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
|
|
125
204
|
*/
|
|
126
|
-
export type
|
|
127
|
-
|
|
128
|
-
|
|
205
|
+
export type RunAgentModelWebSearchOptions = {
|
|
206
|
+
/**
|
|
207
|
+
* Whether to enable web search for this request.
|
|
208
|
+
*/
|
|
209
|
+
enabled?: boolean | undefined;
|
|
129
210
|
};
|
|
130
211
|
|
|
131
212
|
/**
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
export type RunAgentPublicMessagePart =
|
|
135
|
-
| PublicMessagePartTextPart
|
|
136
|
-
| PublicMessagePartFilePart
|
|
137
|
-
| PublicMessagePartToolResultPart;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* The A2A format message containing the task for the agent to perform.
|
|
213
|
+
* Model parameters to customize behavior (snake_case). Common: temperature (0-1, controls randomness), max_tokens (response length). Advanced: top_p (nucleus sampling), frequency_penalty, presence_penalty, response_format, reasoning_effort. Not all parameters work with all models.
|
|
141
214
|
*/
|
|
142
|
-
export type
|
|
215
|
+
export type RunAgentModelParameters = {
|
|
143
216
|
/**
|
|
144
|
-
*
|
|
217
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
145
218
|
*/
|
|
146
|
-
|
|
219
|
+
audio?: RunAgentModelAudio | null | undefined;
|
|
147
220
|
/**
|
|
148
|
-
*
|
|
221
|
+
* 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.
|
|
149
222
|
*/
|
|
150
|
-
|
|
223
|
+
frequencyPenalty?: number | null | undefined;
|
|
151
224
|
/**
|
|
152
|
-
*
|
|
225
|
+
* `[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.
|
|
226
|
+
*
|
|
227
|
+
* @remarks
|
|
228
|
+
*
|
|
229
|
+
* This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
|
|
153
230
|
*/
|
|
154
|
-
|
|
155
|
-
| PublicMessagePartTextPart
|
|
156
|
-
| PublicMessagePartFilePart
|
|
157
|
-
| PublicMessagePartToolResultPart
|
|
158
|
-
>;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Information about the contact making the request. If the contact does not exist, it will be created automatically.
|
|
163
|
-
*/
|
|
164
|
-
export type RunAgentContact = {
|
|
231
|
+
maxTokens?: number | null | undefined;
|
|
165
232
|
/**
|
|
166
|
-
*
|
|
233
|
+
* An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
|
|
167
234
|
*/
|
|
168
|
-
|
|
235
|
+
maxCompletionTokens?: number | null | undefined;
|
|
169
236
|
/**
|
|
170
|
-
*
|
|
237
|
+
* 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.
|
|
171
238
|
*/
|
|
172
|
-
|
|
239
|
+
logprobs?: boolean | null | undefined;
|
|
173
240
|
/**
|
|
174
|
-
*
|
|
241
|
+
* 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.
|
|
175
242
|
*/
|
|
176
|
-
|
|
243
|
+
topLogprobs?: number | null | undefined;
|
|
177
244
|
/**
|
|
178
|
-
*
|
|
245
|
+
* 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.
|
|
179
246
|
*/
|
|
180
|
-
|
|
247
|
+
n?: number | null | undefined;
|
|
181
248
|
/**
|
|
182
|
-
*
|
|
249
|
+
* 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.
|
|
183
250
|
*/
|
|
184
|
-
|
|
251
|
+
presencePenalty?: number | null | undefined;
|
|
185
252
|
/**
|
|
186
|
-
*
|
|
253
|
+
* An object specifying the format that the model must output
|
|
187
254
|
*/
|
|
188
|
-
|
|
255
|
+
responseFormat?:
|
|
256
|
+
| RunAgentResponseFormat3
|
|
257
|
+
| RunAgentResponseFormat1
|
|
258
|
+
| RunAgentResponseFormat2
|
|
259
|
+
| undefined;
|
|
260
|
+
/**
|
|
261
|
+
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
262
|
+
*/
|
|
263
|
+
reasoningEffort?: string | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* Adjusts response verbosity. Lower levels yield shorter answers.
|
|
266
|
+
*/
|
|
267
|
+
verbosity?: string | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* 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.
|
|
270
|
+
*/
|
|
271
|
+
seed?: number | null | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
274
|
+
*/
|
|
275
|
+
stop?: string | Array<string> | null | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
278
|
+
*/
|
|
279
|
+
streamOptions?: RunAgentModelStreamOptions | null | undefined;
|
|
280
|
+
thinking?: RunAgentModelThinking | undefined;
|
|
281
|
+
/**
|
|
282
|
+
* 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.
|
|
283
|
+
*/
|
|
284
|
+
temperature?: number | null | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
|
|
287
|
+
*/
|
|
288
|
+
topP?: number | null | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* Limits the model to consider only the top k most likely tokens at each step.
|
|
291
|
+
*/
|
|
292
|
+
topK?: number | null | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* Controls which (if any) tool is called by the model.
|
|
295
|
+
*/
|
|
296
|
+
toolChoice?: RunAgentToolChoice2 | RunAgentToolChoice1 | undefined;
|
|
297
|
+
/**
|
|
298
|
+
* Whether to enable parallel function calling during tool use.
|
|
299
|
+
*/
|
|
300
|
+
parallelToolCalls?: boolean | undefined;
|
|
301
|
+
/**
|
|
302
|
+
* 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"].
|
|
303
|
+
*/
|
|
304
|
+
modalities?: Array<RunAgentModelModalities> | null | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
|
|
307
|
+
*/
|
|
308
|
+
webSearchOptions?: RunAgentModelWebSearchOptions | undefined;
|
|
189
309
|
};
|
|
190
310
|
|
|
191
311
|
/**
|
|
192
|
-
*
|
|
312
|
+
* Model configuration with parameters
|
|
193
313
|
*/
|
|
194
|
-
export type
|
|
314
|
+
export type RunAgentModel2 = {
|
|
195
315
|
/**
|
|
196
|
-
*
|
|
316
|
+
* Model ID or provider/model string
|
|
197
317
|
*/
|
|
198
318
|
id: string;
|
|
199
319
|
/**
|
|
200
|
-
* Optional
|
|
320
|
+
* Optional integration ID for custom configurations
|
|
201
321
|
*/
|
|
202
|
-
|
|
322
|
+
integrationId?: string | null | undefined;
|
|
323
|
+
/**
|
|
324
|
+
* Model parameters to customize behavior (snake_case). Common: temperature (0-1, controls randomness), max_tokens (response length). Advanced: top_p (nucleus sampling), frequency_penalty, presence_penalty, response_format, reasoning_effort. Not all parameters work with all models.
|
|
325
|
+
*/
|
|
326
|
+
parameters?: RunAgentModelParameters | undefined;
|
|
203
327
|
};
|
|
204
328
|
|
|
205
329
|
/**
|
|
206
|
-
*
|
|
330
|
+
* The language model that powers the agent. Can be a simple string (e.g., "openai/gpt-4o") or an object with model ID and parameters. The model must support tool calling capabilities.
|
|
207
331
|
*/
|
|
208
|
-
export type
|
|
209
|
-
/**
|
|
210
|
-
* An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
|
|
211
|
-
*/
|
|
212
|
-
entityId: string;
|
|
213
|
-
};
|
|
332
|
+
export type RunAgentModel = RunAgentModel2 | string;
|
|
214
333
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
334
|
+
/**
|
|
335
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
336
|
+
*/
|
|
337
|
+
export const RunAgentFallbackModelsVoice = {
|
|
338
|
+
Alloy: "alloy",
|
|
339
|
+
Echo: "echo",
|
|
340
|
+
Fable: "fable",
|
|
341
|
+
Onyx: "onyx",
|
|
342
|
+
Nova: "nova",
|
|
343
|
+
Shimmer: "shimmer",
|
|
344
|
+
} as const;
|
|
345
|
+
/**
|
|
346
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
347
|
+
*/
|
|
348
|
+
export type RunAgentFallbackModelsVoice = ClosedEnum<
|
|
349
|
+
typeof RunAgentFallbackModelsVoice
|
|
350
|
+
>;
|
|
221
351
|
|
|
222
|
-
|
|
352
|
+
/**
|
|
353
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
354
|
+
*/
|
|
355
|
+
export const RunAgentFallbackModelsFormat = {
|
|
356
|
+
Wav: "wav",
|
|
357
|
+
Mp3: "mp3",
|
|
358
|
+
Flac: "flac",
|
|
359
|
+
Opus: "opus",
|
|
360
|
+
Pcm16: "pcm16",
|
|
361
|
+
} as const;
|
|
362
|
+
/**
|
|
363
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
364
|
+
*/
|
|
365
|
+
export type RunAgentFallbackModelsFormat = ClosedEnum<
|
|
366
|
+
typeof RunAgentFallbackModelsFormat
|
|
367
|
+
>;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
371
|
+
*/
|
|
372
|
+
export type RunAgentFallbackModelsAudio = {
|
|
223
373
|
/**
|
|
224
|
-
* The
|
|
374
|
+
* The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
|
|
225
375
|
*/
|
|
226
|
-
|
|
376
|
+
voice: RunAgentFallbackModelsVoice;
|
|
227
377
|
/**
|
|
228
|
-
*
|
|
378
|
+
* Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
|
|
229
379
|
*/
|
|
230
|
-
|
|
380
|
+
format: RunAgentFallbackModelsFormat;
|
|
231
381
|
};
|
|
232
382
|
|
|
233
|
-
export const
|
|
383
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type =
|
|
234
384
|
{
|
|
235
|
-
|
|
385
|
+
JsonSchema: "json_schema",
|
|
236
386
|
} as const;
|
|
237
|
-
export type
|
|
387
|
+
export type RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type =
|
|
238
388
|
ClosedEnum<
|
|
239
|
-
typeof
|
|
389
|
+
typeof RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type
|
|
240
390
|
>;
|
|
241
391
|
|
|
242
|
-
export type
|
|
392
|
+
export type RunAgentResponseFormatAgentsJsonSchema = {
|
|
243
393
|
/**
|
|
244
|
-
*
|
|
394
|
+
* A description of what the response format is for, used by the model to determine how to respond in the format.
|
|
245
395
|
*/
|
|
246
|
-
|
|
396
|
+
description?: string | undefined;
|
|
247
397
|
/**
|
|
248
|
-
*
|
|
398
|
+
* 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.
|
|
249
399
|
*/
|
|
250
|
-
|
|
400
|
+
name: string;
|
|
251
401
|
/**
|
|
252
|
-
*
|
|
402
|
+
* The schema for the response format, described as a JSON Schema object.
|
|
253
403
|
*/
|
|
254
|
-
|
|
404
|
+
schema?: any | undefined;
|
|
255
405
|
/**
|
|
256
|
-
*
|
|
406
|
+
* 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.
|
|
257
407
|
*/
|
|
258
|
-
|
|
408
|
+
strict?: boolean | undefined;
|
|
259
409
|
};
|
|
260
410
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
export type FunctionToolRun = {
|
|
265
|
-
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14Type;
|
|
266
|
-
/**
|
|
267
|
-
* Unique key of the tool as it will be displayed in the UI
|
|
268
|
-
*/
|
|
269
|
-
key: string;
|
|
270
|
-
id?: string | undefined;
|
|
271
|
-
displayName?: string | undefined;
|
|
272
|
-
description?: string | undefined;
|
|
273
|
-
function: AgentToolInputRunFunction;
|
|
274
|
-
requiresApproval?: boolean | undefined;
|
|
411
|
+
export type RunAgentResponseFormatAgents3 = {
|
|
412
|
+
type: RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type;
|
|
413
|
+
jsonSchema: RunAgentResponseFormatAgentsJsonSchema;
|
|
275
414
|
};
|
|
276
415
|
|
|
277
|
-
export const
|
|
416
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType =
|
|
278
417
|
{
|
|
279
|
-
|
|
418
|
+
JsonObject: "json_object",
|
|
280
419
|
} as const;
|
|
281
|
-
export type
|
|
420
|
+
export type RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType =
|
|
282
421
|
ClosedEnum<
|
|
283
|
-
typeof
|
|
422
|
+
typeof RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType
|
|
284
423
|
>;
|
|
285
424
|
|
|
286
|
-
export
|
|
287
|
-
|
|
425
|
+
export type RunAgentResponseFormatAgents2 = {
|
|
426
|
+
type: RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType;
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyType = {
|
|
430
|
+
Text: "text",
|
|
288
431
|
} as const;
|
|
289
|
-
export type
|
|
432
|
+
export type RunAgentResponseFormatAgentsRequestRequestBodyType = ClosedEnum<
|
|
433
|
+
typeof RunAgentResponseFormatAgentsRequestRequestBodyType
|
|
434
|
+
>;
|
|
290
435
|
|
|
291
|
-
export type
|
|
292
|
-
|
|
293
|
-
* The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
294
|
-
*/
|
|
295
|
-
parameters?: { [k: string]: any } | undefined;
|
|
296
|
-
language: Language;
|
|
297
|
-
/**
|
|
298
|
-
* The code to execute.
|
|
299
|
-
*/
|
|
300
|
-
code: string;
|
|
436
|
+
export type RunAgentResponseFormatAgents1 = {
|
|
437
|
+
type: RunAgentResponseFormatAgentsRequestRequestBodyType;
|
|
301
438
|
};
|
|
302
439
|
|
|
303
440
|
/**
|
|
304
|
-
*
|
|
441
|
+
* An object specifying the format that the model must output
|
|
305
442
|
*/
|
|
306
|
-
export type
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
443
|
+
export type RunAgentFallbackModelsResponseFormat =
|
|
444
|
+
| RunAgentResponseFormatAgents3
|
|
445
|
+
| RunAgentResponseFormatAgents1
|
|
446
|
+
| RunAgentResponseFormatAgents2;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
450
|
+
*/
|
|
451
|
+
export type RunAgentFallbackModelsStop = string | Array<string>;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
455
|
+
*/
|
|
456
|
+
export type RunAgentFallbackModelsStreamOptions = {
|
|
314
457
|
/**
|
|
315
|
-
*
|
|
458
|
+
* 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.
|
|
316
459
|
*/
|
|
317
|
-
|
|
318
|
-
codeTool: CodeTool;
|
|
319
|
-
requiresApproval?: boolean | undefined;
|
|
460
|
+
includeUsage?: boolean | undefined;
|
|
320
461
|
};
|
|
321
462
|
|
|
322
|
-
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type =
|
|
323
|
-
{
|
|
324
|
-
Http: "http",
|
|
325
|
-
} as const;
|
|
326
|
-
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type =
|
|
327
|
-
ClosedEnum<
|
|
328
|
-
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type
|
|
329
|
-
>;
|
|
330
|
-
|
|
331
463
|
/**
|
|
332
|
-
*
|
|
464
|
+
* Enables or disables the thinking mode capability
|
|
333
465
|
*/
|
|
334
|
-
export const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
Put: "PUT",
|
|
338
|
-
Delete: "DELETE",
|
|
466
|
+
export const RunAgentFallbackModelsType = {
|
|
467
|
+
Enabled: "enabled",
|
|
468
|
+
Disabled: "disabled",
|
|
339
469
|
} as const;
|
|
340
470
|
/**
|
|
341
|
-
*
|
|
471
|
+
* Enables or disables the thinking mode capability
|
|
342
472
|
*/
|
|
343
|
-
export type
|
|
473
|
+
export type RunAgentFallbackModelsType = ClosedEnum<
|
|
474
|
+
typeof RunAgentFallbackModelsType
|
|
475
|
+
>;
|
|
344
476
|
|
|
345
|
-
|
|
346
|
-
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
347
|
-
*/
|
|
348
|
-
export type Blueprint = {
|
|
477
|
+
export type RunAgentFallbackModelsThinking = {
|
|
349
478
|
/**
|
|
350
|
-
*
|
|
479
|
+
* Enables or disables the thinking mode capability
|
|
351
480
|
*/
|
|
352
|
-
|
|
481
|
+
type: RunAgentFallbackModelsType;
|
|
353
482
|
/**
|
|
354
|
-
*
|
|
483
|
+
* 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`.
|
|
355
484
|
*/
|
|
356
|
-
|
|
485
|
+
budgetTokens: number;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* The type of the tool. Currently, only function is supported.
|
|
490
|
+
*/
|
|
491
|
+
export const RunAgentToolChoiceAgentsType = {
|
|
492
|
+
Function: "function",
|
|
493
|
+
} as const;
|
|
494
|
+
/**
|
|
495
|
+
* The type of the tool. Currently, only function is supported.
|
|
496
|
+
*/
|
|
497
|
+
export type RunAgentToolChoiceAgentsType = ClosedEnum<
|
|
498
|
+
typeof RunAgentToolChoiceAgentsType
|
|
499
|
+
>;
|
|
500
|
+
|
|
501
|
+
export type RunAgentToolChoiceAgentsFunction = {
|
|
357
502
|
/**
|
|
358
|
-
* The
|
|
503
|
+
* The name of the function to call.
|
|
359
504
|
*/
|
|
360
|
-
|
|
505
|
+
name?: string | undefined;
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
export type RunAgentToolChoiceAgents2 = {
|
|
361
509
|
/**
|
|
362
|
-
* The
|
|
510
|
+
* The type of the tool. Currently, only function is supported.
|
|
363
511
|
*/
|
|
364
|
-
|
|
512
|
+
type?: RunAgentToolChoiceAgentsType | undefined;
|
|
513
|
+
function: RunAgentToolChoiceAgentsFunction;
|
|
365
514
|
};
|
|
366
515
|
|
|
516
|
+
export const RunAgentToolChoiceAgents1 = {
|
|
517
|
+
None: "none",
|
|
518
|
+
Auto: "auto",
|
|
519
|
+
Required: "required",
|
|
520
|
+
} as const;
|
|
521
|
+
export type RunAgentToolChoiceAgents1 = ClosedEnum<
|
|
522
|
+
typeof RunAgentToolChoiceAgents1
|
|
523
|
+
>;
|
|
524
|
+
|
|
367
525
|
/**
|
|
368
|
-
*
|
|
369
|
-
*/
|
|
370
|
-
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType =
|
|
371
|
-
{
|
|
372
|
-
String: "string",
|
|
373
|
-
Number: "number",
|
|
374
|
-
Boolean: "boolean",
|
|
375
|
-
} as const;
|
|
376
|
-
/**
|
|
377
|
-
* The type of the argument.
|
|
526
|
+
* Controls which (if any) tool is called by the model.
|
|
378
527
|
*/
|
|
379
|
-
export type
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
528
|
+
export type RunAgentFallbackModelsToolChoice =
|
|
529
|
+
| RunAgentToolChoiceAgents2
|
|
530
|
+
| RunAgentToolChoiceAgents1;
|
|
531
|
+
|
|
532
|
+
export const RunAgentFallbackModelsModalities = {
|
|
533
|
+
Text: "text",
|
|
534
|
+
Audio: "audio",
|
|
535
|
+
} as const;
|
|
536
|
+
export type RunAgentFallbackModelsModalities = ClosedEnum<
|
|
537
|
+
typeof RunAgentFallbackModelsModalities
|
|
538
|
+
>;
|
|
383
539
|
|
|
384
540
|
/**
|
|
385
|
-
*
|
|
541
|
+
* This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
|
|
386
542
|
*/
|
|
387
|
-
export type
|
|
543
|
+
export type RunAgentFallbackModelsWebSearchOptions = {
|
|
544
|
+
/**
|
|
545
|
+
* Whether to enable web search for this request.
|
|
546
|
+
*/
|
|
547
|
+
enabled?: boolean | undefined;
|
|
548
|
+
};
|
|
388
549
|
|
|
389
|
-
export type
|
|
550
|
+
export type RunAgentFallbackModelsParameters = {
|
|
390
551
|
/**
|
|
391
|
-
*
|
|
552
|
+
* Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
|
|
392
553
|
*/
|
|
393
|
-
|
|
394
|
-
RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType;
|
|
554
|
+
audio?: RunAgentFallbackModelsAudio | null | undefined;
|
|
395
555
|
/**
|
|
396
|
-
*
|
|
556
|
+
* 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.
|
|
397
557
|
*/
|
|
398
|
-
|
|
558
|
+
frequencyPenalty?: number | null | undefined;
|
|
399
559
|
/**
|
|
400
|
-
*
|
|
560
|
+
* `[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.
|
|
561
|
+
*
|
|
562
|
+
* @remarks
|
|
563
|
+
*
|
|
564
|
+
* This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
|
|
401
565
|
*/
|
|
402
|
-
|
|
566
|
+
maxTokens?: number | null | undefined;
|
|
403
567
|
/**
|
|
404
|
-
*
|
|
568
|
+
* An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
|
|
405
569
|
*/
|
|
406
|
-
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
export type Http = {
|
|
570
|
+
maxCompletionTokens?: number | null | undefined;
|
|
410
571
|
/**
|
|
411
|
-
*
|
|
572
|
+
* 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.
|
|
412
573
|
*/
|
|
413
|
-
|
|
574
|
+
logprobs?: boolean | null | undefined;
|
|
414
575
|
/**
|
|
415
|
-
*
|
|
576
|
+
* 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.
|
|
416
577
|
*/
|
|
417
|
-
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* HTTP tool with inline definition for on-the-fly creation in run endpoint
|
|
422
|
-
*/
|
|
423
|
-
export type HTTPToolRun = {
|
|
424
|
-
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type;
|
|
578
|
+
topLogprobs?: number | null | undefined;
|
|
425
579
|
/**
|
|
426
|
-
*
|
|
580
|
+
* 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.
|
|
427
581
|
*/
|
|
428
|
-
|
|
429
|
-
id?: string | undefined;
|
|
430
|
-
displayName?: string | undefined;
|
|
582
|
+
n?: number | null | undefined;
|
|
431
583
|
/**
|
|
432
|
-
*
|
|
584
|
+
* 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.
|
|
433
585
|
*/
|
|
434
|
-
|
|
435
|
-
http: Http;
|
|
436
|
-
requiresApproval?: boolean | undefined;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type =
|
|
440
|
-
{
|
|
441
|
-
CurrentDate: "current_date",
|
|
442
|
-
} as const;
|
|
443
|
-
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type =
|
|
444
|
-
ClosedEnum<
|
|
445
|
-
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type
|
|
446
|
-
>;
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Returns the current date and time
|
|
450
|
-
*/
|
|
451
|
-
export type AgentToolInputRunCurrentDateTool = {
|
|
452
|
-
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type;
|
|
586
|
+
presencePenalty?: number | null | undefined;
|
|
453
587
|
/**
|
|
454
|
-
*
|
|
588
|
+
* An object specifying the format that the model must output
|
|
455
589
|
*/
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
QueryKnowledgeBase: "query_knowledge_base",
|
|
462
|
-
} as const;
|
|
463
|
-
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools10Type =
|
|
464
|
-
ClosedEnum<
|
|
465
|
-
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools10Type
|
|
466
|
-
>;
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Queries knowledge bases for information
|
|
470
|
-
*/
|
|
471
|
-
export type AgentToolInputRunQueryKnowledgeBaseTool = {
|
|
472
|
-
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools10Type;
|
|
590
|
+
responseFormat?:
|
|
591
|
+
| RunAgentResponseFormatAgents3
|
|
592
|
+
| RunAgentResponseFormatAgents1
|
|
593
|
+
| RunAgentResponseFormatAgents2
|
|
594
|
+
| undefined;
|
|
473
595
|
/**
|
|
474
|
-
*
|
|
596
|
+
* Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
|
475
597
|
*/
|
|
476
|
-
|
|
477
|
-
};
|
|
478
|
-
|
|
479
|
-
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type =
|
|
480
|
-
{
|
|
481
|
-
RetrieveKnowledgeBases: "retrieve_knowledge_bases",
|
|
482
|
-
} as const;
|
|
483
|
-
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type =
|
|
484
|
-
ClosedEnum<
|
|
485
|
-
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type
|
|
486
|
-
>;
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* Lists available knowledge bases
|
|
490
|
-
*/
|
|
491
|
-
export type AgentToolInputRunRetrieveKnowledgeBasesTool = {
|
|
492
|
-
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type;
|
|
598
|
+
reasoningEffort?: string | undefined;
|
|
493
599
|
/**
|
|
494
|
-
*
|
|
600
|
+
* Adjusts response verbosity. Lower levels yield shorter answers.
|
|
495
601
|
*/
|
|
496
|
-
|
|
602
|
+
verbosity?: string | undefined;
|
|
603
|
+
/**
|
|
604
|
+
* 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.
|
|
605
|
+
*/
|
|
606
|
+
seed?: number | null | undefined;
|
|
607
|
+
/**
|
|
608
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
609
|
+
*/
|
|
610
|
+
stop?: string | Array<string> | null | undefined;
|
|
611
|
+
/**
|
|
612
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
613
|
+
*/
|
|
614
|
+
streamOptions?: RunAgentFallbackModelsStreamOptions | null | undefined;
|
|
615
|
+
thinking?: RunAgentFallbackModelsThinking | undefined;
|
|
616
|
+
/**
|
|
617
|
+
* 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.
|
|
618
|
+
*/
|
|
619
|
+
temperature?: number | null | undefined;
|
|
620
|
+
/**
|
|
621
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
|
|
622
|
+
*/
|
|
623
|
+
topP?: number | null | undefined;
|
|
624
|
+
/**
|
|
625
|
+
* Limits the model to consider only the top k most likely tokens at each step.
|
|
626
|
+
*/
|
|
627
|
+
topK?: number | null | undefined;
|
|
628
|
+
/**
|
|
629
|
+
* Controls which (if any) tool is called by the model.
|
|
630
|
+
*/
|
|
631
|
+
toolChoice?:
|
|
632
|
+
| RunAgentToolChoiceAgents2
|
|
633
|
+
| RunAgentToolChoiceAgents1
|
|
634
|
+
| undefined;
|
|
635
|
+
/**
|
|
636
|
+
* Whether to enable parallel function calling during tool use.
|
|
637
|
+
*/
|
|
638
|
+
parallelToolCalls?: boolean | undefined;
|
|
639
|
+
/**
|
|
640
|
+
* 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"].
|
|
641
|
+
*/
|
|
642
|
+
modalities?: Array<RunAgentFallbackModelsModalities> | null | undefined;
|
|
643
|
+
/**
|
|
644
|
+
* This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
|
|
645
|
+
*/
|
|
646
|
+
webSearchOptions?: RunAgentFallbackModelsWebSearchOptions | undefined;
|
|
497
647
|
};
|
|
498
648
|
|
|
499
|
-
export
|
|
500
|
-
{
|
|
501
|
-
DeleteMemoryDocument: "delete_memory_document",
|
|
502
|
-
} as const;
|
|
503
|
-
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools8Type =
|
|
504
|
-
ClosedEnum<
|
|
505
|
-
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools8Type
|
|
506
|
-
>;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Deletes documents from memory stores
|
|
510
|
-
*/
|
|
511
|
-
export type AgentToolInputRunDeleteMemoryDocumentTool = {
|
|
512
|
-
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools8Type;
|
|
649
|
+
export type RunAgentFallbackModels2 = {
|
|
513
650
|
/**
|
|
514
|
-
*
|
|
651
|
+
* Fallback model ID
|
|
515
652
|
*/
|
|
516
|
-
|
|
653
|
+
id: string;
|
|
654
|
+
integrationId?: string | null | undefined;
|
|
655
|
+
parameters?: RunAgentFallbackModelsParameters | undefined;
|
|
517
656
|
};
|
|
518
657
|
|
|
519
|
-
export
|
|
520
|
-
{
|
|
521
|
-
RetrieveMemoryStores: "retrieve_memory_stores",
|
|
522
|
-
} as const;
|
|
523
|
-
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsToolsType =
|
|
524
|
-
ClosedEnum<
|
|
525
|
-
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsToolsType
|
|
526
|
-
>;
|
|
658
|
+
export type RunAgentFallbackModels = RunAgentFallbackModels2 | string;
|
|
527
659
|
|
|
528
660
|
/**
|
|
529
|
-
*
|
|
661
|
+
* Tool message
|
|
530
662
|
*/
|
|
531
|
-
export
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Whether this tool requires approval before execution
|
|
535
|
-
*/
|
|
536
|
-
requiresApproval?: boolean | undefined;
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsType = {
|
|
540
|
-
WriteMemoryStore: "write_memory_store",
|
|
663
|
+
export const RunAgentRoleToolMessage = {
|
|
664
|
+
Tool: "tool",
|
|
541
665
|
} as const;
|
|
542
|
-
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsType =
|
|
543
|
-
ClosedEnum<
|
|
544
|
-
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsType
|
|
545
|
-
>;
|
|
546
|
-
|
|
547
666
|
/**
|
|
548
|
-
*
|
|
667
|
+
* Tool message
|
|
549
668
|
*/
|
|
550
|
-
export type
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
* Whether this tool requires approval before execution
|
|
554
|
-
*/
|
|
555
|
-
requiresApproval?: boolean | undefined;
|
|
556
|
-
};
|
|
669
|
+
export type RunAgentRoleToolMessage = ClosedEnum<
|
|
670
|
+
typeof RunAgentRoleToolMessage
|
|
671
|
+
>;
|
|
557
672
|
|
|
558
|
-
|
|
559
|
-
|
|
673
|
+
/**
|
|
674
|
+
* User message
|
|
675
|
+
*/
|
|
676
|
+
export const RunAgentRoleUserMessage = {
|
|
677
|
+
User: "user",
|
|
560
678
|
} as const;
|
|
561
|
-
|
|
562
|
-
|
|
679
|
+
/**
|
|
680
|
+
* User message
|
|
681
|
+
*/
|
|
682
|
+
export type RunAgentRoleUserMessage = ClosedEnum<
|
|
683
|
+
typeof RunAgentRoleUserMessage
|
|
563
684
|
>;
|
|
564
685
|
|
|
565
686
|
/**
|
|
566
|
-
*
|
|
687
|
+
* Message role (user or tool for continuing executions)
|
|
567
688
|
*/
|
|
568
|
-
export type
|
|
569
|
-
type: RunAgentAgentToolInputRunAgentsRequestRequestBodyType;
|
|
570
|
-
/**
|
|
571
|
-
* Whether this tool requires approval before execution
|
|
572
|
-
*/
|
|
573
|
-
requiresApproval?: boolean | undefined;
|
|
574
|
-
};
|
|
689
|
+
export type RunAgentRole = RunAgentRoleUserMessage | RunAgentRoleToolMessage;
|
|
575
690
|
|
|
576
|
-
export const
|
|
577
|
-
|
|
691
|
+
export const RunAgentPublicMessagePartAgentsRequestKind = {
|
|
692
|
+
ToolResult: "tool_result",
|
|
578
693
|
} as const;
|
|
579
|
-
export type
|
|
580
|
-
typeof
|
|
694
|
+
export type RunAgentPublicMessagePartAgentsRequestKind = ClosedEnum<
|
|
695
|
+
typeof RunAgentPublicMessagePartAgentsRequestKind
|
|
581
696
|
>;
|
|
582
697
|
|
|
583
698
|
/**
|
|
584
|
-
*
|
|
699
|
+
* Tool execution result part. Use this ONLY when providing results for a pending tool call from the agent. The tool_call_id must match the ID from the agent's tool call request.
|
|
585
700
|
*/
|
|
586
|
-
export type
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
requiresApproval?: boolean | undefined;
|
|
701
|
+
export type PublicMessagePartToolResultPart = {
|
|
702
|
+
kind: RunAgentPublicMessagePartAgentsRequestKind;
|
|
703
|
+
toolCallId: string;
|
|
704
|
+
result?: any | undefined;
|
|
705
|
+
metadata?: { [k: string]: any } | undefined;
|
|
592
706
|
};
|
|
593
707
|
|
|
594
|
-
export const
|
|
595
|
-
|
|
708
|
+
export const RunAgentPublicMessagePartAgentsKind = {
|
|
709
|
+
File: "file",
|
|
596
710
|
} as const;
|
|
597
|
-
export type
|
|
598
|
-
typeof
|
|
711
|
+
export type RunAgentPublicMessagePartAgentsKind = ClosedEnum<
|
|
712
|
+
typeof RunAgentPublicMessagePartAgentsKind
|
|
599
713
|
>;
|
|
600
714
|
|
|
601
715
|
/**
|
|
602
|
-
*
|
|
716
|
+
* File in URI format. Check in the model's documentation for the supported mime types for the URI format
|
|
603
717
|
*/
|
|
604
|
-
export type
|
|
605
|
-
type: RunAgentAgentToolInputRunAgentsType;
|
|
718
|
+
export type FileFileInURIFormat = {
|
|
606
719
|
/**
|
|
607
|
-
*
|
|
720
|
+
* URL for the File content
|
|
608
721
|
*/
|
|
609
|
-
|
|
722
|
+
uri: string;
|
|
723
|
+
/**
|
|
724
|
+
* Optional mimeType for the file
|
|
725
|
+
*/
|
|
726
|
+
mimeType?: string | undefined;
|
|
727
|
+
/**
|
|
728
|
+
* Optional name for the file
|
|
729
|
+
*/
|
|
730
|
+
name?: string | undefined;
|
|
610
731
|
};
|
|
611
732
|
|
|
612
|
-
export const RunAgentAgentToolInputRunType = {
|
|
613
|
-
WebScraper: "web_scraper",
|
|
614
|
-
} as const;
|
|
615
|
-
export type RunAgentAgentToolInputRunType = ClosedEnum<
|
|
616
|
-
typeof RunAgentAgentToolInputRunType
|
|
617
|
-
>;
|
|
618
|
-
|
|
619
733
|
/**
|
|
620
|
-
*
|
|
734
|
+
* Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
|
|
621
735
|
*/
|
|
622
|
-
export type
|
|
623
|
-
type: RunAgentAgentToolInputRunType;
|
|
736
|
+
export type FileBinaryFormat = {
|
|
624
737
|
/**
|
|
625
|
-
*
|
|
738
|
+
* base64 encoded content of the file
|
|
626
739
|
*/
|
|
627
|
-
|
|
740
|
+
bytes: string;
|
|
741
|
+
/**
|
|
742
|
+
* Optional mimeType for the file
|
|
743
|
+
*/
|
|
744
|
+
mimeType?: string | undefined;
|
|
745
|
+
/**
|
|
746
|
+
* Optional name for the file
|
|
747
|
+
*/
|
|
748
|
+
name?: string | undefined;
|
|
628
749
|
};
|
|
629
750
|
|
|
630
|
-
export
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
export type AgentToolInputRunType = ClosedEnum<typeof AgentToolInputRunType>;
|
|
751
|
+
export type RunAgentPublicMessagePartFile =
|
|
752
|
+
| FileBinaryFormat
|
|
753
|
+
| FileFileInURIFormat;
|
|
634
754
|
|
|
635
755
|
/**
|
|
636
|
-
*
|
|
756
|
+
* File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
|
|
637
757
|
*/
|
|
638
|
-
export type
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
*/
|
|
643
|
-
requiresApproval?: boolean | undefined;
|
|
758
|
+
export type PublicMessagePartFilePart = {
|
|
759
|
+
kind: RunAgentPublicMessagePartAgentsKind;
|
|
760
|
+
file: FileBinaryFormat | FileFileInURIFormat;
|
|
761
|
+
metadata?: { [k: string]: any } | undefined;
|
|
644
762
|
};
|
|
645
763
|
|
|
764
|
+
export const RunAgentPublicMessagePartKind = {
|
|
765
|
+
Text: "text",
|
|
766
|
+
} as const;
|
|
767
|
+
export type RunAgentPublicMessagePartKind = ClosedEnum<
|
|
768
|
+
typeof RunAgentPublicMessagePartKind
|
|
769
|
+
>;
|
|
770
|
+
|
|
646
771
|
/**
|
|
647
|
-
*
|
|
772
|
+
* Text content part. Use this to send text messages to the agent.
|
|
648
773
|
*/
|
|
649
|
-
export type
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
| AgentToolInputRunGoogleSearchTool
|
|
654
|
-
| AgentToolInputRunWebScraperTool
|
|
655
|
-
| AgentToolInputRunCallSubAgentTool
|
|
656
|
-
| AgentToolInputRunRetrieveAgentsTool
|
|
657
|
-
| AgentToolInputRunQueryMemoryStoreTool
|
|
658
|
-
| AgentToolInputRunWriteMemoryStoreTool
|
|
659
|
-
| AgentToolInputRunRetrieveMemoryStoresTool
|
|
660
|
-
| AgentToolInputRunDeleteMemoryDocumentTool
|
|
661
|
-
| AgentToolInputRunRetrieveKnowledgeBasesTool
|
|
662
|
-
| AgentToolInputRunQueryKnowledgeBaseTool
|
|
663
|
-
| AgentToolInputRunCurrentDateTool;
|
|
774
|
+
export type PublicMessagePartTextPart = {
|
|
775
|
+
kind: RunAgentPublicMessagePartKind;
|
|
776
|
+
text: string;
|
|
777
|
+
};
|
|
664
778
|
|
|
665
779
|
/**
|
|
666
|
-
*
|
|
780
|
+
* Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
|
|
667
781
|
*/
|
|
668
|
-
export
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
782
|
+
export type RunAgentPublicMessagePart =
|
|
783
|
+
| PublicMessagePartTextPart
|
|
784
|
+
| PublicMessagePartFilePart
|
|
785
|
+
| PublicMessagePartToolResultPart;
|
|
786
|
+
|
|
673
787
|
/**
|
|
674
|
-
*
|
|
788
|
+
* The A2A format message containing the task for the agent to perform.
|
|
675
789
|
*/
|
|
676
|
-
export type
|
|
677
|
-
typeof RunAgentToolApprovalRequired
|
|
678
|
-
>;
|
|
679
|
-
|
|
680
|
-
export type RunAgentSettings = {
|
|
681
|
-
/**
|
|
682
|
-
* Tools available to the agent
|
|
683
|
-
*/
|
|
684
|
-
tools?:
|
|
685
|
-
| Array<
|
|
686
|
-
| HTTPToolRun
|
|
687
|
-
| CodeToolRun
|
|
688
|
-
| FunctionToolRun
|
|
689
|
-
| AgentToolInputRunGoogleSearchTool
|
|
690
|
-
| AgentToolInputRunWebScraperTool
|
|
691
|
-
| AgentToolInputRunCallSubAgentTool
|
|
692
|
-
| AgentToolInputRunRetrieveAgentsTool
|
|
693
|
-
| AgentToolInputRunQueryMemoryStoreTool
|
|
694
|
-
| AgentToolInputRunWriteMemoryStoreTool
|
|
695
|
-
| AgentToolInputRunRetrieveMemoryStoresTool
|
|
696
|
-
| AgentToolInputRunDeleteMemoryDocumentTool
|
|
697
|
-
| AgentToolInputRunRetrieveKnowledgeBasesTool
|
|
698
|
-
| AgentToolInputRunQueryKnowledgeBaseTool
|
|
699
|
-
| AgentToolInputRunCurrentDateTool
|
|
700
|
-
>
|
|
701
|
-
| undefined;
|
|
790
|
+
export type RunAgentMessage = {
|
|
702
791
|
/**
|
|
703
|
-
*
|
|
792
|
+
* Optional A2A message ID in ULID format
|
|
704
793
|
*/
|
|
705
|
-
|
|
794
|
+
messageId?: string | undefined;
|
|
706
795
|
/**
|
|
707
|
-
*
|
|
796
|
+
* Message role (user or tool for continuing executions)
|
|
708
797
|
*/
|
|
709
|
-
|
|
798
|
+
role: RunAgentRoleUserMessage | RunAgentRoleToolMessage;
|
|
710
799
|
/**
|
|
711
|
-
*
|
|
800
|
+
* A2A message parts (text, file, or tool_result only)
|
|
712
801
|
*/
|
|
713
|
-
|
|
802
|
+
parts: Array<
|
|
803
|
+
| PublicMessagePartTextPart
|
|
804
|
+
| PublicMessagePartFilePart
|
|
805
|
+
| PublicMessagePartToolResultPart
|
|
806
|
+
>;
|
|
714
807
|
};
|
|
715
808
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
key: string;
|
|
809
|
+
/**
|
|
810
|
+
* Information about the contact making the request. If the contact does not exist, it will be created automatically.
|
|
811
|
+
*/
|
|
812
|
+
export type RunAgentContact = {
|
|
721
813
|
/**
|
|
722
|
-
*
|
|
814
|
+
* Unique identifier for the contact
|
|
723
815
|
*/
|
|
724
|
-
|
|
816
|
+
id: string;
|
|
725
817
|
/**
|
|
726
|
-
*
|
|
818
|
+
* Display name of the contact
|
|
727
819
|
*/
|
|
728
|
-
|
|
820
|
+
displayName?: string | undefined;
|
|
729
821
|
/**
|
|
730
|
-
*
|
|
822
|
+
* Email address of the contact
|
|
731
823
|
*/
|
|
732
|
-
|
|
824
|
+
email?: string | undefined;
|
|
733
825
|
/**
|
|
734
|
-
*
|
|
826
|
+
* A hash of key/value pairs containing any other data about the contact
|
|
735
827
|
*/
|
|
736
|
-
|
|
828
|
+
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
737
829
|
/**
|
|
738
|
-
*
|
|
830
|
+
* URL to the contact's avatar or logo
|
|
739
831
|
*/
|
|
740
|
-
|
|
832
|
+
logoUrl?: string | undefined;
|
|
741
833
|
/**
|
|
742
|
-
*
|
|
834
|
+
* A list of tags associated with the contact
|
|
743
835
|
*/
|
|
744
|
-
|
|
836
|
+
tags?: Array<string> | undefined;
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Thread information to group related requests
|
|
841
|
+
*/
|
|
842
|
+
export type RunAgentThread = {
|
|
745
843
|
/**
|
|
746
|
-
*
|
|
844
|
+
* Unique thread identifier to group related invocations.
|
|
747
845
|
*/
|
|
748
|
-
|
|
846
|
+
id: string;
|
|
749
847
|
/**
|
|
750
|
-
*
|
|
848
|
+
* Optional tags to differentiate or categorize threads
|
|
751
849
|
*/
|
|
752
|
-
|
|
850
|
+
tags?: Array<string> | undefined;
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
|
|
855
|
+
*/
|
|
856
|
+
export type RunAgentMemory = {
|
|
753
857
|
/**
|
|
754
|
-
*
|
|
858
|
+
* An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
|
|
755
859
|
*/
|
|
756
|
-
|
|
860
|
+
entityId: string;
|
|
861
|
+
};
|
|
862
|
+
|
|
863
|
+
export type RunAgentKnowledgeBases = {
|
|
757
864
|
/**
|
|
758
|
-
*
|
|
865
|
+
* Unique identifier of the knowledge base to search
|
|
759
866
|
*/
|
|
760
|
-
|
|
867
|
+
knowledgeId: string;
|
|
868
|
+
};
|
|
869
|
+
|
|
870
|
+
export type RunAgentTeamOfAgents = {
|
|
761
871
|
/**
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
* @remarks
|
|
765
|
-
*
|
|
766
|
-
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
767
|
-
*
|
|
768
|
-
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
872
|
+
* The unique key of the agent within the workspace
|
|
769
873
|
*/
|
|
770
|
-
|
|
874
|
+
key: string;
|
|
771
875
|
/**
|
|
772
|
-
*
|
|
876
|
+
* 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.
|
|
877
|
+
*/
|
|
878
|
+
role?: string | undefined;
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14Type =
|
|
882
|
+
{
|
|
883
|
+
Function: "function",
|
|
884
|
+
} as const;
|
|
885
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14Type =
|
|
886
|
+
ClosedEnum<
|
|
887
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14Type
|
|
888
|
+
>;
|
|
889
|
+
|
|
890
|
+
export type AgentToolInputRunFunction = {
|
|
891
|
+
/**
|
|
892
|
+
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
893
|
+
*/
|
|
894
|
+
name: string;
|
|
895
|
+
/**
|
|
896
|
+
* A description of what the function does, used by the model to choose when and how to call the function.
|
|
773
897
|
*/
|
|
774
898
|
description?: string | undefined;
|
|
775
899
|
/**
|
|
776
|
-
*
|
|
900
|
+
* Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
|
|
777
901
|
*/
|
|
778
|
-
|
|
902
|
+
strict?: boolean | undefined;
|
|
779
903
|
/**
|
|
780
|
-
* The
|
|
904
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
781
905
|
*/
|
|
782
|
-
|
|
906
|
+
parameters?: { [k: string]: any } | undefined;
|
|
907
|
+
};
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Function tool with inline definition for on-the-fly creation in run endpoint
|
|
911
|
+
*/
|
|
912
|
+
export type FunctionToolRun = {
|
|
913
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14Type;
|
|
783
914
|
/**
|
|
784
|
-
*
|
|
915
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
785
916
|
*/
|
|
786
|
-
|
|
917
|
+
key: string;
|
|
918
|
+
id?: string | undefined;
|
|
919
|
+
displayName?: string | undefined;
|
|
920
|
+
description?: string | undefined;
|
|
921
|
+
function: AgentToolInputRunFunction;
|
|
922
|
+
requiresApproval?: boolean | undefined;
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13Type =
|
|
926
|
+
{
|
|
927
|
+
Code: "code",
|
|
928
|
+
} as const;
|
|
929
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13Type =
|
|
930
|
+
ClosedEnum<
|
|
931
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13Type
|
|
932
|
+
>;
|
|
933
|
+
|
|
934
|
+
export const Language = {
|
|
935
|
+
Python: "python",
|
|
936
|
+
} as const;
|
|
937
|
+
export type Language = ClosedEnum<typeof Language>;
|
|
938
|
+
|
|
939
|
+
export type CodeTool = {
|
|
787
940
|
/**
|
|
788
|
-
* The
|
|
941
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
789
942
|
*/
|
|
790
|
-
|
|
791
|
-
|
|
943
|
+
parameters?: { [k: string]: any } | undefined;
|
|
944
|
+
language: Language;
|
|
792
945
|
/**
|
|
793
|
-
*
|
|
946
|
+
* The code to execute.
|
|
794
947
|
*/
|
|
795
|
-
|
|
948
|
+
code: string;
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Code execution tool with inline definition for on-the-fly creation in run endpoint
|
|
953
|
+
*/
|
|
954
|
+
export type CodeToolRun = {
|
|
955
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13Type;
|
|
956
|
+
/**
|
|
957
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
958
|
+
*/
|
|
959
|
+
key: string;
|
|
960
|
+
id?: string | undefined;
|
|
961
|
+
displayName?: string | undefined;
|
|
962
|
+
/**
|
|
963
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
964
|
+
*/
|
|
965
|
+
description: string;
|
|
966
|
+
codeTool: CodeTool;
|
|
967
|
+
requiresApproval?: boolean | undefined;
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type =
|
|
971
|
+
{
|
|
972
|
+
Http: "http",
|
|
973
|
+
} as const;
|
|
974
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type =
|
|
975
|
+
ClosedEnum<
|
|
976
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type
|
|
977
|
+
>;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* The HTTP method to use.
|
|
981
|
+
*/
|
|
982
|
+
export const Method = {
|
|
983
|
+
Get: "GET",
|
|
984
|
+
Post: "POST",
|
|
985
|
+
Put: "PUT",
|
|
986
|
+
Delete: "DELETE",
|
|
987
|
+
} as const;
|
|
988
|
+
/**
|
|
989
|
+
* The HTTP method to use.
|
|
990
|
+
*/
|
|
991
|
+
export type Method = ClosedEnum<typeof Method>;
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
995
|
+
*/
|
|
996
|
+
export type Blueprint = {
|
|
997
|
+
/**
|
|
998
|
+
* The URL to send the request to.
|
|
999
|
+
*/
|
|
1000
|
+
url: string;
|
|
1001
|
+
/**
|
|
1002
|
+
* The HTTP method to use.
|
|
1003
|
+
*/
|
|
1004
|
+
method: Method;
|
|
1005
|
+
/**
|
|
1006
|
+
* The headers to send with the request.
|
|
1007
|
+
*/
|
|
1008
|
+
headers?: { [k: string]: string } | undefined;
|
|
1009
|
+
/**
|
|
1010
|
+
* The body to send with the request.
|
|
1011
|
+
*/
|
|
1012
|
+
body?: { [k: string]: any } | undefined;
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* The type of the argument.
|
|
1017
|
+
*/
|
|
1018
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType =
|
|
1019
|
+
{
|
|
1020
|
+
String: "string",
|
|
1021
|
+
Number: "number",
|
|
1022
|
+
Boolean: "boolean",
|
|
1023
|
+
} as const;
|
|
1024
|
+
/**
|
|
1025
|
+
* The type of the argument.
|
|
1026
|
+
*/
|
|
1027
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType =
|
|
1028
|
+
ClosedEnum<
|
|
1029
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType
|
|
1030
|
+
>;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* The default value of the argument.
|
|
1034
|
+
*/
|
|
1035
|
+
export type DefaultValue = string | number | boolean;
|
|
1036
|
+
|
|
1037
|
+
export type Arguments = {
|
|
1038
|
+
/**
|
|
1039
|
+
* The type of the argument.
|
|
1040
|
+
*/
|
|
1041
|
+
type:
|
|
1042
|
+
RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType;
|
|
1043
|
+
/**
|
|
1044
|
+
* A description of the argument.
|
|
1045
|
+
*/
|
|
1046
|
+
description: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
|
|
1049
|
+
*/
|
|
1050
|
+
sendToModel?: boolean | undefined;
|
|
1051
|
+
/**
|
|
1052
|
+
* The default value of the argument.
|
|
1053
|
+
*/
|
|
1054
|
+
defaultValue?: string | number | boolean | undefined;
|
|
1055
|
+
};
|
|
1056
|
+
|
|
1057
|
+
export type Http = {
|
|
1058
|
+
/**
|
|
1059
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
1060
|
+
*/
|
|
1061
|
+
blueprint: Blueprint;
|
|
1062
|
+
/**
|
|
1063
|
+
* The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
|
|
1064
|
+
*/
|
|
1065
|
+
arguments?: { [k: string]: Arguments } | undefined;
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* HTTP tool with inline definition for on-the-fly creation in run endpoint
|
|
1070
|
+
*/
|
|
1071
|
+
export type HTTPToolRun = {
|
|
1072
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12Type;
|
|
1073
|
+
/**
|
|
1074
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
1075
|
+
*/
|
|
1076
|
+
key: string;
|
|
1077
|
+
id?: string | undefined;
|
|
1078
|
+
displayName?: string | undefined;
|
|
1079
|
+
/**
|
|
1080
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
1081
|
+
*/
|
|
1082
|
+
description: string;
|
|
1083
|
+
http: Http;
|
|
1084
|
+
requiresApproval?: boolean | undefined;
|
|
796
1085
|
};
|
|
797
1086
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
1087
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type =
|
|
1088
|
+
{
|
|
1089
|
+
CurrentDate: "current_date",
|
|
1090
|
+
} as const;
|
|
1091
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type =
|
|
1092
|
+
ClosedEnum<
|
|
1093
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type
|
|
1094
|
+
>;
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Returns the current date and time
|
|
1098
|
+
*/
|
|
1099
|
+
export type AgentToolInputRunCurrentDateTool = {
|
|
1100
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools11Type;
|
|
1101
|
+
/**
|
|
1102
|
+
* Whether this tool requires approval before execution
|
|
1103
|
+
*/
|
|
1104
|
+
requiresApproval?: boolean | undefined;
|
|
1105
|
+
};
|
|
1106
|
+
|
|
1107
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools10Type =
|
|
1108
|
+
{
|
|
1109
|
+
QueryKnowledgeBase: "query_knowledge_base",
|
|
1110
|
+
} as const;
|
|
1111
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools10Type =
|
|
1112
|
+
ClosedEnum<
|
|
1113
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools10Type
|
|
1114
|
+
>;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Queries knowledge bases for information
|
|
1118
|
+
*/
|
|
1119
|
+
export type AgentToolInputRunQueryKnowledgeBaseTool = {
|
|
1120
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools10Type;
|
|
1121
|
+
/**
|
|
1122
|
+
* Whether this tool requires approval before execution
|
|
1123
|
+
*/
|
|
1124
|
+
requiresApproval?: boolean | undefined;
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type =
|
|
1128
|
+
{
|
|
1129
|
+
RetrieveKnowledgeBases: "retrieve_knowledge_bases",
|
|
1130
|
+
} as const;
|
|
1131
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type =
|
|
1132
|
+
ClosedEnum<
|
|
1133
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type
|
|
1134
|
+
>;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* Lists available knowledge bases
|
|
1138
|
+
*/
|
|
1139
|
+
export type AgentToolInputRunRetrieveKnowledgeBasesTool = {
|
|
1140
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools9Type;
|
|
1141
|
+
/**
|
|
1142
|
+
* Whether this tool requires approval before execution
|
|
1143
|
+
*/
|
|
1144
|
+
requiresApproval?: boolean | undefined;
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools8Type =
|
|
1148
|
+
{
|
|
1149
|
+
DeleteMemoryDocument: "delete_memory_document",
|
|
1150
|
+
} as const;
|
|
1151
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools8Type =
|
|
1152
|
+
ClosedEnum<
|
|
1153
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools8Type
|
|
1154
|
+
>;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Deletes documents from memory stores
|
|
1158
|
+
*/
|
|
1159
|
+
export type AgentToolInputRunDeleteMemoryDocumentTool = {
|
|
1160
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools8Type;
|
|
1161
|
+
/**
|
|
1162
|
+
* Whether this tool requires approval before execution
|
|
1163
|
+
*/
|
|
1164
|
+
requiresApproval?: boolean | undefined;
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsToolsType =
|
|
1168
|
+
{
|
|
1169
|
+
RetrieveMemoryStores: "retrieve_memory_stores",
|
|
1170
|
+
} as const;
|
|
1171
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsToolsType =
|
|
1172
|
+
ClosedEnum<
|
|
1173
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsToolsType
|
|
1174
|
+
>;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Lists available memory stores
|
|
1178
|
+
*/
|
|
1179
|
+
export type AgentToolInputRunRetrieveMemoryStoresTool = {
|
|
1180
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsToolsType;
|
|
1181
|
+
/**
|
|
1182
|
+
* Whether this tool requires approval before execution
|
|
1183
|
+
*/
|
|
1184
|
+
requiresApproval?: boolean | undefined;
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsType = {
|
|
1188
|
+
WriteMemoryStore: "write_memory_store",
|
|
1189
|
+
} as const;
|
|
1190
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsType =
|
|
1191
|
+
ClosedEnum<
|
|
1192
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsType
|
|
1193
|
+
>;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* Writes information to agent memory stores
|
|
1197
|
+
*/
|
|
1198
|
+
export type AgentToolInputRunWriteMemoryStoreTool = {
|
|
1199
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsType;
|
|
1200
|
+
/**
|
|
1201
|
+
* Whether this tool requires approval before execution
|
|
1202
|
+
*/
|
|
1203
|
+
requiresApproval?: boolean | undefined;
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodyType = {
|
|
1207
|
+
QueryMemoryStore: "query_memory_store",
|
|
1208
|
+
} as const;
|
|
1209
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodyType = ClosedEnum<
|
|
1210
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodyType
|
|
1211
|
+
>;
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* Queries agent memory stores for context
|
|
1215
|
+
*/
|
|
1216
|
+
export type AgentToolInputRunQueryMemoryStoreTool = {
|
|
1217
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodyType;
|
|
1218
|
+
/**
|
|
1219
|
+
* Whether this tool requires approval before execution
|
|
1220
|
+
*/
|
|
1221
|
+
requiresApproval?: boolean | undefined;
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1224
|
+
export const RunAgentAgentToolInputRunAgentsRequestType = {
|
|
1225
|
+
RetrieveAgents: "retrieve_agents",
|
|
1226
|
+
} as const;
|
|
1227
|
+
export type RunAgentAgentToolInputRunAgentsRequestType = ClosedEnum<
|
|
1228
|
+
typeof RunAgentAgentToolInputRunAgentsRequestType
|
|
1229
|
+
>;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Retrieves available agents in the system
|
|
1233
|
+
*/
|
|
1234
|
+
export type AgentToolInputRunRetrieveAgentsTool = {
|
|
1235
|
+
type: RunAgentAgentToolInputRunAgentsRequestType;
|
|
1236
|
+
/**
|
|
1237
|
+
* Whether this tool requires approval before execution
|
|
1238
|
+
*/
|
|
1239
|
+
requiresApproval?: boolean | undefined;
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
export const RunAgentAgentToolInputRunAgentsType = {
|
|
1243
|
+
CallSubAgent: "call_sub_agent",
|
|
1244
|
+
} as const;
|
|
1245
|
+
export type RunAgentAgentToolInputRunAgentsType = ClosedEnum<
|
|
1246
|
+
typeof RunAgentAgentToolInputRunAgentsType
|
|
1247
|
+
>;
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* Delegates tasks to specialized sub-agents
|
|
1251
|
+
*/
|
|
1252
|
+
export type AgentToolInputRunCallSubAgentTool = {
|
|
1253
|
+
type: RunAgentAgentToolInputRunAgentsType;
|
|
1254
|
+
/**
|
|
1255
|
+
* Whether this tool requires approval before execution
|
|
1256
|
+
*/
|
|
1257
|
+
requiresApproval?: boolean | undefined;
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
export const RunAgentAgentToolInputRunType = {
|
|
1261
|
+
WebScraper: "web_scraper",
|
|
1262
|
+
} as const;
|
|
1263
|
+
export type RunAgentAgentToolInputRunType = ClosedEnum<
|
|
1264
|
+
typeof RunAgentAgentToolInputRunType
|
|
1265
|
+
>;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Scrapes and extracts content from web pages
|
|
1269
|
+
*/
|
|
1270
|
+
export type AgentToolInputRunWebScraperTool = {
|
|
1271
|
+
type: RunAgentAgentToolInputRunType;
|
|
1272
|
+
/**
|
|
1273
|
+
* Whether this tool requires approval before execution
|
|
1274
|
+
*/
|
|
1275
|
+
requiresApproval?: boolean | undefined;
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
export const AgentToolInputRunType = {
|
|
1279
|
+
GoogleSearch: "google_search",
|
|
1280
|
+
} as const;
|
|
1281
|
+
export type AgentToolInputRunType = ClosedEnum<typeof AgentToolInputRunType>;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Performs Google searches to retrieve web content
|
|
1285
|
+
*/
|
|
1286
|
+
export type AgentToolInputRunGoogleSearchTool = {
|
|
1287
|
+
type: AgentToolInputRunType;
|
|
1288
|
+
/**
|
|
1289
|
+
* Whether this tool requires approval before execution
|
|
1290
|
+
*/
|
|
1291
|
+
requiresApproval?: boolean | undefined;
|
|
1292
|
+
};
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Tool configuration for agent run operations. Built-in tools only require a type and requires_approval, while custom tools (HTTP, Code, Function) support full inline definitions for on-the-fly creation.
|
|
1296
|
+
*/
|
|
1297
|
+
export type AgentToolInputRun =
|
|
1298
|
+
| HTTPToolRun
|
|
1299
|
+
| CodeToolRun
|
|
1300
|
+
| FunctionToolRun
|
|
1301
|
+
| AgentToolInputRunGoogleSearchTool
|
|
1302
|
+
| AgentToolInputRunWebScraperTool
|
|
1303
|
+
| AgentToolInputRunCallSubAgentTool
|
|
1304
|
+
| AgentToolInputRunRetrieveAgentsTool
|
|
1305
|
+
| AgentToolInputRunQueryMemoryStoreTool
|
|
1306
|
+
| AgentToolInputRunWriteMemoryStoreTool
|
|
1307
|
+
| AgentToolInputRunRetrieveMemoryStoresTool
|
|
1308
|
+
| AgentToolInputRunDeleteMemoryDocumentTool
|
|
1309
|
+
| AgentToolInputRunRetrieveKnowledgeBasesTool
|
|
1310
|
+
| AgentToolInputRunQueryKnowledgeBaseTool
|
|
1311
|
+
| AgentToolInputRunCurrentDateTool;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* 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.
|
|
1315
|
+
*/
|
|
1316
|
+
export const RunAgentToolApprovalRequired = {
|
|
1317
|
+
All: "all",
|
|
1318
|
+
RespectTool: "respect_tool",
|
|
1319
|
+
None: "none",
|
|
1320
|
+
} as const;
|
|
1321
|
+
/**
|
|
1322
|
+
* 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.
|
|
1323
|
+
*/
|
|
1324
|
+
export type RunAgentToolApprovalRequired = ClosedEnum<
|
|
1325
|
+
typeof RunAgentToolApprovalRequired
|
|
1326
|
+
>;
|
|
1327
|
+
|
|
1328
|
+
export type RunAgentSettings = {
|
|
1329
|
+
/**
|
|
1330
|
+
* Tools available to the agent
|
|
1331
|
+
*/
|
|
1332
|
+
tools?:
|
|
1333
|
+
| Array<
|
|
1334
|
+
| HTTPToolRun
|
|
1335
|
+
| CodeToolRun
|
|
1336
|
+
| FunctionToolRun
|
|
1337
|
+
| AgentToolInputRunGoogleSearchTool
|
|
1338
|
+
| AgentToolInputRunWebScraperTool
|
|
1339
|
+
| AgentToolInputRunCallSubAgentTool
|
|
1340
|
+
| AgentToolInputRunRetrieveAgentsTool
|
|
1341
|
+
| AgentToolInputRunQueryMemoryStoreTool
|
|
1342
|
+
| AgentToolInputRunWriteMemoryStoreTool
|
|
1343
|
+
| AgentToolInputRunRetrieveMemoryStoresTool
|
|
1344
|
+
| AgentToolInputRunDeleteMemoryDocumentTool
|
|
1345
|
+
| AgentToolInputRunRetrieveKnowledgeBasesTool
|
|
1346
|
+
| AgentToolInputRunQueryKnowledgeBaseTool
|
|
1347
|
+
| AgentToolInputRunCurrentDateTool
|
|
1348
|
+
>
|
|
1349
|
+
| undefined;
|
|
1350
|
+
/**
|
|
1351
|
+
* 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.
|
|
1352
|
+
*/
|
|
1353
|
+
toolApprovalRequired?: RunAgentToolApprovalRequired | undefined;
|
|
1354
|
+
/**
|
|
1355
|
+
* Maximum iterations(llm calls) before the agent will stop executing.
|
|
1356
|
+
*/
|
|
1357
|
+
maxIterations?: number | undefined;
|
|
1358
|
+
/**
|
|
1359
|
+
* 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.
|
|
1360
|
+
*/
|
|
1361
|
+
maxExecutionTime?: number | undefined;
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
export type RunAgentRequestBody = {
|
|
1365
|
+
/**
|
|
1366
|
+
* A unique identifier for the agent. This key must be unique within the same workspace and cannot be reused. When executing the agent, this key determines if the agent already exists. If the agent version differs, a new version is created at the end of the execution, except for the task. All agent parameters are evaluated to decide if a new version is needed.
|
|
1367
|
+
*/
|
|
1368
|
+
key: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
|
|
1371
|
+
*/
|
|
1372
|
+
taskId?: string | undefined;
|
|
1373
|
+
/**
|
|
1374
|
+
* The language model that powers the agent. Can be a simple string (e.g., "openai/gpt-4o") or an object with model ID and parameters. The model must support tool calling capabilities.
|
|
1375
|
+
*/
|
|
1376
|
+
model: RunAgentModel2 | string;
|
|
1377
|
+
/**
|
|
1378
|
+
* Optional array of fallback models (string IDs or config objects) to use when the primary model fails. Models are tried in order. All models must support tool calling capabilities.
|
|
1379
|
+
*/
|
|
1380
|
+
fallbackModels?: Array<RunAgentFallbackModels2 | string> | undefined;
|
|
1381
|
+
/**
|
|
1382
|
+
* Specifies the agent's function and area of expertise.
|
|
1383
|
+
*/
|
|
1384
|
+
role: string;
|
|
1385
|
+
/**
|
|
1386
|
+
* Provides context and purpose for the agent. Combined with the system prompt template to generate the agent's instructions.
|
|
1387
|
+
*/
|
|
1388
|
+
instructions: string;
|
|
1389
|
+
/**
|
|
1390
|
+
* The A2A format message containing the task for the agent to perform.
|
|
1391
|
+
*/
|
|
1392
|
+
message: RunAgentMessage;
|
|
1393
|
+
/**
|
|
1394
|
+
* Optional variables for template replacement in system prompt, instructions, and messages
|
|
1395
|
+
*/
|
|
1396
|
+
variables?: { [k: string]: any } | undefined;
|
|
1397
|
+
/**
|
|
1398
|
+
* Information about the contact making the request. If the contact does not exist, it will be created automatically.
|
|
1399
|
+
*/
|
|
1400
|
+
contact?: RunAgentContact | undefined;
|
|
1401
|
+
/**
|
|
1402
|
+
* Thread information to group related requests
|
|
1403
|
+
*/
|
|
1404
|
+
thread?: RunAgentThread | undefined;
|
|
1405
|
+
/**
|
|
1406
|
+
* Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
|
|
1407
|
+
*/
|
|
1408
|
+
memory?: RunAgentMemory | undefined;
|
|
1409
|
+
/**
|
|
1410
|
+
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
1411
|
+
*
|
|
1412
|
+
* @remarks
|
|
1413
|
+
*
|
|
1414
|
+
* The first element identifies the project, followed by nested folders (auto-created as needed).
|
|
1415
|
+
*
|
|
1416
|
+
* With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
|
|
1417
|
+
*/
|
|
1418
|
+
path: string;
|
|
1419
|
+
/**
|
|
1420
|
+
* A brief summary of the agent's purpose.
|
|
1421
|
+
*/
|
|
1422
|
+
description?: string | undefined;
|
|
1423
|
+
/**
|
|
1424
|
+
* A custom system prompt template for the agent. If omitted, the default template is used.
|
|
1425
|
+
*/
|
|
1426
|
+
systemPrompt?: string | undefined;
|
|
1427
|
+
/**
|
|
1428
|
+
* The list of keys of the memory stores that are accessible to the agent.
|
|
1429
|
+
*/
|
|
1430
|
+
memoryStores?: Array<string> | undefined;
|
|
1431
|
+
/**
|
|
1432
|
+
* Knowledge base configurations for the agent to access
|
|
1433
|
+
*/
|
|
1434
|
+
knowledgeBases?: Array<RunAgentKnowledgeBases> | undefined;
|
|
1435
|
+
/**
|
|
1436
|
+
* The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
|
|
1437
|
+
*/
|
|
1438
|
+
teamOfAgents?: Array<RunAgentTeamOfAgents> | undefined;
|
|
1439
|
+
settings: RunAgentSettings;
|
|
1440
|
+
/**
|
|
1441
|
+
* Optional metadata for the agent run as key-value pairs that will be included in traces
|
|
1442
|
+
*/
|
|
1443
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* A2A entity type
|
|
1448
|
+
*/
|
|
1449
|
+
export const RunAgentKind = {
|
|
1450
|
+
Task: "task",
|
|
1451
|
+
} as const;
|
|
1452
|
+
/**
|
|
1453
|
+
* A2A entity type
|
|
1454
|
+
*/
|
|
1455
|
+
export type RunAgentKind = ClosedEnum<typeof RunAgentKind>;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Current task state
|
|
1459
|
+
*/
|
|
1460
|
+
export const RunAgentState = {
|
|
1461
|
+
Submitted: "submitted",
|
|
1462
|
+
Working: "working",
|
|
1463
|
+
InputRequired: "input-required",
|
|
1464
|
+
Completed: "completed",
|
|
1465
|
+
Failed: "failed",
|
|
1466
|
+
Canceled: "canceled",
|
|
1467
|
+
Rejected: "rejected",
|
|
1468
|
+
AuthRequired: "auth-required",
|
|
1469
|
+
Unknown: "unknown",
|
|
1470
|
+
} as const;
|
|
1471
|
+
/**
|
|
1472
|
+
* Current task state
|
|
1473
|
+
*/
|
|
1474
|
+
export type RunAgentState = ClosedEnum<typeof RunAgentState>;
|
|
1475
|
+
|
|
1476
|
+
export const RunAgentAgentsKind = {
|
|
1477
|
+
Message: "message",
|
|
1478
|
+
} as const;
|
|
1479
|
+
export type RunAgentAgentsKind = ClosedEnum<typeof RunAgentAgentsKind>;
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Extended A2A message role
|
|
1483
|
+
*/
|
|
1484
|
+
export const RunAgentAgentsRole = {
|
|
1485
|
+
User: "user",
|
|
1486
|
+
Agent: "agent",
|
|
1487
|
+
Tool: "tool",
|
|
1488
|
+
System: "system",
|
|
1489
|
+
} as const;
|
|
1490
|
+
/**
|
|
1491
|
+
* Extended A2A message role
|
|
1492
|
+
*/
|
|
1493
|
+
export type RunAgentAgentsRole = ClosedEnum<typeof RunAgentAgentsRole>;
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* Optional status message
|
|
1497
|
+
*/
|
|
1498
|
+
export type RunAgentAgentsMessage = {
|
|
1499
|
+
kind: RunAgentAgentsKind;
|
|
1500
|
+
messageId: string;
|
|
1501
|
+
/**
|
|
1502
|
+
* Extended A2A message role
|
|
1503
|
+
*/
|
|
1504
|
+
role: RunAgentAgentsRole;
|
|
1505
|
+
parts: Array<any>;
|
|
1506
|
+
};
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Task status information
|
|
1510
|
+
*/
|
|
1511
|
+
export type RunAgentStatus = {
|
|
1512
|
+
/**
|
|
1513
|
+
* Current task state
|
|
1514
|
+
*/
|
|
1515
|
+
state: RunAgentState;
|
|
1516
|
+
/**
|
|
1517
|
+
* ISO timestamp of status update
|
|
1518
|
+
*/
|
|
1519
|
+
timestamp?: string | undefined;
|
|
1520
|
+
/**
|
|
1521
|
+
* Optional status message
|
|
1522
|
+
*/
|
|
1523
|
+
message?: RunAgentAgentsMessage | undefined;
|
|
1524
|
+
};
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* A2A Task response format
|
|
1528
|
+
*/
|
|
1529
|
+
export type RunAgentResponseBody = {
|
|
1530
|
+
/**
|
|
1531
|
+
* The ID of the created agent execution task
|
|
1532
|
+
*/
|
|
1533
|
+
id: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* The correlation ID for this execution
|
|
1536
|
+
*/
|
|
1537
|
+
contextId: string;
|
|
1538
|
+
/**
|
|
1539
|
+
* A2A entity type
|
|
1540
|
+
*/
|
|
1541
|
+
kind: RunAgentKind;
|
|
1542
|
+
/**
|
|
1543
|
+
* Task status information
|
|
1544
|
+
*/
|
|
1545
|
+
status: RunAgentStatus;
|
|
1546
|
+
/**
|
|
1547
|
+
* Task metadata containing workspace_id and trace_id for feedback
|
|
1548
|
+
*/
|
|
1549
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
/** @internal */
|
|
1553
|
+
export const RunAgentModelVoice$inboundSchema: z.ZodNativeEnum<
|
|
1554
|
+
typeof RunAgentModelVoice
|
|
1555
|
+
> = z.nativeEnum(RunAgentModelVoice);
|
|
1556
|
+
|
|
1557
|
+
/** @internal */
|
|
1558
|
+
export const RunAgentModelVoice$outboundSchema: z.ZodNativeEnum<
|
|
1559
|
+
typeof RunAgentModelVoice
|
|
1560
|
+
> = RunAgentModelVoice$inboundSchema;
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* @internal
|
|
1564
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1565
|
+
*/
|
|
1566
|
+
export namespace RunAgentModelVoice$ {
|
|
1567
|
+
/** @deprecated use `RunAgentModelVoice$inboundSchema` instead. */
|
|
1568
|
+
export const inboundSchema = RunAgentModelVoice$inboundSchema;
|
|
1569
|
+
/** @deprecated use `RunAgentModelVoice$outboundSchema` instead. */
|
|
1570
|
+
export const outboundSchema = RunAgentModelVoice$outboundSchema;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/** @internal */
|
|
1574
|
+
export const RunAgentModelFormat$inboundSchema: z.ZodNativeEnum<
|
|
1575
|
+
typeof RunAgentModelFormat
|
|
1576
|
+
> = z.nativeEnum(RunAgentModelFormat);
|
|
1577
|
+
|
|
1578
|
+
/** @internal */
|
|
1579
|
+
export const RunAgentModelFormat$outboundSchema: z.ZodNativeEnum<
|
|
1580
|
+
typeof RunAgentModelFormat
|
|
1581
|
+
> = RunAgentModelFormat$inboundSchema;
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* @internal
|
|
1585
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1586
|
+
*/
|
|
1587
|
+
export namespace RunAgentModelFormat$ {
|
|
1588
|
+
/** @deprecated use `RunAgentModelFormat$inboundSchema` instead. */
|
|
1589
|
+
export const inboundSchema = RunAgentModelFormat$inboundSchema;
|
|
1590
|
+
/** @deprecated use `RunAgentModelFormat$outboundSchema` instead. */
|
|
1591
|
+
export const outboundSchema = RunAgentModelFormat$outboundSchema;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/** @internal */
|
|
1595
|
+
export const RunAgentModelAudio$inboundSchema: z.ZodType<
|
|
1596
|
+
RunAgentModelAudio,
|
|
1597
|
+
z.ZodTypeDef,
|
|
1598
|
+
unknown
|
|
1599
|
+
> = z.object({
|
|
1600
|
+
voice: RunAgentModelVoice$inboundSchema,
|
|
1601
|
+
format: RunAgentModelFormat$inboundSchema,
|
|
1602
|
+
});
|
|
1603
|
+
|
|
1604
|
+
/** @internal */
|
|
1605
|
+
export type RunAgentModelAudio$Outbound = {
|
|
1606
|
+
voice: string;
|
|
1607
|
+
format: string;
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
/** @internal */
|
|
1611
|
+
export const RunAgentModelAudio$outboundSchema: z.ZodType<
|
|
1612
|
+
RunAgentModelAudio$Outbound,
|
|
1613
|
+
z.ZodTypeDef,
|
|
1614
|
+
RunAgentModelAudio
|
|
1615
|
+
> = z.object({
|
|
1616
|
+
voice: RunAgentModelVoice$outboundSchema,
|
|
1617
|
+
format: RunAgentModelFormat$outboundSchema,
|
|
1618
|
+
});
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* @internal
|
|
1622
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1623
|
+
*/
|
|
1624
|
+
export namespace RunAgentModelAudio$ {
|
|
1625
|
+
/** @deprecated use `RunAgentModelAudio$inboundSchema` instead. */
|
|
1626
|
+
export const inboundSchema = RunAgentModelAudio$inboundSchema;
|
|
1627
|
+
/** @deprecated use `RunAgentModelAudio$outboundSchema` instead. */
|
|
1628
|
+
export const outboundSchema = RunAgentModelAudio$outboundSchema;
|
|
1629
|
+
/** @deprecated use `RunAgentModelAudio$Outbound` instead. */
|
|
1630
|
+
export type Outbound = RunAgentModelAudio$Outbound;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
export function runAgentModelAudioToJSON(
|
|
1634
|
+
runAgentModelAudio: RunAgentModelAudio,
|
|
1635
|
+
): string {
|
|
1636
|
+
return JSON.stringify(
|
|
1637
|
+
RunAgentModelAudio$outboundSchema.parse(runAgentModelAudio),
|
|
1638
|
+
);
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
export function runAgentModelAudioFromJSON(
|
|
1642
|
+
jsonString: string,
|
|
1643
|
+
): SafeParseResult<RunAgentModelAudio, SDKValidationError> {
|
|
1644
|
+
return safeParse(
|
|
1645
|
+
jsonString,
|
|
1646
|
+
(x) => RunAgentModelAudio$inboundSchema.parse(JSON.parse(x)),
|
|
1647
|
+
`Failed to parse 'RunAgentModelAudio' from JSON`,
|
|
1648
|
+
);
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/** @internal */
|
|
1652
|
+
export const RunAgentResponseFormatAgentsRequestType$inboundSchema:
|
|
1653
|
+
z.ZodNativeEnum<typeof RunAgentResponseFormatAgentsRequestType> = z
|
|
1654
|
+
.nativeEnum(RunAgentResponseFormatAgentsRequestType);
|
|
1655
|
+
|
|
1656
|
+
/** @internal */
|
|
1657
|
+
export const RunAgentResponseFormatAgentsRequestType$outboundSchema:
|
|
1658
|
+
z.ZodNativeEnum<typeof RunAgentResponseFormatAgentsRequestType> =
|
|
1659
|
+
RunAgentResponseFormatAgentsRequestType$inboundSchema;
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* @internal
|
|
1663
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1664
|
+
*/
|
|
1665
|
+
export namespace RunAgentResponseFormatAgentsRequestType$ {
|
|
1666
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestType$inboundSchema` instead. */
|
|
1667
|
+
export const inboundSchema =
|
|
1668
|
+
RunAgentResponseFormatAgentsRequestType$inboundSchema;
|
|
1669
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestType$outboundSchema` instead. */
|
|
1670
|
+
export const outboundSchema =
|
|
1671
|
+
RunAgentResponseFormatAgentsRequestType$outboundSchema;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
/** @internal */
|
|
1675
|
+
export const RunAgentResponseFormatJsonSchema$inboundSchema: z.ZodType<
|
|
1676
|
+
RunAgentResponseFormatJsonSchema,
|
|
1677
|
+
z.ZodTypeDef,
|
|
1678
|
+
unknown
|
|
1679
|
+
> = z.object({
|
|
1680
|
+
description: z.string().optional(),
|
|
1681
|
+
name: z.string(),
|
|
1682
|
+
schema: z.any().optional(),
|
|
1683
|
+
strict: z.boolean().optional(),
|
|
1684
|
+
});
|
|
1685
|
+
|
|
1686
|
+
/** @internal */
|
|
1687
|
+
export type RunAgentResponseFormatJsonSchema$Outbound = {
|
|
1688
|
+
description?: string | undefined;
|
|
1689
|
+
name: string;
|
|
1690
|
+
schema?: any | undefined;
|
|
1691
|
+
strict?: boolean | undefined;
|
|
1692
|
+
};
|
|
1693
|
+
|
|
1694
|
+
/** @internal */
|
|
1695
|
+
export const RunAgentResponseFormatJsonSchema$outboundSchema: z.ZodType<
|
|
1696
|
+
RunAgentResponseFormatJsonSchema$Outbound,
|
|
1697
|
+
z.ZodTypeDef,
|
|
1698
|
+
RunAgentResponseFormatJsonSchema
|
|
1699
|
+
> = z.object({
|
|
1700
|
+
description: z.string().optional(),
|
|
1701
|
+
name: z.string(),
|
|
1702
|
+
schema: z.any().optional(),
|
|
1703
|
+
strict: z.boolean().optional(),
|
|
1704
|
+
});
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* @internal
|
|
1708
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1709
|
+
*/
|
|
1710
|
+
export namespace RunAgentResponseFormatJsonSchema$ {
|
|
1711
|
+
/** @deprecated use `RunAgentResponseFormatJsonSchema$inboundSchema` instead. */
|
|
1712
|
+
export const inboundSchema = RunAgentResponseFormatJsonSchema$inboundSchema;
|
|
1713
|
+
/** @deprecated use `RunAgentResponseFormatJsonSchema$outboundSchema` instead. */
|
|
1714
|
+
export const outboundSchema = RunAgentResponseFormatJsonSchema$outboundSchema;
|
|
1715
|
+
/** @deprecated use `RunAgentResponseFormatJsonSchema$Outbound` instead. */
|
|
1716
|
+
export type Outbound = RunAgentResponseFormatJsonSchema$Outbound;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
export function runAgentResponseFormatJsonSchemaToJSON(
|
|
1720
|
+
runAgentResponseFormatJsonSchema: RunAgentResponseFormatJsonSchema,
|
|
1721
|
+
): string {
|
|
1722
|
+
return JSON.stringify(
|
|
1723
|
+
RunAgentResponseFormatJsonSchema$outboundSchema.parse(
|
|
1724
|
+
runAgentResponseFormatJsonSchema,
|
|
1725
|
+
),
|
|
1726
|
+
);
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
export function runAgentResponseFormatJsonSchemaFromJSON(
|
|
1730
|
+
jsonString: string,
|
|
1731
|
+
): SafeParseResult<RunAgentResponseFormatJsonSchema, SDKValidationError> {
|
|
1732
|
+
return safeParse(
|
|
1733
|
+
jsonString,
|
|
1734
|
+
(x) => RunAgentResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
1735
|
+
`Failed to parse 'RunAgentResponseFormatJsonSchema' from JSON`,
|
|
1736
|
+
);
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
/** @internal */
|
|
1740
|
+
export const RunAgentResponseFormat3$inboundSchema: z.ZodType<
|
|
1741
|
+
RunAgentResponseFormat3,
|
|
1742
|
+
z.ZodTypeDef,
|
|
1743
|
+
unknown
|
|
1744
|
+
> = z.object({
|
|
1745
|
+
type: RunAgentResponseFormatAgentsRequestType$inboundSchema,
|
|
1746
|
+
json_schema: z.lazy(() => RunAgentResponseFormatJsonSchema$inboundSchema),
|
|
1747
|
+
}).transform((v) => {
|
|
1748
|
+
return remap$(v, {
|
|
1749
|
+
"json_schema": "jsonSchema",
|
|
1750
|
+
});
|
|
1751
|
+
});
|
|
1752
|
+
|
|
1753
|
+
/** @internal */
|
|
1754
|
+
export type RunAgentResponseFormat3$Outbound = {
|
|
1755
|
+
type: string;
|
|
1756
|
+
json_schema: RunAgentResponseFormatJsonSchema$Outbound;
|
|
1757
|
+
};
|
|
1758
|
+
|
|
1759
|
+
/** @internal */
|
|
1760
|
+
export const RunAgentResponseFormat3$outboundSchema: z.ZodType<
|
|
1761
|
+
RunAgentResponseFormat3$Outbound,
|
|
1762
|
+
z.ZodTypeDef,
|
|
1763
|
+
RunAgentResponseFormat3
|
|
1764
|
+
> = z.object({
|
|
1765
|
+
type: RunAgentResponseFormatAgentsRequestType$outboundSchema,
|
|
1766
|
+
jsonSchema: z.lazy(() => RunAgentResponseFormatJsonSchema$outboundSchema),
|
|
1767
|
+
}).transform((v) => {
|
|
1768
|
+
return remap$(v, {
|
|
1769
|
+
jsonSchema: "json_schema",
|
|
1770
|
+
});
|
|
1771
|
+
});
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* @internal
|
|
1775
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1776
|
+
*/
|
|
1777
|
+
export namespace RunAgentResponseFormat3$ {
|
|
1778
|
+
/** @deprecated use `RunAgentResponseFormat3$inboundSchema` instead. */
|
|
1779
|
+
export const inboundSchema = RunAgentResponseFormat3$inboundSchema;
|
|
1780
|
+
/** @deprecated use `RunAgentResponseFormat3$outboundSchema` instead. */
|
|
1781
|
+
export const outboundSchema = RunAgentResponseFormat3$outboundSchema;
|
|
1782
|
+
/** @deprecated use `RunAgentResponseFormat3$Outbound` instead. */
|
|
1783
|
+
export type Outbound = RunAgentResponseFormat3$Outbound;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
export function runAgentResponseFormat3ToJSON(
|
|
1787
|
+
runAgentResponseFormat3: RunAgentResponseFormat3,
|
|
1788
|
+
): string {
|
|
1789
|
+
return JSON.stringify(
|
|
1790
|
+
RunAgentResponseFormat3$outboundSchema.parse(runAgentResponseFormat3),
|
|
1791
|
+
);
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
export function runAgentResponseFormat3FromJSON(
|
|
1795
|
+
jsonString: string,
|
|
1796
|
+
): SafeParseResult<RunAgentResponseFormat3, SDKValidationError> {
|
|
1797
|
+
return safeParse(
|
|
1798
|
+
jsonString,
|
|
1799
|
+
(x) => RunAgentResponseFormat3$inboundSchema.parse(JSON.parse(x)),
|
|
1800
|
+
`Failed to parse 'RunAgentResponseFormat3' from JSON`,
|
|
1801
|
+
);
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
/** @internal */
|
|
1805
|
+
export const RunAgentResponseFormatAgentsType$inboundSchema: z.ZodNativeEnum<
|
|
1806
|
+
typeof RunAgentResponseFormatAgentsType
|
|
1807
|
+
> = z.nativeEnum(RunAgentResponseFormatAgentsType);
|
|
1808
|
+
|
|
1809
|
+
/** @internal */
|
|
1810
|
+
export const RunAgentResponseFormatAgentsType$outboundSchema: z.ZodNativeEnum<
|
|
1811
|
+
typeof RunAgentResponseFormatAgentsType
|
|
1812
|
+
> = RunAgentResponseFormatAgentsType$inboundSchema;
|
|
1813
|
+
|
|
1814
|
+
/**
|
|
1815
|
+
* @internal
|
|
1816
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1817
|
+
*/
|
|
1818
|
+
export namespace RunAgentResponseFormatAgentsType$ {
|
|
1819
|
+
/** @deprecated use `RunAgentResponseFormatAgentsType$inboundSchema` instead. */
|
|
1820
|
+
export const inboundSchema = RunAgentResponseFormatAgentsType$inboundSchema;
|
|
1821
|
+
/** @deprecated use `RunAgentResponseFormatAgentsType$outboundSchema` instead. */
|
|
1822
|
+
export const outboundSchema = RunAgentResponseFormatAgentsType$outboundSchema;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
/** @internal */
|
|
1826
|
+
export const RunAgentResponseFormat2$inboundSchema: z.ZodType<
|
|
1827
|
+
RunAgentResponseFormat2,
|
|
1828
|
+
z.ZodTypeDef,
|
|
1829
|
+
unknown
|
|
1830
|
+
> = z.object({
|
|
1831
|
+
type: RunAgentResponseFormatAgentsType$inboundSchema,
|
|
1832
|
+
});
|
|
1833
|
+
|
|
1834
|
+
/** @internal */
|
|
1835
|
+
export type RunAgentResponseFormat2$Outbound = {
|
|
1836
|
+
type: string;
|
|
1837
|
+
};
|
|
1838
|
+
|
|
1839
|
+
/** @internal */
|
|
1840
|
+
export const RunAgentResponseFormat2$outboundSchema: z.ZodType<
|
|
1841
|
+
RunAgentResponseFormat2$Outbound,
|
|
1842
|
+
z.ZodTypeDef,
|
|
1843
|
+
RunAgentResponseFormat2
|
|
1844
|
+
> = z.object({
|
|
1845
|
+
type: RunAgentResponseFormatAgentsType$outboundSchema,
|
|
1846
|
+
});
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* @internal
|
|
1850
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1851
|
+
*/
|
|
1852
|
+
export namespace RunAgentResponseFormat2$ {
|
|
1853
|
+
/** @deprecated use `RunAgentResponseFormat2$inboundSchema` instead. */
|
|
1854
|
+
export const inboundSchema = RunAgentResponseFormat2$inboundSchema;
|
|
1855
|
+
/** @deprecated use `RunAgentResponseFormat2$outboundSchema` instead. */
|
|
1856
|
+
export const outboundSchema = RunAgentResponseFormat2$outboundSchema;
|
|
1857
|
+
/** @deprecated use `RunAgentResponseFormat2$Outbound` instead. */
|
|
1858
|
+
export type Outbound = RunAgentResponseFormat2$Outbound;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
export function runAgentResponseFormat2ToJSON(
|
|
1862
|
+
runAgentResponseFormat2: RunAgentResponseFormat2,
|
|
1863
|
+
): string {
|
|
1864
|
+
return JSON.stringify(
|
|
1865
|
+
RunAgentResponseFormat2$outboundSchema.parse(runAgentResponseFormat2),
|
|
1866
|
+
);
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
export function runAgentResponseFormat2FromJSON(
|
|
1870
|
+
jsonString: string,
|
|
1871
|
+
): SafeParseResult<RunAgentResponseFormat2, SDKValidationError> {
|
|
1872
|
+
return safeParse(
|
|
1873
|
+
jsonString,
|
|
1874
|
+
(x) => RunAgentResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
1875
|
+
`Failed to parse 'RunAgentResponseFormat2' from JSON`,
|
|
1876
|
+
);
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
/** @internal */
|
|
1880
|
+
export const RunAgentResponseFormatType$inboundSchema: z.ZodNativeEnum<
|
|
1881
|
+
typeof RunAgentResponseFormatType
|
|
1882
|
+
> = z.nativeEnum(RunAgentResponseFormatType);
|
|
1883
|
+
|
|
1884
|
+
/** @internal */
|
|
1885
|
+
export const RunAgentResponseFormatType$outboundSchema: z.ZodNativeEnum<
|
|
1886
|
+
typeof RunAgentResponseFormatType
|
|
1887
|
+
> = RunAgentResponseFormatType$inboundSchema;
|
|
1888
|
+
|
|
1889
|
+
/**
|
|
1890
|
+
* @internal
|
|
1891
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1892
|
+
*/
|
|
1893
|
+
export namespace RunAgentResponseFormatType$ {
|
|
1894
|
+
/** @deprecated use `RunAgentResponseFormatType$inboundSchema` instead. */
|
|
1895
|
+
export const inboundSchema = RunAgentResponseFormatType$inboundSchema;
|
|
1896
|
+
/** @deprecated use `RunAgentResponseFormatType$outboundSchema` instead. */
|
|
1897
|
+
export const outboundSchema = RunAgentResponseFormatType$outboundSchema;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
/** @internal */
|
|
1901
|
+
export const RunAgentResponseFormat1$inboundSchema: z.ZodType<
|
|
1902
|
+
RunAgentResponseFormat1,
|
|
1903
|
+
z.ZodTypeDef,
|
|
1904
|
+
unknown
|
|
1905
|
+
> = z.object({
|
|
1906
|
+
type: RunAgentResponseFormatType$inboundSchema,
|
|
1907
|
+
});
|
|
1908
|
+
|
|
1909
|
+
/** @internal */
|
|
1910
|
+
export type RunAgentResponseFormat1$Outbound = {
|
|
1911
|
+
type: string;
|
|
1912
|
+
};
|
|
1913
|
+
|
|
1914
|
+
/** @internal */
|
|
1915
|
+
export const RunAgentResponseFormat1$outboundSchema: z.ZodType<
|
|
1916
|
+
RunAgentResponseFormat1$Outbound,
|
|
1917
|
+
z.ZodTypeDef,
|
|
1918
|
+
RunAgentResponseFormat1
|
|
1919
|
+
> = z.object({
|
|
1920
|
+
type: RunAgentResponseFormatType$outboundSchema,
|
|
1921
|
+
});
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* @internal
|
|
1925
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1926
|
+
*/
|
|
1927
|
+
export namespace RunAgentResponseFormat1$ {
|
|
1928
|
+
/** @deprecated use `RunAgentResponseFormat1$inboundSchema` instead. */
|
|
1929
|
+
export const inboundSchema = RunAgentResponseFormat1$inboundSchema;
|
|
1930
|
+
/** @deprecated use `RunAgentResponseFormat1$outboundSchema` instead. */
|
|
1931
|
+
export const outboundSchema = RunAgentResponseFormat1$outboundSchema;
|
|
1932
|
+
/** @deprecated use `RunAgentResponseFormat1$Outbound` instead. */
|
|
1933
|
+
export type Outbound = RunAgentResponseFormat1$Outbound;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
export function runAgentResponseFormat1ToJSON(
|
|
1937
|
+
runAgentResponseFormat1: RunAgentResponseFormat1,
|
|
1938
|
+
): string {
|
|
1939
|
+
return JSON.stringify(
|
|
1940
|
+
RunAgentResponseFormat1$outboundSchema.parse(runAgentResponseFormat1),
|
|
1941
|
+
);
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
export function runAgentResponseFormat1FromJSON(
|
|
1945
|
+
jsonString: string,
|
|
1946
|
+
): SafeParseResult<RunAgentResponseFormat1, SDKValidationError> {
|
|
1947
|
+
return safeParse(
|
|
1948
|
+
jsonString,
|
|
1949
|
+
(x) => RunAgentResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
1950
|
+
`Failed to parse 'RunAgentResponseFormat1' from JSON`,
|
|
1951
|
+
);
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
/** @internal */
|
|
1955
|
+
export const RunAgentModelResponseFormat$inboundSchema: z.ZodType<
|
|
1956
|
+
RunAgentModelResponseFormat,
|
|
1957
|
+
z.ZodTypeDef,
|
|
1958
|
+
unknown
|
|
1959
|
+
> = z.union([
|
|
1960
|
+
z.lazy(() => RunAgentResponseFormat3$inboundSchema),
|
|
1961
|
+
z.lazy(() => RunAgentResponseFormat1$inboundSchema),
|
|
1962
|
+
z.lazy(() => RunAgentResponseFormat2$inboundSchema),
|
|
1963
|
+
]);
|
|
1964
|
+
|
|
1965
|
+
/** @internal */
|
|
1966
|
+
export type RunAgentModelResponseFormat$Outbound =
|
|
1967
|
+
| RunAgentResponseFormat3$Outbound
|
|
1968
|
+
| RunAgentResponseFormat1$Outbound
|
|
1969
|
+
| RunAgentResponseFormat2$Outbound;
|
|
1970
|
+
|
|
1971
|
+
/** @internal */
|
|
1972
|
+
export const RunAgentModelResponseFormat$outboundSchema: z.ZodType<
|
|
1973
|
+
RunAgentModelResponseFormat$Outbound,
|
|
1974
|
+
z.ZodTypeDef,
|
|
1975
|
+
RunAgentModelResponseFormat
|
|
1976
|
+
> = z.union([
|
|
1977
|
+
z.lazy(() => RunAgentResponseFormat3$outboundSchema),
|
|
1978
|
+
z.lazy(() => RunAgentResponseFormat1$outboundSchema),
|
|
1979
|
+
z.lazy(() => RunAgentResponseFormat2$outboundSchema),
|
|
1980
|
+
]);
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* @internal
|
|
1984
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1985
|
+
*/
|
|
1986
|
+
export namespace RunAgentModelResponseFormat$ {
|
|
1987
|
+
/** @deprecated use `RunAgentModelResponseFormat$inboundSchema` instead. */
|
|
1988
|
+
export const inboundSchema = RunAgentModelResponseFormat$inboundSchema;
|
|
1989
|
+
/** @deprecated use `RunAgentModelResponseFormat$outboundSchema` instead. */
|
|
1990
|
+
export const outboundSchema = RunAgentModelResponseFormat$outboundSchema;
|
|
1991
|
+
/** @deprecated use `RunAgentModelResponseFormat$Outbound` instead. */
|
|
1992
|
+
export type Outbound = RunAgentModelResponseFormat$Outbound;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
export function runAgentModelResponseFormatToJSON(
|
|
1996
|
+
runAgentModelResponseFormat: RunAgentModelResponseFormat,
|
|
1997
|
+
): string {
|
|
1998
|
+
return JSON.stringify(
|
|
1999
|
+
RunAgentModelResponseFormat$outboundSchema.parse(
|
|
2000
|
+
runAgentModelResponseFormat,
|
|
2001
|
+
),
|
|
2002
|
+
);
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
export function runAgentModelResponseFormatFromJSON(
|
|
2006
|
+
jsonString: string,
|
|
2007
|
+
): SafeParseResult<RunAgentModelResponseFormat, SDKValidationError> {
|
|
2008
|
+
return safeParse(
|
|
2009
|
+
jsonString,
|
|
2010
|
+
(x) => RunAgentModelResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
2011
|
+
`Failed to parse 'RunAgentModelResponseFormat' from JSON`,
|
|
2012
|
+
);
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
/** @internal */
|
|
2016
|
+
export const RunAgentModelStop$inboundSchema: z.ZodType<
|
|
2017
|
+
RunAgentModelStop,
|
|
2018
|
+
z.ZodTypeDef,
|
|
2019
|
+
unknown
|
|
2020
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
2021
|
+
|
|
2022
|
+
/** @internal */
|
|
2023
|
+
export type RunAgentModelStop$Outbound = string | Array<string>;
|
|
2024
|
+
|
|
2025
|
+
/** @internal */
|
|
2026
|
+
export const RunAgentModelStop$outboundSchema: z.ZodType<
|
|
2027
|
+
RunAgentModelStop$Outbound,
|
|
2028
|
+
z.ZodTypeDef,
|
|
2029
|
+
RunAgentModelStop
|
|
2030
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* @internal
|
|
2034
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2035
|
+
*/
|
|
2036
|
+
export namespace RunAgentModelStop$ {
|
|
2037
|
+
/** @deprecated use `RunAgentModelStop$inboundSchema` instead. */
|
|
2038
|
+
export const inboundSchema = RunAgentModelStop$inboundSchema;
|
|
2039
|
+
/** @deprecated use `RunAgentModelStop$outboundSchema` instead. */
|
|
2040
|
+
export const outboundSchema = RunAgentModelStop$outboundSchema;
|
|
2041
|
+
/** @deprecated use `RunAgentModelStop$Outbound` instead. */
|
|
2042
|
+
export type Outbound = RunAgentModelStop$Outbound;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
export function runAgentModelStopToJSON(
|
|
2046
|
+
runAgentModelStop: RunAgentModelStop,
|
|
2047
|
+
): string {
|
|
2048
|
+
return JSON.stringify(
|
|
2049
|
+
RunAgentModelStop$outboundSchema.parse(runAgentModelStop),
|
|
2050
|
+
);
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
export function runAgentModelStopFromJSON(
|
|
2054
|
+
jsonString: string,
|
|
2055
|
+
): SafeParseResult<RunAgentModelStop, SDKValidationError> {
|
|
2056
|
+
return safeParse(
|
|
2057
|
+
jsonString,
|
|
2058
|
+
(x) => RunAgentModelStop$inboundSchema.parse(JSON.parse(x)),
|
|
2059
|
+
`Failed to parse 'RunAgentModelStop' from JSON`,
|
|
2060
|
+
);
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/** @internal */
|
|
2064
|
+
export const RunAgentModelStreamOptions$inboundSchema: z.ZodType<
|
|
2065
|
+
RunAgentModelStreamOptions,
|
|
2066
|
+
z.ZodTypeDef,
|
|
2067
|
+
unknown
|
|
2068
|
+
> = z.object({
|
|
2069
|
+
include_usage: z.boolean().optional(),
|
|
2070
|
+
}).transform((v) => {
|
|
2071
|
+
return remap$(v, {
|
|
2072
|
+
"include_usage": "includeUsage",
|
|
2073
|
+
});
|
|
2074
|
+
});
|
|
2075
|
+
|
|
2076
|
+
/** @internal */
|
|
2077
|
+
export type RunAgentModelStreamOptions$Outbound = {
|
|
2078
|
+
include_usage?: boolean | undefined;
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2081
|
+
/** @internal */
|
|
2082
|
+
export const RunAgentModelStreamOptions$outboundSchema: z.ZodType<
|
|
2083
|
+
RunAgentModelStreamOptions$Outbound,
|
|
2084
|
+
z.ZodTypeDef,
|
|
2085
|
+
RunAgentModelStreamOptions
|
|
2086
|
+
> = z.object({
|
|
2087
|
+
includeUsage: z.boolean().optional(),
|
|
2088
|
+
}).transform((v) => {
|
|
2089
|
+
return remap$(v, {
|
|
2090
|
+
includeUsage: "include_usage",
|
|
2091
|
+
});
|
|
2092
|
+
});
|
|
2093
|
+
|
|
2094
|
+
/**
|
|
2095
|
+
* @internal
|
|
2096
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2097
|
+
*/
|
|
2098
|
+
export namespace RunAgentModelStreamOptions$ {
|
|
2099
|
+
/** @deprecated use `RunAgentModelStreamOptions$inboundSchema` instead. */
|
|
2100
|
+
export const inboundSchema = RunAgentModelStreamOptions$inboundSchema;
|
|
2101
|
+
/** @deprecated use `RunAgentModelStreamOptions$outboundSchema` instead. */
|
|
2102
|
+
export const outboundSchema = RunAgentModelStreamOptions$outboundSchema;
|
|
2103
|
+
/** @deprecated use `RunAgentModelStreamOptions$Outbound` instead. */
|
|
2104
|
+
export type Outbound = RunAgentModelStreamOptions$Outbound;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
export function runAgentModelStreamOptionsToJSON(
|
|
2108
|
+
runAgentModelStreamOptions: RunAgentModelStreamOptions,
|
|
2109
|
+
): string {
|
|
2110
|
+
return JSON.stringify(
|
|
2111
|
+
RunAgentModelStreamOptions$outboundSchema.parse(runAgentModelStreamOptions),
|
|
2112
|
+
);
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
export function runAgentModelStreamOptionsFromJSON(
|
|
2116
|
+
jsonString: string,
|
|
2117
|
+
): SafeParseResult<RunAgentModelStreamOptions, SDKValidationError> {
|
|
2118
|
+
return safeParse(
|
|
2119
|
+
jsonString,
|
|
2120
|
+
(x) => RunAgentModelStreamOptions$inboundSchema.parse(JSON.parse(x)),
|
|
2121
|
+
`Failed to parse 'RunAgentModelStreamOptions' from JSON`,
|
|
2122
|
+
);
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
/** @internal */
|
|
2126
|
+
export const RunAgentModelType$inboundSchema: z.ZodNativeEnum<
|
|
2127
|
+
typeof RunAgentModelType
|
|
2128
|
+
> = z.nativeEnum(RunAgentModelType);
|
|
2129
|
+
|
|
2130
|
+
/** @internal */
|
|
2131
|
+
export const RunAgentModelType$outboundSchema: z.ZodNativeEnum<
|
|
2132
|
+
typeof RunAgentModelType
|
|
2133
|
+
> = RunAgentModelType$inboundSchema;
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* @internal
|
|
2137
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2138
|
+
*/
|
|
2139
|
+
export namespace RunAgentModelType$ {
|
|
2140
|
+
/** @deprecated use `RunAgentModelType$inboundSchema` instead. */
|
|
2141
|
+
export const inboundSchema = RunAgentModelType$inboundSchema;
|
|
2142
|
+
/** @deprecated use `RunAgentModelType$outboundSchema` instead. */
|
|
2143
|
+
export const outboundSchema = RunAgentModelType$outboundSchema;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
/** @internal */
|
|
2147
|
+
export const RunAgentModelThinking$inboundSchema: z.ZodType<
|
|
2148
|
+
RunAgentModelThinking,
|
|
2149
|
+
z.ZodTypeDef,
|
|
2150
|
+
unknown
|
|
2151
|
+
> = z.object({
|
|
2152
|
+
type: RunAgentModelType$inboundSchema,
|
|
2153
|
+
budget_tokens: z.number(),
|
|
2154
|
+
}).transform((v) => {
|
|
2155
|
+
return remap$(v, {
|
|
2156
|
+
"budget_tokens": "budgetTokens",
|
|
2157
|
+
});
|
|
2158
|
+
});
|
|
2159
|
+
|
|
2160
|
+
/** @internal */
|
|
2161
|
+
export type RunAgentModelThinking$Outbound = {
|
|
2162
|
+
type: string;
|
|
2163
|
+
budget_tokens: number;
|
|
2164
|
+
};
|
|
2165
|
+
|
|
2166
|
+
/** @internal */
|
|
2167
|
+
export const RunAgentModelThinking$outboundSchema: z.ZodType<
|
|
2168
|
+
RunAgentModelThinking$Outbound,
|
|
2169
|
+
z.ZodTypeDef,
|
|
2170
|
+
RunAgentModelThinking
|
|
2171
|
+
> = z.object({
|
|
2172
|
+
type: RunAgentModelType$outboundSchema,
|
|
2173
|
+
budgetTokens: z.number(),
|
|
2174
|
+
}).transform((v) => {
|
|
2175
|
+
return remap$(v, {
|
|
2176
|
+
budgetTokens: "budget_tokens",
|
|
2177
|
+
});
|
|
2178
|
+
});
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* @internal
|
|
2182
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2183
|
+
*/
|
|
2184
|
+
export namespace RunAgentModelThinking$ {
|
|
2185
|
+
/** @deprecated use `RunAgentModelThinking$inboundSchema` instead. */
|
|
2186
|
+
export const inboundSchema = RunAgentModelThinking$inboundSchema;
|
|
2187
|
+
/** @deprecated use `RunAgentModelThinking$outboundSchema` instead. */
|
|
2188
|
+
export const outboundSchema = RunAgentModelThinking$outboundSchema;
|
|
2189
|
+
/** @deprecated use `RunAgentModelThinking$Outbound` instead. */
|
|
2190
|
+
export type Outbound = RunAgentModelThinking$Outbound;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
export function runAgentModelThinkingToJSON(
|
|
2194
|
+
runAgentModelThinking: RunAgentModelThinking,
|
|
2195
|
+
): string {
|
|
2196
|
+
return JSON.stringify(
|
|
2197
|
+
RunAgentModelThinking$outboundSchema.parse(runAgentModelThinking),
|
|
2198
|
+
);
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
export function runAgentModelThinkingFromJSON(
|
|
2202
|
+
jsonString: string,
|
|
2203
|
+
): SafeParseResult<RunAgentModelThinking, SDKValidationError> {
|
|
2204
|
+
return safeParse(
|
|
2205
|
+
jsonString,
|
|
2206
|
+
(x) => RunAgentModelThinking$inboundSchema.parse(JSON.parse(x)),
|
|
2207
|
+
`Failed to parse 'RunAgentModelThinking' from JSON`,
|
|
2208
|
+
);
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
/** @internal */
|
|
2212
|
+
export const RunAgentToolChoiceType$inboundSchema: z.ZodNativeEnum<
|
|
2213
|
+
typeof RunAgentToolChoiceType
|
|
2214
|
+
> = z.nativeEnum(RunAgentToolChoiceType);
|
|
2215
|
+
|
|
2216
|
+
/** @internal */
|
|
2217
|
+
export const RunAgentToolChoiceType$outboundSchema: z.ZodNativeEnum<
|
|
2218
|
+
typeof RunAgentToolChoiceType
|
|
2219
|
+
> = RunAgentToolChoiceType$inboundSchema;
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* @internal
|
|
2223
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2224
|
+
*/
|
|
2225
|
+
export namespace RunAgentToolChoiceType$ {
|
|
2226
|
+
/** @deprecated use `RunAgentToolChoiceType$inboundSchema` instead. */
|
|
2227
|
+
export const inboundSchema = RunAgentToolChoiceType$inboundSchema;
|
|
2228
|
+
/** @deprecated use `RunAgentToolChoiceType$outboundSchema` instead. */
|
|
2229
|
+
export const outboundSchema = RunAgentToolChoiceType$outboundSchema;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
/** @internal */
|
|
2233
|
+
export const RunAgentToolChoiceFunction$inboundSchema: z.ZodType<
|
|
2234
|
+
RunAgentToolChoiceFunction,
|
|
2235
|
+
z.ZodTypeDef,
|
|
2236
|
+
unknown
|
|
2237
|
+
> = z.object({
|
|
2238
|
+
name: z.string().optional(),
|
|
2239
|
+
});
|
|
2240
|
+
|
|
2241
|
+
/** @internal */
|
|
2242
|
+
export type RunAgentToolChoiceFunction$Outbound = {
|
|
2243
|
+
name?: string | undefined;
|
|
2244
|
+
};
|
|
2245
|
+
|
|
2246
|
+
/** @internal */
|
|
2247
|
+
export const RunAgentToolChoiceFunction$outboundSchema: z.ZodType<
|
|
2248
|
+
RunAgentToolChoiceFunction$Outbound,
|
|
2249
|
+
z.ZodTypeDef,
|
|
2250
|
+
RunAgentToolChoiceFunction
|
|
2251
|
+
> = z.object({
|
|
2252
|
+
name: z.string().optional(),
|
|
2253
|
+
});
|
|
2254
|
+
|
|
2255
|
+
/**
|
|
2256
|
+
* @internal
|
|
2257
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2258
|
+
*/
|
|
2259
|
+
export namespace RunAgentToolChoiceFunction$ {
|
|
2260
|
+
/** @deprecated use `RunAgentToolChoiceFunction$inboundSchema` instead. */
|
|
2261
|
+
export const inboundSchema = RunAgentToolChoiceFunction$inboundSchema;
|
|
2262
|
+
/** @deprecated use `RunAgentToolChoiceFunction$outboundSchema` instead. */
|
|
2263
|
+
export const outboundSchema = RunAgentToolChoiceFunction$outboundSchema;
|
|
2264
|
+
/** @deprecated use `RunAgentToolChoiceFunction$Outbound` instead. */
|
|
2265
|
+
export type Outbound = RunAgentToolChoiceFunction$Outbound;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
export function runAgentToolChoiceFunctionToJSON(
|
|
2269
|
+
runAgentToolChoiceFunction: RunAgentToolChoiceFunction,
|
|
2270
|
+
): string {
|
|
2271
|
+
return JSON.stringify(
|
|
2272
|
+
RunAgentToolChoiceFunction$outboundSchema.parse(runAgentToolChoiceFunction),
|
|
2273
|
+
);
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
export function runAgentToolChoiceFunctionFromJSON(
|
|
2277
|
+
jsonString: string,
|
|
2278
|
+
): SafeParseResult<RunAgentToolChoiceFunction, SDKValidationError> {
|
|
2279
|
+
return safeParse(
|
|
2280
|
+
jsonString,
|
|
2281
|
+
(x) => RunAgentToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
|
|
2282
|
+
`Failed to parse 'RunAgentToolChoiceFunction' from JSON`,
|
|
2283
|
+
);
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
/** @internal */
|
|
2287
|
+
export const RunAgentToolChoice2$inboundSchema: z.ZodType<
|
|
2288
|
+
RunAgentToolChoice2,
|
|
2289
|
+
z.ZodTypeDef,
|
|
2290
|
+
unknown
|
|
2291
|
+
> = z.object({
|
|
2292
|
+
type: RunAgentToolChoiceType$inboundSchema.optional(),
|
|
2293
|
+
function: z.lazy(() => RunAgentToolChoiceFunction$inboundSchema),
|
|
2294
|
+
});
|
|
2295
|
+
|
|
2296
|
+
/** @internal */
|
|
2297
|
+
export type RunAgentToolChoice2$Outbound = {
|
|
2298
|
+
type?: string | undefined;
|
|
2299
|
+
function: RunAgentToolChoiceFunction$Outbound;
|
|
2300
|
+
};
|
|
2301
|
+
|
|
2302
|
+
/** @internal */
|
|
2303
|
+
export const RunAgentToolChoice2$outboundSchema: z.ZodType<
|
|
2304
|
+
RunAgentToolChoice2$Outbound,
|
|
2305
|
+
z.ZodTypeDef,
|
|
2306
|
+
RunAgentToolChoice2
|
|
2307
|
+
> = z.object({
|
|
2308
|
+
type: RunAgentToolChoiceType$outboundSchema.optional(),
|
|
2309
|
+
function: z.lazy(() => RunAgentToolChoiceFunction$outboundSchema),
|
|
2310
|
+
});
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* @internal
|
|
2314
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2315
|
+
*/
|
|
2316
|
+
export namespace RunAgentToolChoice2$ {
|
|
2317
|
+
/** @deprecated use `RunAgentToolChoice2$inboundSchema` instead. */
|
|
2318
|
+
export const inboundSchema = RunAgentToolChoice2$inboundSchema;
|
|
2319
|
+
/** @deprecated use `RunAgentToolChoice2$outboundSchema` instead. */
|
|
2320
|
+
export const outboundSchema = RunAgentToolChoice2$outboundSchema;
|
|
2321
|
+
/** @deprecated use `RunAgentToolChoice2$Outbound` instead. */
|
|
2322
|
+
export type Outbound = RunAgentToolChoice2$Outbound;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
export function runAgentToolChoice2ToJSON(
|
|
2326
|
+
runAgentToolChoice2: RunAgentToolChoice2,
|
|
2327
|
+
): string {
|
|
2328
|
+
return JSON.stringify(
|
|
2329
|
+
RunAgentToolChoice2$outboundSchema.parse(runAgentToolChoice2),
|
|
2330
|
+
);
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
export function runAgentToolChoice2FromJSON(
|
|
2334
|
+
jsonString: string,
|
|
2335
|
+
): SafeParseResult<RunAgentToolChoice2, SDKValidationError> {
|
|
2336
|
+
return safeParse(
|
|
2337
|
+
jsonString,
|
|
2338
|
+
(x) => RunAgentToolChoice2$inboundSchema.parse(JSON.parse(x)),
|
|
2339
|
+
`Failed to parse 'RunAgentToolChoice2' from JSON`,
|
|
2340
|
+
);
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
/** @internal */
|
|
2344
|
+
export const RunAgentToolChoice1$inboundSchema: z.ZodNativeEnum<
|
|
2345
|
+
typeof RunAgentToolChoice1
|
|
2346
|
+
> = z.nativeEnum(RunAgentToolChoice1);
|
|
2347
|
+
|
|
2348
|
+
/** @internal */
|
|
2349
|
+
export const RunAgentToolChoice1$outboundSchema: z.ZodNativeEnum<
|
|
2350
|
+
typeof RunAgentToolChoice1
|
|
2351
|
+
> = RunAgentToolChoice1$inboundSchema;
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* @internal
|
|
2355
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2356
|
+
*/
|
|
2357
|
+
export namespace RunAgentToolChoice1$ {
|
|
2358
|
+
/** @deprecated use `RunAgentToolChoice1$inboundSchema` instead. */
|
|
2359
|
+
export const inboundSchema = RunAgentToolChoice1$inboundSchema;
|
|
2360
|
+
/** @deprecated use `RunAgentToolChoice1$outboundSchema` instead. */
|
|
2361
|
+
export const outboundSchema = RunAgentToolChoice1$outboundSchema;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
/** @internal */
|
|
2365
|
+
export const RunAgentModelToolChoice$inboundSchema: z.ZodType<
|
|
2366
|
+
RunAgentModelToolChoice,
|
|
2367
|
+
z.ZodTypeDef,
|
|
2368
|
+
unknown
|
|
2369
|
+
> = z.union([
|
|
2370
|
+
z.lazy(() => RunAgentToolChoice2$inboundSchema),
|
|
2371
|
+
RunAgentToolChoice1$inboundSchema,
|
|
2372
|
+
]);
|
|
2373
|
+
|
|
2374
|
+
/** @internal */
|
|
2375
|
+
export type RunAgentModelToolChoice$Outbound =
|
|
2376
|
+
| RunAgentToolChoice2$Outbound
|
|
2377
|
+
| string;
|
|
2378
|
+
|
|
2379
|
+
/** @internal */
|
|
2380
|
+
export const RunAgentModelToolChoice$outboundSchema: z.ZodType<
|
|
2381
|
+
RunAgentModelToolChoice$Outbound,
|
|
2382
|
+
z.ZodTypeDef,
|
|
2383
|
+
RunAgentModelToolChoice
|
|
2384
|
+
> = z.union([
|
|
2385
|
+
z.lazy(() => RunAgentToolChoice2$outboundSchema),
|
|
2386
|
+
RunAgentToolChoice1$outboundSchema,
|
|
2387
|
+
]);
|
|
2388
|
+
|
|
2389
|
+
/**
|
|
2390
|
+
* @internal
|
|
2391
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2392
|
+
*/
|
|
2393
|
+
export namespace RunAgentModelToolChoice$ {
|
|
2394
|
+
/** @deprecated use `RunAgentModelToolChoice$inboundSchema` instead. */
|
|
2395
|
+
export const inboundSchema = RunAgentModelToolChoice$inboundSchema;
|
|
2396
|
+
/** @deprecated use `RunAgentModelToolChoice$outboundSchema` instead. */
|
|
2397
|
+
export const outboundSchema = RunAgentModelToolChoice$outboundSchema;
|
|
2398
|
+
/** @deprecated use `RunAgentModelToolChoice$Outbound` instead. */
|
|
2399
|
+
export type Outbound = RunAgentModelToolChoice$Outbound;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
export function runAgentModelToolChoiceToJSON(
|
|
2403
|
+
runAgentModelToolChoice: RunAgentModelToolChoice,
|
|
2404
|
+
): string {
|
|
2405
|
+
return JSON.stringify(
|
|
2406
|
+
RunAgentModelToolChoice$outboundSchema.parse(runAgentModelToolChoice),
|
|
2407
|
+
);
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
export function runAgentModelToolChoiceFromJSON(
|
|
2411
|
+
jsonString: string,
|
|
2412
|
+
): SafeParseResult<RunAgentModelToolChoice, SDKValidationError> {
|
|
2413
|
+
return safeParse(
|
|
2414
|
+
jsonString,
|
|
2415
|
+
(x) => RunAgentModelToolChoice$inboundSchema.parse(JSON.parse(x)),
|
|
2416
|
+
`Failed to parse 'RunAgentModelToolChoice' from JSON`,
|
|
2417
|
+
);
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
/** @internal */
|
|
2421
|
+
export const RunAgentModelModalities$inboundSchema: z.ZodNativeEnum<
|
|
2422
|
+
typeof RunAgentModelModalities
|
|
2423
|
+
> = z.nativeEnum(RunAgentModelModalities);
|
|
2424
|
+
|
|
2425
|
+
/** @internal */
|
|
2426
|
+
export const RunAgentModelModalities$outboundSchema: z.ZodNativeEnum<
|
|
2427
|
+
typeof RunAgentModelModalities
|
|
2428
|
+
> = RunAgentModelModalities$inboundSchema;
|
|
2429
|
+
|
|
2430
|
+
/**
|
|
2431
|
+
* @internal
|
|
2432
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2433
|
+
*/
|
|
2434
|
+
export namespace RunAgentModelModalities$ {
|
|
2435
|
+
/** @deprecated use `RunAgentModelModalities$inboundSchema` instead. */
|
|
2436
|
+
export const inboundSchema = RunAgentModelModalities$inboundSchema;
|
|
2437
|
+
/** @deprecated use `RunAgentModelModalities$outboundSchema` instead. */
|
|
2438
|
+
export const outboundSchema = RunAgentModelModalities$outboundSchema;
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
/** @internal */
|
|
2442
|
+
export const RunAgentModelWebSearchOptions$inboundSchema: z.ZodType<
|
|
2443
|
+
RunAgentModelWebSearchOptions,
|
|
2444
|
+
z.ZodTypeDef,
|
|
2445
|
+
unknown
|
|
2446
|
+
> = z.object({
|
|
2447
|
+
enabled: z.boolean().optional(),
|
|
2448
|
+
});
|
|
2449
|
+
|
|
2450
|
+
/** @internal */
|
|
2451
|
+
export type RunAgentModelWebSearchOptions$Outbound = {
|
|
2452
|
+
enabled?: boolean | undefined;
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
/** @internal */
|
|
2456
|
+
export const RunAgentModelWebSearchOptions$outboundSchema: z.ZodType<
|
|
2457
|
+
RunAgentModelWebSearchOptions$Outbound,
|
|
2458
|
+
z.ZodTypeDef,
|
|
2459
|
+
RunAgentModelWebSearchOptions
|
|
2460
|
+
> = z.object({
|
|
2461
|
+
enabled: z.boolean().optional(),
|
|
2462
|
+
});
|
|
2463
|
+
|
|
2464
|
+
/**
|
|
2465
|
+
* @internal
|
|
2466
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2467
|
+
*/
|
|
2468
|
+
export namespace RunAgentModelWebSearchOptions$ {
|
|
2469
|
+
/** @deprecated use `RunAgentModelWebSearchOptions$inboundSchema` instead. */
|
|
2470
|
+
export const inboundSchema = RunAgentModelWebSearchOptions$inboundSchema;
|
|
2471
|
+
/** @deprecated use `RunAgentModelWebSearchOptions$outboundSchema` instead. */
|
|
2472
|
+
export const outboundSchema = RunAgentModelWebSearchOptions$outboundSchema;
|
|
2473
|
+
/** @deprecated use `RunAgentModelWebSearchOptions$Outbound` instead. */
|
|
2474
|
+
export type Outbound = RunAgentModelWebSearchOptions$Outbound;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
export function runAgentModelWebSearchOptionsToJSON(
|
|
2478
|
+
runAgentModelWebSearchOptions: RunAgentModelWebSearchOptions,
|
|
2479
|
+
): string {
|
|
2480
|
+
return JSON.stringify(
|
|
2481
|
+
RunAgentModelWebSearchOptions$outboundSchema.parse(
|
|
2482
|
+
runAgentModelWebSearchOptions,
|
|
2483
|
+
),
|
|
2484
|
+
);
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
export function runAgentModelWebSearchOptionsFromJSON(
|
|
2488
|
+
jsonString: string,
|
|
2489
|
+
): SafeParseResult<RunAgentModelWebSearchOptions, SDKValidationError> {
|
|
2490
|
+
return safeParse(
|
|
2491
|
+
jsonString,
|
|
2492
|
+
(x) => RunAgentModelWebSearchOptions$inboundSchema.parse(JSON.parse(x)),
|
|
2493
|
+
`Failed to parse 'RunAgentModelWebSearchOptions' from JSON`,
|
|
2494
|
+
);
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
/** @internal */
|
|
2498
|
+
export const RunAgentModelParameters$inboundSchema: z.ZodType<
|
|
2499
|
+
RunAgentModelParameters,
|
|
2500
|
+
z.ZodTypeDef,
|
|
2501
|
+
unknown
|
|
2502
|
+
> = z.object({
|
|
2503
|
+
audio: z.nullable(z.lazy(() => RunAgentModelAudio$inboundSchema)).optional(),
|
|
2504
|
+
frequency_penalty: z.nullable(z.number()).optional(),
|
|
2505
|
+
max_tokens: z.nullable(z.number().int()).optional(),
|
|
2506
|
+
max_completion_tokens: z.nullable(z.number().int()).optional(),
|
|
2507
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
2508
|
+
top_logprobs: z.nullable(z.number().int()).optional(),
|
|
2509
|
+
n: z.nullable(z.number().int()).optional(),
|
|
2510
|
+
presence_penalty: z.nullable(z.number()).optional(),
|
|
2511
|
+
response_format: z.union([
|
|
2512
|
+
z.lazy(() => RunAgentResponseFormat3$inboundSchema),
|
|
2513
|
+
z.lazy(() => RunAgentResponseFormat1$inboundSchema),
|
|
2514
|
+
z.lazy(() => RunAgentResponseFormat2$inboundSchema),
|
|
2515
|
+
]).optional(),
|
|
2516
|
+
reasoning_effort: z.string().optional(),
|
|
2517
|
+
verbosity: z.string().optional(),
|
|
2518
|
+
seed: z.nullable(z.number()).optional(),
|
|
2519
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
2520
|
+
stream_options: z.nullable(
|
|
2521
|
+
z.lazy(() => RunAgentModelStreamOptions$inboundSchema),
|
|
2522
|
+
).optional(),
|
|
2523
|
+
thinking: z.lazy(() => RunAgentModelThinking$inboundSchema).optional(),
|
|
2524
|
+
temperature: z.nullable(z.number()).optional(),
|
|
2525
|
+
top_p: z.nullable(z.number()).optional(),
|
|
2526
|
+
top_k: z.nullable(z.number()).optional(),
|
|
2527
|
+
tool_choice: z.union([
|
|
2528
|
+
z.lazy(() => RunAgentToolChoice2$inboundSchema),
|
|
2529
|
+
RunAgentToolChoice1$inboundSchema,
|
|
2530
|
+
]).optional(),
|
|
2531
|
+
parallel_tool_calls: z.boolean().optional(),
|
|
2532
|
+
modalities: z.nullable(z.array(RunAgentModelModalities$inboundSchema))
|
|
2533
|
+
.optional(),
|
|
2534
|
+
web_search_options: z.lazy(() => RunAgentModelWebSearchOptions$inboundSchema)
|
|
2535
|
+
.optional(),
|
|
2536
|
+
}).transform((v) => {
|
|
2537
|
+
return remap$(v, {
|
|
2538
|
+
"frequency_penalty": "frequencyPenalty",
|
|
2539
|
+
"max_tokens": "maxTokens",
|
|
2540
|
+
"max_completion_tokens": "maxCompletionTokens",
|
|
2541
|
+
"top_logprobs": "topLogprobs",
|
|
2542
|
+
"presence_penalty": "presencePenalty",
|
|
2543
|
+
"response_format": "responseFormat",
|
|
2544
|
+
"reasoning_effort": "reasoningEffort",
|
|
2545
|
+
"stream_options": "streamOptions",
|
|
2546
|
+
"top_p": "topP",
|
|
2547
|
+
"top_k": "topK",
|
|
2548
|
+
"tool_choice": "toolChoice",
|
|
2549
|
+
"parallel_tool_calls": "parallelToolCalls",
|
|
2550
|
+
"web_search_options": "webSearchOptions",
|
|
2551
|
+
});
|
|
2552
|
+
});
|
|
2553
|
+
|
|
2554
|
+
/** @internal */
|
|
2555
|
+
export type RunAgentModelParameters$Outbound = {
|
|
2556
|
+
audio?: RunAgentModelAudio$Outbound | null | undefined;
|
|
2557
|
+
frequency_penalty?: number | null | undefined;
|
|
2558
|
+
max_tokens?: number | null | undefined;
|
|
2559
|
+
max_completion_tokens?: number | null | undefined;
|
|
2560
|
+
logprobs?: boolean | null | undefined;
|
|
2561
|
+
top_logprobs?: number | null | undefined;
|
|
2562
|
+
n?: number | null | undefined;
|
|
2563
|
+
presence_penalty?: number | null | undefined;
|
|
2564
|
+
response_format?:
|
|
2565
|
+
| RunAgentResponseFormat3$Outbound
|
|
2566
|
+
| RunAgentResponseFormat1$Outbound
|
|
2567
|
+
| RunAgentResponseFormat2$Outbound
|
|
2568
|
+
| undefined;
|
|
2569
|
+
reasoning_effort?: string | undefined;
|
|
2570
|
+
verbosity?: string | undefined;
|
|
2571
|
+
seed?: number | null | undefined;
|
|
2572
|
+
stop?: string | Array<string> | null | undefined;
|
|
2573
|
+
stream_options?: RunAgentModelStreamOptions$Outbound | null | undefined;
|
|
2574
|
+
thinking?: RunAgentModelThinking$Outbound | undefined;
|
|
2575
|
+
temperature?: number | null | undefined;
|
|
2576
|
+
top_p?: number | null | undefined;
|
|
2577
|
+
top_k?: number | null | undefined;
|
|
2578
|
+
tool_choice?: RunAgentToolChoice2$Outbound | string | undefined;
|
|
2579
|
+
parallel_tool_calls?: boolean | undefined;
|
|
2580
|
+
modalities?: Array<string> | null | undefined;
|
|
2581
|
+
web_search_options?: RunAgentModelWebSearchOptions$Outbound | undefined;
|
|
2582
|
+
};
|
|
2583
|
+
|
|
2584
|
+
/** @internal */
|
|
2585
|
+
export const RunAgentModelParameters$outboundSchema: z.ZodType<
|
|
2586
|
+
RunAgentModelParameters$Outbound,
|
|
2587
|
+
z.ZodTypeDef,
|
|
2588
|
+
RunAgentModelParameters
|
|
2589
|
+
> = z.object({
|
|
2590
|
+
audio: z.nullable(z.lazy(() => RunAgentModelAudio$outboundSchema)).optional(),
|
|
2591
|
+
frequencyPenalty: z.nullable(z.number()).optional(),
|
|
2592
|
+
maxTokens: z.nullable(z.number().int()).optional(),
|
|
2593
|
+
maxCompletionTokens: z.nullable(z.number().int()).optional(),
|
|
2594
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
2595
|
+
topLogprobs: z.nullable(z.number().int()).optional(),
|
|
2596
|
+
n: z.nullable(z.number().int()).optional(),
|
|
2597
|
+
presencePenalty: z.nullable(z.number()).optional(),
|
|
2598
|
+
responseFormat: z.union([
|
|
2599
|
+
z.lazy(() => RunAgentResponseFormat3$outboundSchema),
|
|
2600
|
+
z.lazy(() => RunAgentResponseFormat1$outboundSchema),
|
|
2601
|
+
z.lazy(() => RunAgentResponseFormat2$outboundSchema),
|
|
2602
|
+
]).optional(),
|
|
2603
|
+
reasoningEffort: z.string().optional(),
|
|
2604
|
+
verbosity: z.string().optional(),
|
|
2605
|
+
seed: z.nullable(z.number()).optional(),
|
|
2606
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
2607
|
+
streamOptions: z.nullable(
|
|
2608
|
+
z.lazy(() => RunAgentModelStreamOptions$outboundSchema),
|
|
2609
|
+
).optional(),
|
|
2610
|
+
thinking: z.lazy(() => RunAgentModelThinking$outboundSchema).optional(),
|
|
2611
|
+
temperature: z.nullable(z.number()).optional(),
|
|
2612
|
+
topP: z.nullable(z.number()).optional(),
|
|
2613
|
+
topK: z.nullable(z.number()).optional(),
|
|
2614
|
+
toolChoice: z.union([
|
|
2615
|
+
z.lazy(() => RunAgentToolChoice2$outboundSchema),
|
|
2616
|
+
RunAgentToolChoice1$outboundSchema,
|
|
2617
|
+
]).optional(),
|
|
2618
|
+
parallelToolCalls: z.boolean().optional(),
|
|
2619
|
+
modalities: z.nullable(z.array(RunAgentModelModalities$outboundSchema))
|
|
2620
|
+
.optional(),
|
|
2621
|
+
webSearchOptions: z.lazy(() => RunAgentModelWebSearchOptions$outboundSchema)
|
|
2622
|
+
.optional(),
|
|
2623
|
+
}).transform((v) => {
|
|
2624
|
+
return remap$(v, {
|
|
2625
|
+
frequencyPenalty: "frequency_penalty",
|
|
2626
|
+
maxTokens: "max_tokens",
|
|
2627
|
+
maxCompletionTokens: "max_completion_tokens",
|
|
2628
|
+
topLogprobs: "top_logprobs",
|
|
2629
|
+
presencePenalty: "presence_penalty",
|
|
2630
|
+
responseFormat: "response_format",
|
|
2631
|
+
reasoningEffort: "reasoning_effort",
|
|
2632
|
+
streamOptions: "stream_options",
|
|
2633
|
+
topP: "top_p",
|
|
2634
|
+
topK: "top_k",
|
|
2635
|
+
toolChoice: "tool_choice",
|
|
2636
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
2637
|
+
webSearchOptions: "web_search_options",
|
|
2638
|
+
});
|
|
2639
|
+
});
|
|
2640
|
+
|
|
2641
|
+
/**
|
|
2642
|
+
* @internal
|
|
2643
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2644
|
+
*/
|
|
2645
|
+
export namespace RunAgentModelParameters$ {
|
|
2646
|
+
/** @deprecated use `RunAgentModelParameters$inboundSchema` instead. */
|
|
2647
|
+
export const inboundSchema = RunAgentModelParameters$inboundSchema;
|
|
2648
|
+
/** @deprecated use `RunAgentModelParameters$outboundSchema` instead. */
|
|
2649
|
+
export const outboundSchema = RunAgentModelParameters$outboundSchema;
|
|
2650
|
+
/** @deprecated use `RunAgentModelParameters$Outbound` instead. */
|
|
2651
|
+
export type Outbound = RunAgentModelParameters$Outbound;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
export function runAgentModelParametersToJSON(
|
|
2655
|
+
runAgentModelParameters: RunAgentModelParameters,
|
|
2656
|
+
): string {
|
|
2657
|
+
return JSON.stringify(
|
|
2658
|
+
RunAgentModelParameters$outboundSchema.parse(runAgentModelParameters),
|
|
2659
|
+
);
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
export function runAgentModelParametersFromJSON(
|
|
2663
|
+
jsonString: string,
|
|
2664
|
+
): SafeParseResult<RunAgentModelParameters, SDKValidationError> {
|
|
2665
|
+
return safeParse(
|
|
2666
|
+
jsonString,
|
|
2667
|
+
(x) => RunAgentModelParameters$inboundSchema.parse(JSON.parse(x)),
|
|
2668
|
+
`Failed to parse 'RunAgentModelParameters' from JSON`,
|
|
2669
|
+
);
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
/** @internal */
|
|
2673
|
+
export const RunAgentModel2$inboundSchema: z.ZodType<
|
|
2674
|
+
RunAgentModel2,
|
|
2675
|
+
z.ZodTypeDef,
|
|
2676
|
+
unknown
|
|
2677
|
+
> = z.object({
|
|
2678
|
+
id: z.string(),
|
|
2679
|
+
integration_id: z.nullable(z.string()).optional(),
|
|
2680
|
+
parameters: z.lazy(() => RunAgentModelParameters$inboundSchema).optional(),
|
|
2681
|
+
}).transform((v) => {
|
|
2682
|
+
return remap$(v, {
|
|
2683
|
+
"integration_id": "integrationId",
|
|
2684
|
+
});
|
|
2685
|
+
});
|
|
2686
|
+
|
|
2687
|
+
/** @internal */
|
|
2688
|
+
export type RunAgentModel2$Outbound = {
|
|
2689
|
+
id: string;
|
|
2690
|
+
integration_id?: string | null | undefined;
|
|
2691
|
+
parameters?: RunAgentModelParameters$Outbound | undefined;
|
|
2692
|
+
};
|
|
2693
|
+
|
|
2694
|
+
/** @internal */
|
|
2695
|
+
export const RunAgentModel2$outboundSchema: z.ZodType<
|
|
2696
|
+
RunAgentModel2$Outbound,
|
|
2697
|
+
z.ZodTypeDef,
|
|
2698
|
+
RunAgentModel2
|
|
2699
|
+
> = z.object({
|
|
2700
|
+
id: z.string(),
|
|
2701
|
+
integrationId: z.nullable(z.string()).optional(),
|
|
2702
|
+
parameters: z.lazy(() => RunAgentModelParameters$outboundSchema).optional(),
|
|
2703
|
+
}).transform((v) => {
|
|
2704
|
+
return remap$(v, {
|
|
2705
|
+
integrationId: "integration_id",
|
|
2706
|
+
});
|
|
2707
|
+
});
|
|
2708
|
+
|
|
2709
|
+
/**
|
|
2710
|
+
* @internal
|
|
2711
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2712
|
+
*/
|
|
2713
|
+
export namespace RunAgentModel2$ {
|
|
2714
|
+
/** @deprecated use `RunAgentModel2$inboundSchema` instead. */
|
|
2715
|
+
export const inboundSchema = RunAgentModel2$inboundSchema;
|
|
2716
|
+
/** @deprecated use `RunAgentModel2$outboundSchema` instead. */
|
|
2717
|
+
export const outboundSchema = RunAgentModel2$outboundSchema;
|
|
2718
|
+
/** @deprecated use `RunAgentModel2$Outbound` instead. */
|
|
2719
|
+
export type Outbound = RunAgentModel2$Outbound;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
export function runAgentModel2ToJSON(runAgentModel2: RunAgentModel2): string {
|
|
2723
|
+
return JSON.stringify(RunAgentModel2$outboundSchema.parse(runAgentModel2));
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2726
|
+
export function runAgentModel2FromJSON(
|
|
2727
|
+
jsonString: string,
|
|
2728
|
+
): SafeParseResult<RunAgentModel2, SDKValidationError> {
|
|
2729
|
+
return safeParse(
|
|
2730
|
+
jsonString,
|
|
2731
|
+
(x) => RunAgentModel2$inboundSchema.parse(JSON.parse(x)),
|
|
2732
|
+
`Failed to parse 'RunAgentModel2' from JSON`,
|
|
2733
|
+
);
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/** @internal */
|
|
2737
|
+
export const RunAgentModel$inboundSchema: z.ZodType<
|
|
2738
|
+
RunAgentModel,
|
|
2739
|
+
z.ZodTypeDef,
|
|
2740
|
+
unknown
|
|
2741
|
+
> = z.union([z.lazy(() => RunAgentModel2$inboundSchema), z.string()]);
|
|
2742
|
+
|
|
2743
|
+
/** @internal */
|
|
2744
|
+
export type RunAgentModel$Outbound = RunAgentModel2$Outbound | string;
|
|
2745
|
+
|
|
2746
|
+
/** @internal */
|
|
2747
|
+
export const RunAgentModel$outboundSchema: z.ZodType<
|
|
2748
|
+
RunAgentModel$Outbound,
|
|
2749
|
+
z.ZodTypeDef,
|
|
2750
|
+
RunAgentModel
|
|
2751
|
+
> = z.union([z.lazy(() => RunAgentModel2$outboundSchema), z.string()]);
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* @internal
|
|
2755
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2756
|
+
*/
|
|
2757
|
+
export namespace RunAgentModel$ {
|
|
2758
|
+
/** @deprecated use `RunAgentModel$inboundSchema` instead. */
|
|
2759
|
+
export const inboundSchema = RunAgentModel$inboundSchema;
|
|
2760
|
+
/** @deprecated use `RunAgentModel$outboundSchema` instead. */
|
|
2761
|
+
export const outboundSchema = RunAgentModel$outboundSchema;
|
|
2762
|
+
/** @deprecated use `RunAgentModel$Outbound` instead. */
|
|
2763
|
+
export type Outbound = RunAgentModel$Outbound;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
export function runAgentModelToJSON(runAgentModel: RunAgentModel): string {
|
|
2767
|
+
return JSON.stringify(RunAgentModel$outboundSchema.parse(runAgentModel));
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
export function runAgentModelFromJSON(
|
|
2771
|
+
jsonString: string,
|
|
2772
|
+
): SafeParseResult<RunAgentModel, SDKValidationError> {
|
|
2773
|
+
return safeParse(
|
|
2774
|
+
jsonString,
|
|
2775
|
+
(x) => RunAgentModel$inboundSchema.parse(JSON.parse(x)),
|
|
2776
|
+
`Failed to parse 'RunAgentModel' from JSON`,
|
|
2777
|
+
);
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
/** @internal */
|
|
2781
|
+
export const RunAgentFallbackModelsVoice$inboundSchema: z.ZodNativeEnum<
|
|
2782
|
+
typeof RunAgentFallbackModelsVoice
|
|
2783
|
+
> = z.nativeEnum(RunAgentFallbackModelsVoice);
|
|
2784
|
+
|
|
2785
|
+
/** @internal */
|
|
2786
|
+
export const RunAgentFallbackModelsVoice$outboundSchema: z.ZodNativeEnum<
|
|
2787
|
+
typeof RunAgentFallbackModelsVoice
|
|
2788
|
+
> = RunAgentFallbackModelsVoice$inboundSchema;
|
|
2789
|
+
|
|
2790
|
+
/**
|
|
2791
|
+
* @internal
|
|
2792
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2793
|
+
*/
|
|
2794
|
+
export namespace RunAgentFallbackModelsVoice$ {
|
|
2795
|
+
/** @deprecated use `RunAgentFallbackModelsVoice$inboundSchema` instead. */
|
|
2796
|
+
export const inboundSchema = RunAgentFallbackModelsVoice$inboundSchema;
|
|
2797
|
+
/** @deprecated use `RunAgentFallbackModelsVoice$outboundSchema` instead. */
|
|
2798
|
+
export const outboundSchema = RunAgentFallbackModelsVoice$outboundSchema;
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
/** @internal */
|
|
2802
|
+
export const RunAgentFallbackModelsFormat$inboundSchema: z.ZodNativeEnum<
|
|
2803
|
+
typeof RunAgentFallbackModelsFormat
|
|
2804
|
+
> = z.nativeEnum(RunAgentFallbackModelsFormat);
|
|
2805
|
+
|
|
2806
|
+
/** @internal */
|
|
2807
|
+
export const RunAgentFallbackModelsFormat$outboundSchema: z.ZodNativeEnum<
|
|
2808
|
+
typeof RunAgentFallbackModelsFormat
|
|
2809
|
+
> = RunAgentFallbackModelsFormat$inboundSchema;
|
|
2810
|
+
|
|
2811
|
+
/**
|
|
2812
|
+
* @internal
|
|
2813
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2814
|
+
*/
|
|
2815
|
+
export namespace RunAgentFallbackModelsFormat$ {
|
|
2816
|
+
/** @deprecated use `RunAgentFallbackModelsFormat$inboundSchema` instead. */
|
|
2817
|
+
export const inboundSchema = RunAgentFallbackModelsFormat$inboundSchema;
|
|
2818
|
+
/** @deprecated use `RunAgentFallbackModelsFormat$outboundSchema` instead. */
|
|
2819
|
+
export const outboundSchema = RunAgentFallbackModelsFormat$outboundSchema;
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
/** @internal */
|
|
2823
|
+
export const RunAgentFallbackModelsAudio$inboundSchema: z.ZodType<
|
|
2824
|
+
RunAgentFallbackModelsAudio,
|
|
2825
|
+
z.ZodTypeDef,
|
|
2826
|
+
unknown
|
|
2827
|
+
> = z.object({
|
|
2828
|
+
voice: RunAgentFallbackModelsVoice$inboundSchema,
|
|
2829
|
+
format: RunAgentFallbackModelsFormat$inboundSchema,
|
|
2830
|
+
});
|
|
2831
|
+
|
|
2832
|
+
/** @internal */
|
|
2833
|
+
export type RunAgentFallbackModelsAudio$Outbound = {
|
|
2834
|
+
voice: string;
|
|
2835
|
+
format: string;
|
|
2836
|
+
};
|
|
2837
|
+
|
|
2838
|
+
/** @internal */
|
|
2839
|
+
export const RunAgentFallbackModelsAudio$outboundSchema: z.ZodType<
|
|
2840
|
+
RunAgentFallbackModelsAudio$Outbound,
|
|
2841
|
+
z.ZodTypeDef,
|
|
2842
|
+
RunAgentFallbackModelsAudio
|
|
2843
|
+
> = z.object({
|
|
2844
|
+
voice: RunAgentFallbackModelsVoice$outboundSchema,
|
|
2845
|
+
format: RunAgentFallbackModelsFormat$outboundSchema,
|
|
2846
|
+
});
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* @internal
|
|
2850
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2851
|
+
*/
|
|
2852
|
+
export namespace RunAgentFallbackModelsAudio$ {
|
|
2853
|
+
/** @deprecated use `RunAgentFallbackModelsAudio$inboundSchema` instead. */
|
|
2854
|
+
export const inboundSchema = RunAgentFallbackModelsAudio$inboundSchema;
|
|
2855
|
+
/** @deprecated use `RunAgentFallbackModelsAudio$outboundSchema` instead. */
|
|
2856
|
+
export const outboundSchema = RunAgentFallbackModelsAudio$outboundSchema;
|
|
2857
|
+
/** @deprecated use `RunAgentFallbackModelsAudio$Outbound` instead. */
|
|
2858
|
+
export type Outbound = RunAgentFallbackModelsAudio$Outbound;
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
export function runAgentFallbackModelsAudioToJSON(
|
|
2862
|
+
runAgentFallbackModelsAudio: RunAgentFallbackModelsAudio,
|
|
2863
|
+
): string {
|
|
2864
|
+
return JSON.stringify(
|
|
2865
|
+
RunAgentFallbackModelsAudio$outboundSchema.parse(
|
|
2866
|
+
runAgentFallbackModelsAudio,
|
|
2867
|
+
),
|
|
2868
|
+
);
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
export function runAgentFallbackModelsAudioFromJSON(
|
|
2872
|
+
jsonString: string,
|
|
2873
|
+
): SafeParseResult<RunAgentFallbackModelsAudio, SDKValidationError> {
|
|
2874
|
+
return safeParse(
|
|
2875
|
+
jsonString,
|
|
2876
|
+
(x) => RunAgentFallbackModelsAudio$inboundSchema.parse(JSON.parse(x)),
|
|
2877
|
+
`Failed to parse 'RunAgentFallbackModelsAudio' from JSON`,
|
|
2878
|
+
);
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
/** @internal */
|
|
2882
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$inboundSchema:
|
|
2883
|
+
z.ZodNativeEnum<
|
|
2884
|
+
typeof RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type
|
|
2885
|
+
> = z.nativeEnum(
|
|
2886
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type,
|
|
2887
|
+
);
|
|
2888
|
+
|
|
2889
|
+
/** @internal */
|
|
2890
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$outboundSchema:
|
|
2891
|
+
z.ZodNativeEnum<
|
|
2892
|
+
typeof RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type
|
|
2893
|
+
> =
|
|
2894
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$inboundSchema;
|
|
2895
|
+
|
|
2896
|
+
/**
|
|
2897
|
+
* @internal
|
|
2898
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2899
|
+
*/
|
|
2900
|
+
export namespace RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$ {
|
|
2901
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$inboundSchema` instead. */
|
|
2902
|
+
export const inboundSchema =
|
|
2903
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$inboundSchema;
|
|
2904
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$outboundSchema` instead. */
|
|
2905
|
+
export const outboundSchema =
|
|
2906
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$outboundSchema;
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
/** @internal */
|
|
2910
|
+
export const RunAgentResponseFormatAgentsJsonSchema$inboundSchema: z.ZodType<
|
|
2911
|
+
RunAgentResponseFormatAgentsJsonSchema,
|
|
2912
|
+
z.ZodTypeDef,
|
|
2913
|
+
unknown
|
|
2914
|
+
> = z.object({
|
|
2915
|
+
description: z.string().optional(),
|
|
2916
|
+
name: z.string(),
|
|
2917
|
+
schema: z.any().optional(),
|
|
2918
|
+
strict: z.boolean().optional(),
|
|
2919
|
+
});
|
|
2920
|
+
|
|
2921
|
+
/** @internal */
|
|
2922
|
+
export type RunAgentResponseFormatAgentsJsonSchema$Outbound = {
|
|
2923
|
+
description?: string | undefined;
|
|
2924
|
+
name: string;
|
|
2925
|
+
schema?: any | undefined;
|
|
2926
|
+
strict?: boolean | undefined;
|
|
2927
|
+
};
|
|
2928
|
+
|
|
2929
|
+
/** @internal */
|
|
2930
|
+
export const RunAgentResponseFormatAgentsJsonSchema$outboundSchema: z.ZodType<
|
|
2931
|
+
RunAgentResponseFormatAgentsJsonSchema$Outbound,
|
|
2932
|
+
z.ZodTypeDef,
|
|
2933
|
+
RunAgentResponseFormatAgentsJsonSchema
|
|
2934
|
+
> = z.object({
|
|
2935
|
+
description: z.string().optional(),
|
|
2936
|
+
name: z.string(),
|
|
2937
|
+
schema: z.any().optional(),
|
|
2938
|
+
strict: z.boolean().optional(),
|
|
2939
|
+
});
|
|
2940
|
+
|
|
2941
|
+
/**
|
|
2942
|
+
* @internal
|
|
2943
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2944
|
+
*/
|
|
2945
|
+
export namespace RunAgentResponseFormatAgentsJsonSchema$ {
|
|
2946
|
+
/** @deprecated use `RunAgentResponseFormatAgentsJsonSchema$inboundSchema` instead. */
|
|
2947
|
+
export const inboundSchema =
|
|
2948
|
+
RunAgentResponseFormatAgentsJsonSchema$inboundSchema;
|
|
2949
|
+
/** @deprecated use `RunAgentResponseFormatAgentsJsonSchema$outboundSchema` instead. */
|
|
2950
|
+
export const outboundSchema =
|
|
2951
|
+
RunAgentResponseFormatAgentsJsonSchema$outboundSchema;
|
|
2952
|
+
/** @deprecated use `RunAgentResponseFormatAgentsJsonSchema$Outbound` instead. */
|
|
2953
|
+
export type Outbound = RunAgentResponseFormatAgentsJsonSchema$Outbound;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
export function runAgentResponseFormatAgentsJsonSchemaToJSON(
|
|
2957
|
+
runAgentResponseFormatAgentsJsonSchema:
|
|
2958
|
+
RunAgentResponseFormatAgentsJsonSchema,
|
|
2959
|
+
): string {
|
|
2960
|
+
return JSON.stringify(
|
|
2961
|
+
RunAgentResponseFormatAgentsJsonSchema$outboundSchema.parse(
|
|
2962
|
+
runAgentResponseFormatAgentsJsonSchema,
|
|
2963
|
+
),
|
|
2964
|
+
);
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
export function runAgentResponseFormatAgentsJsonSchemaFromJSON(
|
|
2968
|
+
jsonString: string,
|
|
2969
|
+
): SafeParseResult<RunAgentResponseFormatAgentsJsonSchema, SDKValidationError> {
|
|
2970
|
+
return safeParse(
|
|
2971
|
+
jsonString,
|
|
2972
|
+
(x) =>
|
|
2973
|
+
RunAgentResponseFormatAgentsJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
2974
|
+
`Failed to parse 'RunAgentResponseFormatAgentsJsonSchema' from JSON`,
|
|
2975
|
+
);
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
/** @internal */
|
|
2979
|
+
export const RunAgentResponseFormatAgents3$inboundSchema: z.ZodType<
|
|
2980
|
+
RunAgentResponseFormatAgents3,
|
|
2981
|
+
z.ZodTypeDef,
|
|
2982
|
+
unknown
|
|
2983
|
+
> = z.object({
|
|
2984
|
+
type:
|
|
2985
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$inboundSchema,
|
|
2986
|
+
json_schema: z.lazy(() =>
|
|
2987
|
+
RunAgentResponseFormatAgentsJsonSchema$inboundSchema
|
|
2988
|
+
),
|
|
2989
|
+
}).transform((v) => {
|
|
2990
|
+
return remap$(v, {
|
|
2991
|
+
"json_schema": "jsonSchema",
|
|
2992
|
+
});
|
|
2993
|
+
});
|
|
2994
|
+
|
|
2995
|
+
/** @internal */
|
|
2996
|
+
export type RunAgentResponseFormatAgents3$Outbound = {
|
|
2997
|
+
type: string;
|
|
2998
|
+
json_schema: RunAgentResponseFormatAgentsJsonSchema$Outbound;
|
|
2999
|
+
};
|
|
3000
|
+
|
|
3001
|
+
/** @internal */
|
|
3002
|
+
export const RunAgentResponseFormatAgents3$outboundSchema: z.ZodType<
|
|
3003
|
+
RunAgentResponseFormatAgents3$Outbound,
|
|
3004
|
+
z.ZodTypeDef,
|
|
3005
|
+
RunAgentResponseFormatAgents3
|
|
3006
|
+
> = z.object({
|
|
3007
|
+
type:
|
|
3008
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModels2Type$outboundSchema,
|
|
3009
|
+
jsonSchema: z.lazy(() =>
|
|
3010
|
+
RunAgentResponseFormatAgentsJsonSchema$outboundSchema
|
|
3011
|
+
),
|
|
3012
|
+
}).transform((v) => {
|
|
3013
|
+
return remap$(v, {
|
|
3014
|
+
jsonSchema: "json_schema",
|
|
3015
|
+
});
|
|
3016
|
+
});
|
|
3017
|
+
|
|
3018
|
+
/**
|
|
3019
|
+
* @internal
|
|
3020
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3021
|
+
*/
|
|
3022
|
+
export namespace RunAgentResponseFormatAgents3$ {
|
|
3023
|
+
/** @deprecated use `RunAgentResponseFormatAgents3$inboundSchema` instead. */
|
|
3024
|
+
export const inboundSchema = RunAgentResponseFormatAgents3$inboundSchema;
|
|
3025
|
+
/** @deprecated use `RunAgentResponseFormatAgents3$outboundSchema` instead. */
|
|
3026
|
+
export const outboundSchema = RunAgentResponseFormatAgents3$outboundSchema;
|
|
3027
|
+
/** @deprecated use `RunAgentResponseFormatAgents3$Outbound` instead. */
|
|
3028
|
+
export type Outbound = RunAgentResponseFormatAgents3$Outbound;
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
export function runAgentResponseFormatAgents3ToJSON(
|
|
3032
|
+
runAgentResponseFormatAgents3: RunAgentResponseFormatAgents3,
|
|
3033
|
+
): string {
|
|
3034
|
+
return JSON.stringify(
|
|
3035
|
+
RunAgentResponseFormatAgents3$outboundSchema.parse(
|
|
3036
|
+
runAgentResponseFormatAgents3,
|
|
3037
|
+
),
|
|
3038
|
+
);
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3041
|
+
export function runAgentResponseFormatAgents3FromJSON(
|
|
3042
|
+
jsonString: string,
|
|
3043
|
+
): SafeParseResult<RunAgentResponseFormatAgents3, SDKValidationError> {
|
|
3044
|
+
return safeParse(
|
|
3045
|
+
jsonString,
|
|
3046
|
+
(x) => RunAgentResponseFormatAgents3$inboundSchema.parse(JSON.parse(x)),
|
|
3047
|
+
`Failed to parse 'RunAgentResponseFormatAgents3' from JSON`,
|
|
3048
|
+
);
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
/** @internal */
|
|
3052
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$inboundSchema:
|
|
3053
|
+
z.ZodNativeEnum<
|
|
3054
|
+
typeof RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType
|
|
3055
|
+
> = z.nativeEnum(
|
|
3056
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType,
|
|
3057
|
+
);
|
|
3058
|
+
|
|
3059
|
+
/** @internal */
|
|
3060
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$outboundSchema:
|
|
3061
|
+
z.ZodNativeEnum<
|
|
3062
|
+
typeof RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType
|
|
3063
|
+
> =
|
|
3064
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$inboundSchema;
|
|
3065
|
+
|
|
3066
|
+
/**
|
|
3067
|
+
* @internal
|
|
3068
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3069
|
+
*/
|
|
3070
|
+
export namespace RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$ {
|
|
3071
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$inboundSchema` instead. */
|
|
3072
|
+
export const inboundSchema =
|
|
3073
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$inboundSchema;
|
|
3074
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$outboundSchema` instead. */
|
|
3075
|
+
export const outboundSchema =
|
|
3076
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$outboundSchema;
|
|
3077
|
+
}
|
|
3078
|
+
|
|
3079
|
+
/** @internal */
|
|
3080
|
+
export const RunAgentResponseFormatAgents2$inboundSchema: z.ZodType<
|
|
3081
|
+
RunAgentResponseFormatAgents2,
|
|
3082
|
+
z.ZodTypeDef,
|
|
3083
|
+
unknown
|
|
3084
|
+
> = z.object({
|
|
3085
|
+
type:
|
|
3086
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$inboundSchema,
|
|
3087
|
+
});
|
|
3088
|
+
|
|
3089
|
+
/** @internal */
|
|
3090
|
+
export type RunAgentResponseFormatAgents2$Outbound = {
|
|
3091
|
+
type: string;
|
|
3092
|
+
};
|
|
3093
|
+
|
|
3094
|
+
/** @internal */
|
|
3095
|
+
export const RunAgentResponseFormatAgents2$outboundSchema: z.ZodType<
|
|
3096
|
+
RunAgentResponseFormatAgents2$Outbound,
|
|
3097
|
+
z.ZodTypeDef,
|
|
3098
|
+
RunAgentResponseFormatAgents2
|
|
3099
|
+
> = z.object({
|
|
3100
|
+
type:
|
|
3101
|
+
RunAgentResponseFormatAgentsRequestRequestBodyFallbackModelsType$outboundSchema,
|
|
3102
|
+
});
|
|
3103
|
+
|
|
3104
|
+
/**
|
|
3105
|
+
* @internal
|
|
3106
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3107
|
+
*/
|
|
3108
|
+
export namespace RunAgentResponseFormatAgents2$ {
|
|
3109
|
+
/** @deprecated use `RunAgentResponseFormatAgents2$inboundSchema` instead. */
|
|
3110
|
+
export const inboundSchema = RunAgentResponseFormatAgents2$inboundSchema;
|
|
3111
|
+
/** @deprecated use `RunAgentResponseFormatAgents2$outboundSchema` instead. */
|
|
3112
|
+
export const outboundSchema = RunAgentResponseFormatAgents2$outboundSchema;
|
|
3113
|
+
/** @deprecated use `RunAgentResponseFormatAgents2$Outbound` instead. */
|
|
3114
|
+
export type Outbound = RunAgentResponseFormatAgents2$Outbound;
|
|
3115
|
+
}
|
|
3116
|
+
|
|
3117
|
+
export function runAgentResponseFormatAgents2ToJSON(
|
|
3118
|
+
runAgentResponseFormatAgents2: RunAgentResponseFormatAgents2,
|
|
3119
|
+
): string {
|
|
3120
|
+
return JSON.stringify(
|
|
3121
|
+
RunAgentResponseFormatAgents2$outboundSchema.parse(
|
|
3122
|
+
runAgentResponseFormatAgents2,
|
|
3123
|
+
),
|
|
3124
|
+
);
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
export function runAgentResponseFormatAgents2FromJSON(
|
|
3128
|
+
jsonString: string,
|
|
3129
|
+
): SafeParseResult<RunAgentResponseFormatAgents2, SDKValidationError> {
|
|
3130
|
+
return safeParse(
|
|
3131
|
+
jsonString,
|
|
3132
|
+
(x) => RunAgentResponseFormatAgents2$inboundSchema.parse(JSON.parse(x)),
|
|
3133
|
+
`Failed to parse 'RunAgentResponseFormatAgents2' from JSON`,
|
|
3134
|
+
);
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
/** @internal */
|
|
3138
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyType$inboundSchema:
|
|
3139
|
+
z.ZodNativeEnum<typeof RunAgentResponseFormatAgentsRequestRequestBodyType> = z
|
|
3140
|
+
.nativeEnum(RunAgentResponseFormatAgentsRequestRequestBodyType);
|
|
3141
|
+
|
|
3142
|
+
/** @internal */
|
|
3143
|
+
export const RunAgentResponseFormatAgentsRequestRequestBodyType$outboundSchema:
|
|
3144
|
+
z.ZodNativeEnum<typeof RunAgentResponseFormatAgentsRequestRequestBodyType> =
|
|
3145
|
+
RunAgentResponseFormatAgentsRequestRequestBodyType$inboundSchema;
|
|
3146
|
+
|
|
3147
|
+
/**
|
|
3148
|
+
* @internal
|
|
3149
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3150
|
+
*/
|
|
3151
|
+
export namespace RunAgentResponseFormatAgentsRequestRequestBodyType$ {
|
|
3152
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestRequestBodyType$inboundSchema` instead. */
|
|
3153
|
+
export const inboundSchema =
|
|
3154
|
+
RunAgentResponseFormatAgentsRequestRequestBodyType$inboundSchema;
|
|
3155
|
+
/** @deprecated use `RunAgentResponseFormatAgentsRequestRequestBodyType$outboundSchema` instead. */
|
|
3156
|
+
export const outboundSchema =
|
|
3157
|
+
RunAgentResponseFormatAgentsRequestRequestBodyType$outboundSchema;
|
|
3158
|
+
}
|
|
3159
|
+
|
|
3160
|
+
/** @internal */
|
|
3161
|
+
export const RunAgentResponseFormatAgents1$inboundSchema: z.ZodType<
|
|
3162
|
+
RunAgentResponseFormatAgents1,
|
|
3163
|
+
z.ZodTypeDef,
|
|
3164
|
+
unknown
|
|
3165
|
+
> = z.object({
|
|
3166
|
+
type: RunAgentResponseFormatAgentsRequestRequestBodyType$inboundSchema,
|
|
3167
|
+
});
|
|
3168
|
+
|
|
3169
|
+
/** @internal */
|
|
3170
|
+
export type RunAgentResponseFormatAgents1$Outbound = {
|
|
3171
|
+
type: string;
|
|
3172
|
+
};
|
|
3173
|
+
|
|
3174
|
+
/** @internal */
|
|
3175
|
+
export const RunAgentResponseFormatAgents1$outboundSchema: z.ZodType<
|
|
3176
|
+
RunAgentResponseFormatAgents1$Outbound,
|
|
3177
|
+
z.ZodTypeDef,
|
|
3178
|
+
RunAgentResponseFormatAgents1
|
|
3179
|
+
> = z.object({
|
|
3180
|
+
type: RunAgentResponseFormatAgentsRequestRequestBodyType$outboundSchema,
|
|
3181
|
+
});
|
|
3182
|
+
|
|
3183
|
+
/**
|
|
3184
|
+
* @internal
|
|
3185
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3186
|
+
*/
|
|
3187
|
+
export namespace RunAgentResponseFormatAgents1$ {
|
|
3188
|
+
/** @deprecated use `RunAgentResponseFormatAgents1$inboundSchema` instead. */
|
|
3189
|
+
export const inboundSchema = RunAgentResponseFormatAgents1$inboundSchema;
|
|
3190
|
+
/** @deprecated use `RunAgentResponseFormatAgents1$outboundSchema` instead. */
|
|
3191
|
+
export const outboundSchema = RunAgentResponseFormatAgents1$outboundSchema;
|
|
3192
|
+
/** @deprecated use `RunAgentResponseFormatAgents1$Outbound` instead. */
|
|
3193
|
+
export type Outbound = RunAgentResponseFormatAgents1$Outbound;
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
export function runAgentResponseFormatAgents1ToJSON(
|
|
3197
|
+
runAgentResponseFormatAgents1: RunAgentResponseFormatAgents1,
|
|
3198
|
+
): string {
|
|
3199
|
+
return JSON.stringify(
|
|
3200
|
+
RunAgentResponseFormatAgents1$outboundSchema.parse(
|
|
3201
|
+
runAgentResponseFormatAgents1,
|
|
3202
|
+
),
|
|
3203
|
+
);
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
export function runAgentResponseFormatAgents1FromJSON(
|
|
3207
|
+
jsonString: string,
|
|
3208
|
+
): SafeParseResult<RunAgentResponseFormatAgents1, SDKValidationError> {
|
|
3209
|
+
return safeParse(
|
|
3210
|
+
jsonString,
|
|
3211
|
+
(x) => RunAgentResponseFormatAgents1$inboundSchema.parse(JSON.parse(x)),
|
|
3212
|
+
`Failed to parse 'RunAgentResponseFormatAgents1' from JSON`,
|
|
3213
|
+
);
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
/** @internal */
|
|
3217
|
+
export const RunAgentFallbackModelsResponseFormat$inboundSchema: z.ZodType<
|
|
3218
|
+
RunAgentFallbackModelsResponseFormat,
|
|
3219
|
+
z.ZodTypeDef,
|
|
3220
|
+
unknown
|
|
3221
|
+
> = z.union([
|
|
3222
|
+
z.lazy(() => RunAgentResponseFormatAgents3$inboundSchema),
|
|
3223
|
+
z.lazy(() => RunAgentResponseFormatAgents1$inboundSchema),
|
|
3224
|
+
z.lazy(() => RunAgentResponseFormatAgents2$inboundSchema),
|
|
3225
|
+
]);
|
|
3226
|
+
|
|
3227
|
+
/** @internal */
|
|
3228
|
+
export type RunAgentFallbackModelsResponseFormat$Outbound =
|
|
3229
|
+
| RunAgentResponseFormatAgents3$Outbound
|
|
3230
|
+
| RunAgentResponseFormatAgents1$Outbound
|
|
3231
|
+
| RunAgentResponseFormatAgents2$Outbound;
|
|
3232
|
+
|
|
3233
|
+
/** @internal */
|
|
3234
|
+
export const RunAgentFallbackModelsResponseFormat$outboundSchema: z.ZodType<
|
|
3235
|
+
RunAgentFallbackModelsResponseFormat$Outbound,
|
|
3236
|
+
z.ZodTypeDef,
|
|
3237
|
+
RunAgentFallbackModelsResponseFormat
|
|
3238
|
+
> = z.union([
|
|
3239
|
+
z.lazy(() => RunAgentResponseFormatAgents3$outboundSchema),
|
|
3240
|
+
z.lazy(() => RunAgentResponseFormatAgents1$outboundSchema),
|
|
3241
|
+
z.lazy(() => RunAgentResponseFormatAgents2$outboundSchema),
|
|
3242
|
+
]);
|
|
3243
|
+
|
|
3244
|
+
/**
|
|
3245
|
+
* @internal
|
|
3246
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3247
|
+
*/
|
|
3248
|
+
export namespace RunAgentFallbackModelsResponseFormat$ {
|
|
3249
|
+
/** @deprecated use `RunAgentFallbackModelsResponseFormat$inboundSchema` instead. */
|
|
3250
|
+
export const inboundSchema =
|
|
3251
|
+
RunAgentFallbackModelsResponseFormat$inboundSchema;
|
|
3252
|
+
/** @deprecated use `RunAgentFallbackModelsResponseFormat$outboundSchema` instead. */
|
|
3253
|
+
export const outboundSchema =
|
|
3254
|
+
RunAgentFallbackModelsResponseFormat$outboundSchema;
|
|
3255
|
+
/** @deprecated use `RunAgentFallbackModelsResponseFormat$Outbound` instead. */
|
|
3256
|
+
export type Outbound = RunAgentFallbackModelsResponseFormat$Outbound;
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
export function runAgentFallbackModelsResponseFormatToJSON(
|
|
3260
|
+
runAgentFallbackModelsResponseFormat: RunAgentFallbackModelsResponseFormat,
|
|
3261
|
+
): string {
|
|
3262
|
+
return JSON.stringify(
|
|
3263
|
+
RunAgentFallbackModelsResponseFormat$outboundSchema.parse(
|
|
3264
|
+
runAgentFallbackModelsResponseFormat,
|
|
3265
|
+
),
|
|
3266
|
+
);
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
export function runAgentFallbackModelsResponseFormatFromJSON(
|
|
3270
|
+
jsonString: string,
|
|
3271
|
+
): SafeParseResult<RunAgentFallbackModelsResponseFormat, SDKValidationError> {
|
|
3272
|
+
return safeParse(
|
|
3273
|
+
jsonString,
|
|
3274
|
+
(x) =>
|
|
3275
|
+
RunAgentFallbackModelsResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
3276
|
+
`Failed to parse 'RunAgentFallbackModelsResponseFormat' from JSON`,
|
|
3277
|
+
);
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
/** @internal */
|
|
3281
|
+
export const RunAgentFallbackModelsStop$inboundSchema: z.ZodType<
|
|
3282
|
+
RunAgentFallbackModelsStop,
|
|
3283
|
+
z.ZodTypeDef,
|
|
3284
|
+
unknown
|
|
3285
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
3286
|
+
|
|
3287
|
+
/** @internal */
|
|
3288
|
+
export type RunAgentFallbackModelsStop$Outbound = string | Array<string>;
|
|
3289
|
+
|
|
3290
|
+
/** @internal */
|
|
3291
|
+
export const RunAgentFallbackModelsStop$outboundSchema: z.ZodType<
|
|
3292
|
+
RunAgentFallbackModelsStop$Outbound,
|
|
3293
|
+
z.ZodTypeDef,
|
|
3294
|
+
RunAgentFallbackModelsStop
|
|
3295
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
3296
|
+
|
|
3297
|
+
/**
|
|
3298
|
+
* @internal
|
|
3299
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3300
|
+
*/
|
|
3301
|
+
export namespace RunAgentFallbackModelsStop$ {
|
|
3302
|
+
/** @deprecated use `RunAgentFallbackModelsStop$inboundSchema` instead. */
|
|
3303
|
+
export const inboundSchema = RunAgentFallbackModelsStop$inboundSchema;
|
|
3304
|
+
/** @deprecated use `RunAgentFallbackModelsStop$outboundSchema` instead. */
|
|
3305
|
+
export const outboundSchema = RunAgentFallbackModelsStop$outboundSchema;
|
|
3306
|
+
/** @deprecated use `RunAgentFallbackModelsStop$Outbound` instead. */
|
|
3307
|
+
export type Outbound = RunAgentFallbackModelsStop$Outbound;
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
export function runAgentFallbackModelsStopToJSON(
|
|
3311
|
+
runAgentFallbackModelsStop: RunAgentFallbackModelsStop,
|
|
3312
|
+
): string {
|
|
3313
|
+
return JSON.stringify(
|
|
3314
|
+
RunAgentFallbackModelsStop$outboundSchema.parse(runAgentFallbackModelsStop),
|
|
3315
|
+
);
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
export function runAgentFallbackModelsStopFromJSON(
|
|
3319
|
+
jsonString: string,
|
|
3320
|
+
): SafeParseResult<RunAgentFallbackModelsStop, SDKValidationError> {
|
|
3321
|
+
return safeParse(
|
|
3322
|
+
jsonString,
|
|
3323
|
+
(x) => RunAgentFallbackModelsStop$inboundSchema.parse(JSON.parse(x)),
|
|
3324
|
+
`Failed to parse 'RunAgentFallbackModelsStop' from JSON`,
|
|
3325
|
+
);
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
/** @internal */
|
|
3329
|
+
export const RunAgentFallbackModelsStreamOptions$inboundSchema: z.ZodType<
|
|
3330
|
+
RunAgentFallbackModelsStreamOptions,
|
|
3331
|
+
z.ZodTypeDef,
|
|
3332
|
+
unknown
|
|
3333
|
+
> = z.object({
|
|
3334
|
+
include_usage: z.boolean().optional(),
|
|
3335
|
+
}).transform((v) => {
|
|
3336
|
+
return remap$(v, {
|
|
3337
|
+
"include_usage": "includeUsage",
|
|
3338
|
+
});
|
|
3339
|
+
});
|
|
3340
|
+
|
|
3341
|
+
/** @internal */
|
|
3342
|
+
export type RunAgentFallbackModelsStreamOptions$Outbound = {
|
|
3343
|
+
include_usage?: boolean | undefined;
|
|
3344
|
+
};
|
|
3345
|
+
|
|
3346
|
+
/** @internal */
|
|
3347
|
+
export const RunAgentFallbackModelsStreamOptions$outboundSchema: z.ZodType<
|
|
3348
|
+
RunAgentFallbackModelsStreamOptions$Outbound,
|
|
3349
|
+
z.ZodTypeDef,
|
|
3350
|
+
RunAgentFallbackModelsStreamOptions
|
|
3351
|
+
> = z.object({
|
|
3352
|
+
includeUsage: z.boolean().optional(),
|
|
3353
|
+
}).transform((v) => {
|
|
3354
|
+
return remap$(v, {
|
|
3355
|
+
includeUsage: "include_usage",
|
|
3356
|
+
});
|
|
3357
|
+
});
|
|
3358
|
+
|
|
3359
|
+
/**
|
|
3360
|
+
* @internal
|
|
3361
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3362
|
+
*/
|
|
3363
|
+
export namespace RunAgentFallbackModelsStreamOptions$ {
|
|
3364
|
+
/** @deprecated use `RunAgentFallbackModelsStreamOptions$inboundSchema` instead. */
|
|
3365
|
+
export const inboundSchema =
|
|
3366
|
+
RunAgentFallbackModelsStreamOptions$inboundSchema;
|
|
3367
|
+
/** @deprecated use `RunAgentFallbackModelsStreamOptions$outboundSchema` instead. */
|
|
3368
|
+
export const outboundSchema =
|
|
3369
|
+
RunAgentFallbackModelsStreamOptions$outboundSchema;
|
|
3370
|
+
/** @deprecated use `RunAgentFallbackModelsStreamOptions$Outbound` instead. */
|
|
3371
|
+
export type Outbound = RunAgentFallbackModelsStreamOptions$Outbound;
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
export function runAgentFallbackModelsStreamOptionsToJSON(
|
|
3375
|
+
runAgentFallbackModelsStreamOptions: RunAgentFallbackModelsStreamOptions,
|
|
3376
|
+
): string {
|
|
3377
|
+
return JSON.stringify(
|
|
3378
|
+
RunAgentFallbackModelsStreamOptions$outboundSchema.parse(
|
|
3379
|
+
runAgentFallbackModelsStreamOptions,
|
|
3380
|
+
),
|
|
3381
|
+
);
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
export function runAgentFallbackModelsStreamOptionsFromJSON(
|
|
3385
|
+
jsonString: string,
|
|
3386
|
+
): SafeParseResult<RunAgentFallbackModelsStreamOptions, SDKValidationError> {
|
|
3387
|
+
return safeParse(
|
|
3388
|
+
jsonString,
|
|
3389
|
+
(x) =>
|
|
3390
|
+
RunAgentFallbackModelsStreamOptions$inboundSchema.parse(JSON.parse(x)),
|
|
3391
|
+
`Failed to parse 'RunAgentFallbackModelsStreamOptions' from JSON`,
|
|
3392
|
+
);
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
/** @internal */
|
|
3396
|
+
export const RunAgentFallbackModelsType$inboundSchema: z.ZodNativeEnum<
|
|
3397
|
+
typeof RunAgentFallbackModelsType
|
|
3398
|
+
> = z.nativeEnum(RunAgentFallbackModelsType);
|
|
3399
|
+
|
|
3400
|
+
/** @internal */
|
|
3401
|
+
export const RunAgentFallbackModelsType$outboundSchema: z.ZodNativeEnum<
|
|
3402
|
+
typeof RunAgentFallbackModelsType
|
|
3403
|
+
> = RunAgentFallbackModelsType$inboundSchema;
|
|
3404
|
+
|
|
3405
|
+
/**
|
|
3406
|
+
* @internal
|
|
3407
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3408
|
+
*/
|
|
3409
|
+
export namespace RunAgentFallbackModelsType$ {
|
|
3410
|
+
/** @deprecated use `RunAgentFallbackModelsType$inboundSchema` instead. */
|
|
3411
|
+
export const inboundSchema = RunAgentFallbackModelsType$inboundSchema;
|
|
3412
|
+
/** @deprecated use `RunAgentFallbackModelsType$outboundSchema` instead. */
|
|
3413
|
+
export const outboundSchema = RunAgentFallbackModelsType$outboundSchema;
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
/** @internal */
|
|
3417
|
+
export const RunAgentFallbackModelsThinking$inboundSchema: z.ZodType<
|
|
3418
|
+
RunAgentFallbackModelsThinking,
|
|
3419
|
+
z.ZodTypeDef,
|
|
3420
|
+
unknown
|
|
3421
|
+
> = z.object({
|
|
3422
|
+
type: RunAgentFallbackModelsType$inboundSchema,
|
|
3423
|
+
budget_tokens: z.number(),
|
|
3424
|
+
}).transform((v) => {
|
|
3425
|
+
return remap$(v, {
|
|
3426
|
+
"budget_tokens": "budgetTokens",
|
|
3427
|
+
});
|
|
3428
|
+
});
|
|
3429
|
+
|
|
3430
|
+
/** @internal */
|
|
3431
|
+
export type RunAgentFallbackModelsThinking$Outbound = {
|
|
3432
|
+
type: string;
|
|
3433
|
+
budget_tokens: number;
|
|
3434
|
+
};
|
|
3435
|
+
|
|
3436
|
+
/** @internal */
|
|
3437
|
+
export const RunAgentFallbackModelsThinking$outboundSchema: z.ZodType<
|
|
3438
|
+
RunAgentFallbackModelsThinking$Outbound,
|
|
3439
|
+
z.ZodTypeDef,
|
|
3440
|
+
RunAgentFallbackModelsThinking
|
|
3441
|
+
> = z.object({
|
|
3442
|
+
type: RunAgentFallbackModelsType$outboundSchema,
|
|
3443
|
+
budgetTokens: z.number(),
|
|
3444
|
+
}).transform((v) => {
|
|
3445
|
+
return remap$(v, {
|
|
3446
|
+
budgetTokens: "budget_tokens",
|
|
3447
|
+
});
|
|
3448
|
+
});
|
|
3449
|
+
|
|
3450
|
+
/**
|
|
3451
|
+
* @internal
|
|
3452
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3453
|
+
*/
|
|
3454
|
+
export namespace RunAgentFallbackModelsThinking$ {
|
|
3455
|
+
/** @deprecated use `RunAgentFallbackModelsThinking$inboundSchema` instead. */
|
|
3456
|
+
export const inboundSchema = RunAgentFallbackModelsThinking$inboundSchema;
|
|
3457
|
+
/** @deprecated use `RunAgentFallbackModelsThinking$outboundSchema` instead. */
|
|
3458
|
+
export const outboundSchema = RunAgentFallbackModelsThinking$outboundSchema;
|
|
3459
|
+
/** @deprecated use `RunAgentFallbackModelsThinking$Outbound` instead. */
|
|
3460
|
+
export type Outbound = RunAgentFallbackModelsThinking$Outbound;
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
export function runAgentFallbackModelsThinkingToJSON(
|
|
3464
|
+
runAgentFallbackModelsThinking: RunAgentFallbackModelsThinking,
|
|
3465
|
+
): string {
|
|
3466
|
+
return JSON.stringify(
|
|
3467
|
+
RunAgentFallbackModelsThinking$outboundSchema.parse(
|
|
3468
|
+
runAgentFallbackModelsThinking,
|
|
3469
|
+
),
|
|
3470
|
+
);
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
export function runAgentFallbackModelsThinkingFromJSON(
|
|
3474
|
+
jsonString: string,
|
|
3475
|
+
): SafeParseResult<RunAgentFallbackModelsThinking, SDKValidationError> {
|
|
3476
|
+
return safeParse(
|
|
3477
|
+
jsonString,
|
|
3478
|
+
(x) => RunAgentFallbackModelsThinking$inboundSchema.parse(JSON.parse(x)),
|
|
3479
|
+
`Failed to parse 'RunAgentFallbackModelsThinking' from JSON`,
|
|
3480
|
+
);
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
/** @internal */
|
|
3484
|
+
export const RunAgentToolChoiceAgentsType$inboundSchema: z.ZodNativeEnum<
|
|
3485
|
+
typeof RunAgentToolChoiceAgentsType
|
|
3486
|
+
> = z.nativeEnum(RunAgentToolChoiceAgentsType);
|
|
3487
|
+
|
|
3488
|
+
/** @internal */
|
|
3489
|
+
export const RunAgentToolChoiceAgentsType$outboundSchema: z.ZodNativeEnum<
|
|
3490
|
+
typeof RunAgentToolChoiceAgentsType
|
|
3491
|
+
> = RunAgentToolChoiceAgentsType$inboundSchema;
|
|
3492
|
+
|
|
3493
|
+
/**
|
|
3494
|
+
* @internal
|
|
3495
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3496
|
+
*/
|
|
3497
|
+
export namespace RunAgentToolChoiceAgentsType$ {
|
|
3498
|
+
/** @deprecated use `RunAgentToolChoiceAgentsType$inboundSchema` instead. */
|
|
3499
|
+
export const inboundSchema = RunAgentToolChoiceAgentsType$inboundSchema;
|
|
3500
|
+
/** @deprecated use `RunAgentToolChoiceAgentsType$outboundSchema` instead. */
|
|
3501
|
+
export const outboundSchema = RunAgentToolChoiceAgentsType$outboundSchema;
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
/** @internal */
|
|
3505
|
+
export const RunAgentToolChoiceAgentsFunction$inboundSchema: z.ZodType<
|
|
3506
|
+
RunAgentToolChoiceAgentsFunction,
|
|
3507
|
+
z.ZodTypeDef,
|
|
3508
|
+
unknown
|
|
3509
|
+
> = z.object({
|
|
3510
|
+
name: z.string().optional(),
|
|
3511
|
+
});
|
|
3512
|
+
|
|
3513
|
+
/** @internal */
|
|
3514
|
+
export type RunAgentToolChoiceAgentsFunction$Outbound = {
|
|
3515
|
+
name?: string | undefined;
|
|
3516
|
+
};
|
|
3517
|
+
|
|
3518
|
+
/** @internal */
|
|
3519
|
+
export const RunAgentToolChoiceAgentsFunction$outboundSchema: z.ZodType<
|
|
3520
|
+
RunAgentToolChoiceAgentsFunction$Outbound,
|
|
3521
|
+
z.ZodTypeDef,
|
|
3522
|
+
RunAgentToolChoiceAgentsFunction
|
|
3523
|
+
> = z.object({
|
|
3524
|
+
name: z.string().optional(),
|
|
3525
|
+
});
|
|
3526
|
+
|
|
3527
|
+
/**
|
|
3528
|
+
* @internal
|
|
3529
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3530
|
+
*/
|
|
3531
|
+
export namespace RunAgentToolChoiceAgentsFunction$ {
|
|
3532
|
+
/** @deprecated use `RunAgentToolChoiceAgentsFunction$inboundSchema` instead. */
|
|
3533
|
+
export const inboundSchema = RunAgentToolChoiceAgentsFunction$inboundSchema;
|
|
3534
|
+
/** @deprecated use `RunAgentToolChoiceAgentsFunction$outboundSchema` instead. */
|
|
3535
|
+
export const outboundSchema = RunAgentToolChoiceAgentsFunction$outboundSchema;
|
|
3536
|
+
/** @deprecated use `RunAgentToolChoiceAgentsFunction$Outbound` instead. */
|
|
3537
|
+
export type Outbound = RunAgentToolChoiceAgentsFunction$Outbound;
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
export function runAgentToolChoiceAgentsFunctionToJSON(
|
|
3541
|
+
runAgentToolChoiceAgentsFunction: RunAgentToolChoiceAgentsFunction,
|
|
3542
|
+
): string {
|
|
3543
|
+
return JSON.stringify(
|
|
3544
|
+
RunAgentToolChoiceAgentsFunction$outboundSchema.parse(
|
|
3545
|
+
runAgentToolChoiceAgentsFunction,
|
|
3546
|
+
),
|
|
3547
|
+
);
|
|
3548
|
+
}
|
|
3549
|
+
|
|
3550
|
+
export function runAgentToolChoiceAgentsFunctionFromJSON(
|
|
3551
|
+
jsonString: string,
|
|
3552
|
+
): SafeParseResult<RunAgentToolChoiceAgentsFunction, SDKValidationError> {
|
|
3553
|
+
return safeParse(
|
|
3554
|
+
jsonString,
|
|
3555
|
+
(x) => RunAgentToolChoiceAgentsFunction$inboundSchema.parse(JSON.parse(x)),
|
|
3556
|
+
`Failed to parse 'RunAgentToolChoiceAgentsFunction' from JSON`,
|
|
3557
|
+
);
|
|
3558
|
+
}
|
|
3559
|
+
|
|
3560
|
+
/** @internal */
|
|
3561
|
+
export const RunAgentToolChoiceAgents2$inboundSchema: z.ZodType<
|
|
3562
|
+
RunAgentToolChoiceAgents2,
|
|
3563
|
+
z.ZodTypeDef,
|
|
3564
|
+
unknown
|
|
3565
|
+
> = z.object({
|
|
3566
|
+
type: RunAgentToolChoiceAgentsType$inboundSchema.optional(),
|
|
3567
|
+
function: z.lazy(() => RunAgentToolChoiceAgentsFunction$inboundSchema),
|
|
3568
|
+
});
|
|
3569
|
+
|
|
3570
|
+
/** @internal */
|
|
3571
|
+
export type RunAgentToolChoiceAgents2$Outbound = {
|
|
3572
|
+
type?: string | undefined;
|
|
3573
|
+
function: RunAgentToolChoiceAgentsFunction$Outbound;
|
|
3574
|
+
};
|
|
3575
|
+
|
|
3576
|
+
/** @internal */
|
|
3577
|
+
export const RunAgentToolChoiceAgents2$outboundSchema: z.ZodType<
|
|
3578
|
+
RunAgentToolChoiceAgents2$Outbound,
|
|
3579
|
+
z.ZodTypeDef,
|
|
3580
|
+
RunAgentToolChoiceAgents2
|
|
3581
|
+
> = z.object({
|
|
3582
|
+
type: RunAgentToolChoiceAgentsType$outboundSchema.optional(),
|
|
3583
|
+
function: z.lazy(() => RunAgentToolChoiceAgentsFunction$outboundSchema),
|
|
3584
|
+
});
|
|
3585
|
+
|
|
3586
|
+
/**
|
|
3587
|
+
* @internal
|
|
3588
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3589
|
+
*/
|
|
3590
|
+
export namespace RunAgentToolChoiceAgents2$ {
|
|
3591
|
+
/** @deprecated use `RunAgentToolChoiceAgents2$inboundSchema` instead. */
|
|
3592
|
+
export const inboundSchema = RunAgentToolChoiceAgents2$inboundSchema;
|
|
3593
|
+
/** @deprecated use `RunAgentToolChoiceAgents2$outboundSchema` instead. */
|
|
3594
|
+
export const outboundSchema = RunAgentToolChoiceAgents2$outboundSchema;
|
|
3595
|
+
/** @deprecated use `RunAgentToolChoiceAgents2$Outbound` instead. */
|
|
3596
|
+
export type Outbound = RunAgentToolChoiceAgents2$Outbound;
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
export function runAgentToolChoiceAgents2ToJSON(
|
|
3600
|
+
runAgentToolChoiceAgents2: RunAgentToolChoiceAgents2,
|
|
3601
|
+
): string {
|
|
3602
|
+
return JSON.stringify(
|
|
3603
|
+
RunAgentToolChoiceAgents2$outboundSchema.parse(runAgentToolChoiceAgents2),
|
|
3604
|
+
);
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
export function runAgentToolChoiceAgents2FromJSON(
|
|
3608
|
+
jsonString: string,
|
|
3609
|
+
): SafeParseResult<RunAgentToolChoiceAgents2, SDKValidationError> {
|
|
3610
|
+
return safeParse(
|
|
3611
|
+
jsonString,
|
|
3612
|
+
(x) => RunAgentToolChoiceAgents2$inboundSchema.parse(JSON.parse(x)),
|
|
3613
|
+
`Failed to parse 'RunAgentToolChoiceAgents2' from JSON`,
|
|
3614
|
+
);
|
|
3615
|
+
}
|
|
3616
|
+
|
|
3617
|
+
/** @internal */
|
|
3618
|
+
export const RunAgentToolChoiceAgents1$inboundSchema: z.ZodNativeEnum<
|
|
3619
|
+
typeof RunAgentToolChoiceAgents1
|
|
3620
|
+
> = z.nativeEnum(RunAgentToolChoiceAgents1);
|
|
3621
|
+
|
|
3622
|
+
/** @internal */
|
|
3623
|
+
export const RunAgentToolChoiceAgents1$outboundSchema: z.ZodNativeEnum<
|
|
3624
|
+
typeof RunAgentToolChoiceAgents1
|
|
3625
|
+
> = RunAgentToolChoiceAgents1$inboundSchema;
|
|
3626
|
+
|
|
3627
|
+
/**
|
|
3628
|
+
* @internal
|
|
3629
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3630
|
+
*/
|
|
3631
|
+
export namespace RunAgentToolChoiceAgents1$ {
|
|
3632
|
+
/** @deprecated use `RunAgentToolChoiceAgents1$inboundSchema` instead. */
|
|
3633
|
+
export const inboundSchema = RunAgentToolChoiceAgents1$inboundSchema;
|
|
3634
|
+
/** @deprecated use `RunAgentToolChoiceAgents1$outboundSchema` instead. */
|
|
3635
|
+
export const outboundSchema = RunAgentToolChoiceAgents1$outboundSchema;
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
/** @internal */
|
|
3639
|
+
export const RunAgentFallbackModelsToolChoice$inboundSchema: z.ZodType<
|
|
3640
|
+
RunAgentFallbackModelsToolChoice,
|
|
3641
|
+
z.ZodTypeDef,
|
|
3642
|
+
unknown
|
|
3643
|
+
> = z.union([
|
|
3644
|
+
z.lazy(() => RunAgentToolChoiceAgents2$inboundSchema),
|
|
3645
|
+
RunAgentToolChoiceAgents1$inboundSchema,
|
|
3646
|
+
]);
|
|
3647
|
+
|
|
3648
|
+
/** @internal */
|
|
3649
|
+
export type RunAgentFallbackModelsToolChoice$Outbound =
|
|
3650
|
+
| RunAgentToolChoiceAgents2$Outbound
|
|
3651
|
+
| string;
|
|
3652
|
+
|
|
3653
|
+
/** @internal */
|
|
3654
|
+
export const RunAgentFallbackModelsToolChoice$outboundSchema: z.ZodType<
|
|
3655
|
+
RunAgentFallbackModelsToolChoice$Outbound,
|
|
3656
|
+
z.ZodTypeDef,
|
|
3657
|
+
RunAgentFallbackModelsToolChoice
|
|
3658
|
+
> = z.union([
|
|
3659
|
+
z.lazy(() => RunAgentToolChoiceAgents2$outboundSchema),
|
|
3660
|
+
RunAgentToolChoiceAgents1$outboundSchema,
|
|
3661
|
+
]);
|
|
808
3662
|
|
|
809
3663
|
/**
|
|
810
|
-
*
|
|
811
|
-
|
|
812
|
-
export const RunAgentState = {
|
|
813
|
-
Submitted: "submitted",
|
|
814
|
-
Working: "working",
|
|
815
|
-
InputRequired: "input-required",
|
|
816
|
-
Completed: "completed",
|
|
817
|
-
Failed: "failed",
|
|
818
|
-
Canceled: "canceled",
|
|
819
|
-
Rejected: "rejected",
|
|
820
|
-
AuthRequired: "auth-required",
|
|
821
|
-
Unknown: "unknown",
|
|
822
|
-
} as const;
|
|
823
|
-
/**
|
|
824
|
-
* Current task state
|
|
3664
|
+
* @internal
|
|
3665
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
825
3666
|
*/
|
|
826
|
-
export
|
|
3667
|
+
export namespace RunAgentFallbackModelsToolChoice$ {
|
|
3668
|
+
/** @deprecated use `RunAgentFallbackModelsToolChoice$inboundSchema` instead. */
|
|
3669
|
+
export const inboundSchema = RunAgentFallbackModelsToolChoice$inboundSchema;
|
|
3670
|
+
/** @deprecated use `RunAgentFallbackModelsToolChoice$outboundSchema` instead. */
|
|
3671
|
+
export const outboundSchema = RunAgentFallbackModelsToolChoice$outboundSchema;
|
|
3672
|
+
/** @deprecated use `RunAgentFallbackModelsToolChoice$Outbound` instead. */
|
|
3673
|
+
export type Outbound = RunAgentFallbackModelsToolChoice$Outbound;
|
|
3674
|
+
}
|
|
827
3675
|
|
|
828
|
-
export
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
3676
|
+
export function runAgentFallbackModelsToolChoiceToJSON(
|
|
3677
|
+
runAgentFallbackModelsToolChoice: RunAgentFallbackModelsToolChoice,
|
|
3678
|
+
): string {
|
|
3679
|
+
return JSON.stringify(
|
|
3680
|
+
RunAgentFallbackModelsToolChoice$outboundSchema.parse(
|
|
3681
|
+
runAgentFallbackModelsToolChoice,
|
|
3682
|
+
),
|
|
3683
|
+
);
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
export function runAgentFallbackModelsToolChoiceFromJSON(
|
|
3687
|
+
jsonString: string,
|
|
3688
|
+
): SafeParseResult<RunAgentFallbackModelsToolChoice, SDKValidationError> {
|
|
3689
|
+
return safeParse(
|
|
3690
|
+
jsonString,
|
|
3691
|
+
(x) => RunAgentFallbackModelsToolChoice$inboundSchema.parse(JSON.parse(x)),
|
|
3692
|
+
`Failed to parse 'RunAgentFallbackModelsToolChoice' from JSON`,
|
|
3693
|
+
);
|
|
3694
|
+
}
|
|
3695
|
+
|
|
3696
|
+
/** @internal */
|
|
3697
|
+
export const RunAgentFallbackModelsModalities$inboundSchema: z.ZodNativeEnum<
|
|
3698
|
+
typeof RunAgentFallbackModelsModalities
|
|
3699
|
+
> = z.nativeEnum(RunAgentFallbackModelsModalities);
|
|
3700
|
+
|
|
3701
|
+
/** @internal */
|
|
3702
|
+
export const RunAgentFallbackModelsModalities$outboundSchema: z.ZodNativeEnum<
|
|
3703
|
+
typeof RunAgentFallbackModelsModalities
|
|
3704
|
+
> = RunAgentFallbackModelsModalities$inboundSchema;
|
|
832
3705
|
|
|
833
3706
|
/**
|
|
834
|
-
*
|
|
3707
|
+
* @internal
|
|
3708
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
835
3709
|
*/
|
|
836
|
-
export
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
}
|
|
3710
|
+
export namespace RunAgentFallbackModelsModalities$ {
|
|
3711
|
+
/** @deprecated use `RunAgentFallbackModelsModalities$inboundSchema` instead. */
|
|
3712
|
+
export const inboundSchema = RunAgentFallbackModelsModalities$inboundSchema;
|
|
3713
|
+
/** @deprecated use `RunAgentFallbackModelsModalities$outboundSchema` instead. */
|
|
3714
|
+
export const outboundSchema = RunAgentFallbackModelsModalities$outboundSchema;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3717
|
+
/** @internal */
|
|
3718
|
+
export const RunAgentFallbackModelsWebSearchOptions$inboundSchema: z.ZodType<
|
|
3719
|
+
RunAgentFallbackModelsWebSearchOptions,
|
|
3720
|
+
z.ZodTypeDef,
|
|
3721
|
+
unknown
|
|
3722
|
+
> = z.object({
|
|
3723
|
+
enabled: z.boolean().optional(),
|
|
3724
|
+
});
|
|
3725
|
+
|
|
3726
|
+
/** @internal */
|
|
3727
|
+
export type RunAgentFallbackModelsWebSearchOptions$Outbound = {
|
|
3728
|
+
enabled?: boolean | undefined;
|
|
3729
|
+
};
|
|
3730
|
+
|
|
3731
|
+
/** @internal */
|
|
3732
|
+
export const RunAgentFallbackModelsWebSearchOptions$outboundSchema: z.ZodType<
|
|
3733
|
+
RunAgentFallbackModelsWebSearchOptions$Outbound,
|
|
3734
|
+
z.ZodTypeDef,
|
|
3735
|
+
RunAgentFallbackModelsWebSearchOptions
|
|
3736
|
+
> = z.object({
|
|
3737
|
+
enabled: z.boolean().optional(),
|
|
3738
|
+
});
|
|
3739
|
+
|
|
842
3740
|
/**
|
|
843
|
-
*
|
|
3741
|
+
* @internal
|
|
3742
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
844
3743
|
*/
|
|
845
|
-
export
|
|
3744
|
+
export namespace RunAgentFallbackModelsWebSearchOptions$ {
|
|
3745
|
+
/** @deprecated use `RunAgentFallbackModelsWebSearchOptions$inboundSchema` instead. */
|
|
3746
|
+
export const inboundSchema =
|
|
3747
|
+
RunAgentFallbackModelsWebSearchOptions$inboundSchema;
|
|
3748
|
+
/** @deprecated use `RunAgentFallbackModelsWebSearchOptions$outboundSchema` instead. */
|
|
3749
|
+
export const outboundSchema =
|
|
3750
|
+
RunAgentFallbackModelsWebSearchOptions$outboundSchema;
|
|
3751
|
+
/** @deprecated use `RunAgentFallbackModelsWebSearchOptions$Outbound` instead. */
|
|
3752
|
+
export type Outbound = RunAgentFallbackModelsWebSearchOptions$Outbound;
|
|
3753
|
+
}
|
|
3754
|
+
|
|
3755
|
+
export function runAgentFallbackModelsWebSearchOptionsToJSON(
|
|
3756
|
+
runAgentFallbackModelsWebSearchOptions:
|
|
3757
|
+
RunAgentFallbackModelsWebSearchOptions,
|
|
3758
|
+
): string {
|
|
3759
|
+
return JSON.stringify(
|
|
3760
|
+
RunAgentFallbackModelsWebSearchOptions$outboundSchema.parse(
|
|
3761
|
+
runAgentFallbackModelsWebSearchOptions,
|
|
3762
|
+
),
|
|
3763
|
+
);
|
|
3764
|
+
}
|
|
3765
|
+
|
|
3766
|
+
export function runAgentFallbackModelsWebSearchOptionsFromJSON(
|
|
3767
|
+
jsonString: string,
|
|
3768
|
+
): SafeParseResult<RunAgentFallbackModelsWebSearchOptions, SDKValidationError> {
|
|
3769
|
+
return safeParse(
|
|
3770
|
+
jsonString,
|
|
3771
|
+
(x) =>
|
|
3772
|
+
RunAgentFallbackModelsWebSearchOptions$inboundSchema.parse(JSON.parse(x)),
|
|
3773
|
+
`Failed to parse 'RunAgentFallbackModelsWebSearchOptions' from JSON`,
|
|
3774
|
+
);
|
|
3775
|
+
}
|
|
3776
|
+
|
|
3777
|
+
/** @internal */
|
|
3778
|
+
export const RunAgentFallbackModelsParameters$inboundSchema: z.ZodType<
|
|
3779
|
+
RunAgentFallbackModelsParameters,
|
|
3780
|
+
z.ZodTypeDef,
|
|
3781
|
+
unknown
|
|
3782
|
+
> = z.object({
|
|
3783
|
+
audio: z.nullable(z.lazy(() => RunAgentFallbackModelsAudio$inboundSchema))
|
|
3784
|
+
.optional(),
|
|
3785
|
+
frequency_penalty: z.nullable(z.number()).optional(),
|
|
3786
|
+
max_tokens: z.nullable(z.number().int()).optional(),
|
|
3787
|
+
max_completion_tokens: z.nullable(z.number().int()).optional(),
|
|
3788
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
3789
|
+
top_logprobs: z.nullable(z.number().int()).optional(),
|
|
3790
|
+
n: z.nullable(z.number().int()).optional(),
|
|
3791
|
+
presence_penalty: z.nullable(z.number()).optional(),
|
|
3792
|
+
response_format: z.union([
|
|
3793
|
+
z.lazy(() => RunAgentResponseFormatAgents3$inboundSchema),
|
|
3794
|
+
z.lazy(() => RunAgentResponseFormatAgents1$inboundSchema),
|
|
3795
|
+
z.lazy(() => RunAgentResponseFormatAgents2$inboundSchema),
|
|
3796
|
+
]).optional(),
|
|
3797
|
+
reasoning_effort: z.string().optional(),
|
|
3798
|
+
verbosity: z.string().optional(),
|
|
3799
|
+
seed: z.nullable(z.number()).optional(),
|
|
3800
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
3801
|
+
stream_options: z.nullable(
|
|
3802
|
+
z.lazy(() => RunAgentFallbackModelsStreamOptions$inboundSchema),
|
|
3803
|
+
).optional(),
|
|
3804
|
+
thinking: z.lazy(() => RunAgentFallbackModelsThinking$inboundSchema)
|
|
3805
|
+
.optional(),
|
|
3806
|
+
temperature: z.nullable(z.number()).optional(),
|
|
3807
|
+
top_p: z.nullable(z.number()).optional(),
|
|
3808
|
+
top_k: z.nullable(z.number()).optional(),
|
|
3809
|
+
tool_choice: z.union([
|
|
3810
|
+
z.lazy(() => RunAgentToolChoiceAgents2$inboundSchema),
|
|
3811
|
+
RunAgentToolChoiceAgents1$inboundSchema,
|
|
3812
|
+
]).optional(),
|
|
3813
|
+
parallel_tool_calls: z.boolean().optional(),
|
|
3814
|
+
modalities: z.nullable(
|
|
3815
|
+
z.array(RunAgentFallbackModelsModalities$inboundSchema),
|
|
3816
|
+
).optional(),
|
|
3817
|
+
web_search_options: z.lazy(() =>
|
|
3818
|
+
RunAgentFallbackModelsWebSearchOptions$inboundSchema
|
|
3819
|
+
).optional(),
|
|
3820
|
+
}).transform((v) => {
|
|
3821
|
+
return remap$(v, {
|
|
3822
|
+
"frequency_penalty": "frequencyPenalty",
|
|
3823
|
+
"max_tokens": "maxTokens",
|
|
3824
|
+
"max_completion_tokens": "maxCompletionTokens",
|
|
3825
|
+
"top_logprobs": "topLogprobs",
|
|
3826
|
+
"presence_penalty": "presencePenalty",
|
|
3827
|
+
"response_format": "responseFormat",
|
|
3828
|
+
"reasoning_effort": "reasoningEffort",
|
|
3829
|
+
"stream_options": "streamOptions",
|
|
3830
|
+
"top_p": "topP",
|
|
3831
|
+
"top_k": "topK",
|
|
3832
|
+
"tool_choice": "toolChoice",
|
|
3833
|
+
"parallel_tool_calls": "parallelToolCalls",
|
|
3834
|
+
"web_search_options": "webSearchOptions",
|
|
3835
|
+
});
|
|
3836
|
+
});
|
|
3837
|
+
|
|
3838
|
+
/** @internal */
|
|
3839
|
+
export type RunAgentFallbackModelsParameters$Outbound = {
|
|
3840
|
+
audio?: RunAgentFallbackModelsAudio$Outbound | null | undefined;
|
|
3841
|
+
frequency_penalty?: number | null | undefined;
|
|
3842
|
+
max_tokens?: number | null | undefined;
|
|
3843
|
+
max_completion_tokens?: number | null | undefined;
|
|
3844
|
+
logprobs?: boolean | null | undefined;
|
|
3845
|
+
top_logprobs?: number | null | undefined;
|
|
3846
|
+
n?: number | null | undefined;
|
|
3847
|
+
presence_penalty?: number | null | undefined;
|
|
3848
|
+
response_format?:
|
|
3849
|
+
| RunAgentResponseFormatAgents3$Outbound
|
|
3850
|
+
| RunAgentResponseFormatAgents1$Outbound
|
|
3851
|
+
| RunAgentResponseFormatAgents2$Outbound
|
|
3852
|
+
| undefined;
|
|
3853
|
+
reasoning_effort?: string | undefined;
|
|
3854
|
+
verbosity?: string | undefined;
|
|
3855
|
+
seed?: number | null | undefined;
|
|
3856
|
+
stop?: string | Array<string> | null | undefined;
|
|
3857
|
+
stream_options?:
|
|
3858
|
+
| RunAgentFallbackModelsStreamOptions$Outbound
|
|
3859
|
+
| null
|
|
3860
|
+
| undefined;
|
|
3861
|
+
thinking?: RunAgentFallbackModelsThinking$Outbound | undefined;
|
|
3862
|
+
temperature?: number | null | undefined;
|
|
3863
|
+
top_p?: number | null | undefined;
|
|
3864
|
+
top_k?: number | null | undefined;
|
|
3865
|
+
tool_choice?: RunAgentToolChoiceAgents2$Outbound | string | undefined;
|
|
3866
|
+
parallel_tool_calls?: boolean | undefined;
|
|
3867
|
+
modalities?: Array<string> | null | undefined;
|
|
3868
|
+
web_search_options?:
|
|
3869
|
+
| RunAgentFallbackModelsWebSearchOptions$Outbound
|
|
3870
|
+
| undefined;
|
|
3871
|
+
};
|
|
3872
|
+
|
|
3873
|
+
/** @internal */
|
|
3874
|
+
export const RunAgentFallbackModelsParameters$outboundSchema: z.ZodType<
|
|
3875
|
+
RunAgentFallbackModelsParameters$Outbound,
|
|
3876
|
+
z.ZodTypeDef,
|
|
3877
|
+
RunAgentFallbackModelsParameters
|
|
3878
|
+
> = z.object({
|
|
3879
|
+
audio: z.nullable(z.lazy(() => RunAgentFallbackModelsAudio$outboundSchema))
|
|
3880
|
+
.optional(),
|
|
3881
|
+
frequencyPenalty: z.nullable(z.number()).optional(),
|
|
3882
|
+
maxTokens: z.nullable(z.number().int()).optional(),
|
|
3883
|
+
maxCompletionTokens: z.nullable(z.number().int()).optional(),
|
|
3884
|
+
logprobs: z.nullable(z.boolean()).optional(),
|
|
3885
|
+
topLogprobs: z.nullable(z.number().int()).optional(),
|
|
3886
|
+
n: z.nullable(z.number().int()).optional(),
|
|
3887
|
+
presencePenalty: z.nullable(z.number()).optional(),
|
|
3888
|
+
responseFormat: z.union([
|
|
3889
|
+
z.lazy(() => RunAgentResponseFormatAgents3$outboundSchema),
|
|
3890
|
+
z.lazy(() => RunAgentResponseFormatAgents1$outboundSchema),
|
|
3891
|
+
z.lazy(() => RunAgentResponseFormatAgents2$outboundSchema),
|
|
3892
|
+
]).optional(),
|
|
3893
|
+
reasoningEffort: z.string().optional(),
|
|
3894
|
+
verbosity: z.string().optional(),
|
|
3895
|
+
seed: z.nullable(z.number()).optional(),
|
|
3896
|
+
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
3897
|
+
streamOptions: z.nullable(
|
|
3898
|
+
z.lazy(() => RunAgentFallbackModelsStreamOptions$outboundSchema),
|
|
3899
|
+
).optional(),
|
|
3900
|
+
thinking: z.lazy(() => RunAgentFallbackModelsThinking$outboundSchema)
|
|
3901
|
+
.optional(),
|
|
3902
|
+
temperature: z.nullable(z.number()).optional(),
|
|
3903
|
+
topP: z.nullable(z.number()).optional(),
|
|
3904
|
+
topK: z.nullable(z.number()).optional(),
|
|
3905
|
+
toolChoice: z.union([
|
|
3906
|
+
z.lazy(() => RunAgentToolChoiceAgents2$outboundSchema),
|
|
3907
|
+
RunAgentToolChoiceAgents1$outboundSchema,
|
|
3908
|
+
]).optional(),
|
|
3909
|
+
parallelToolCalls: z.boolean().optional(),
|
|
3910
|
+
modalities: z.nullable(
|
|
3911
|
+
z.array(RunAgentFallbackModelsModalities$outboundSchema),
|
|
3912
|
+
).optional(),
|
|
3913
|
+
webSearchOptions: z.lazy(() =>
|
|
3914
|
+
RunAgentFallbackModelsWebSearchOptions$outboundSchema
|
|
3915
|
+
).optional(),
|
|
3916
|
+
}).transform((v) => {
|
|
3917
|
+
return remap$(v, {
|
|
3918
|
+
frequencyPenalty: "frequency_penalty",
|
|
3919
|
+
maxTokens: "max_tokens",
|
|
3920
|
+
maxCompletionTokens: "max_completion_tokens",
|
|
3921
|
+
topLogprobs: "top_logprobs",
|
|
3922
|
+
presencePenalty: "presence_penalty",
|
|
3923
|
+
responseFormat: "response_format",
|
|
3924
|
+
reasoningEffort: "reasoning_effort",
|
|
3925
|
+
streamOptions: "stream_options",
|
|
3926
|
+
topP: "top_p",
|
|
3927
|
+
topK: "top_k",
|
|
3928
|
+
toolChoice: "tool_choice",
|
|
3929
|
+
parallelToolCalls: "parallel_tool_calls",
|
|
3930
|
+
webSearchOptions: "web_search_options",
|
|
3931
|
+
});
|
|
3932
|
+
});
|
|
846
3933
|
|
|
847
3934
|
/**
|
|
848
|
-
*
|
|
3935
|
+
* @internal
|
|
3936
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
849
3937
|
*/
|
|
850
|
-
export
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
/**
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
3938
|
+
export namespace RunAgentFallbackModelsParameters$ {
|
|
3939
|
+
/** @deprecated use `RunAgentFallbackModelsParameters$inboundSchema` instead. */
|
|
3940
|
+
export const inboundSchema = RunAgentFallbackModelsParameters$inboundSchema;
|
|
3941
|
+
/** @deprecated use `RunAgentFallbackModelsParameters$outboundSchema` instead. */
|
|
3942
|
+
export const outboundSchema = RunAgentFallbackModelsParameters$outboundSchema;
|
|
3943
|
+
/** @deprecated use `RunAgentFallbackModelsParameters$Outbound` instead. */
|
|
3944
|
+
export type Outbound = RunAgentFallbackModelsParameters$Outbound;
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
export function runAgentFallbackModelsParametersToJSON(
|
|
3948
|
+
runAgentFallbackModelsParameters: RunAgentFallbackModelsParameters,
|
|
3949
|
+
): string {
|
|
3950
|
+
return JSON.stringify(
|
|
3951
|
+
RunAgentFallbackModelsParameters$outboundSchema.parse(
|
|
3952
|
+
runAgentFallbackModelsParameters,
|
|
3953
|
+
),
|
|
3954
|
+
);
|
|
3955
|
+
}
|
|
3956
|
+
|
|
3957
|
+
export function runAgentFallbackModelsParametersFromJSON(
|
|
3958
|
+
jsonString: string,
|
|
3959
|
+
): SafeParseResult<RunAgentFallbackModelsParameters, SDKValidationError> {
|
|
3960
|
+
return safeParse(
|
|
3961
|
+
jsonString,
|
|
3962
|
+
(x) => RunAgentFallbackModelsParameters$inboundSchema.parse(JSON.parse(x)),
|
|
3963
|
+
`Failed to parse 'RunAgentFallbackModelsParameters' from JSON`,
|
|
3964
|
+
);
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
/** @internal */
|
|
3968
|
+
export const RunAgentFallbackModels2$inboundSchema: z.ZodType<
|
|
3969
|
+
RunAgentFallbackModels2,
|
|
3970
|
+
z.ZodTypeDef,
|
|
3971
|
+
unknown
|
|
3972
|
+
> = z.object({
|
|
3973
|
+
id: z.string(),
|
|
3974
|
+
integration_id: z.nullable(z.string()).optional(),
|
|
3975
|
+
parameters: z.lazy(() => RunAgentFallbackModelsParameters$inboundSchema)
|
|
3976
|
+
.optional(),
|
|
3977
|
+
}).transform((v) => {
|
|
3978
|
+
return remap$(v, {
|
|
3979
|
+
"integration_id": "integrationId",
|
|
3980
|
+
});
|
|
3981
|
+
});
|
|
3982
|
+
|
|
3983
|
+
/** @internal */
|
|
3984
|
+
export type RunAgentFallbackModels2$Outbound = {
|
|
3985
|
+
id: string;
|
|
3986
|
+
integration_id?: string | null | undefined;
|
|
3987
|
+
parameters?: RunAgentFallbackModelsParameters$Outbound | undefined;
|
|
858
3988
|
};
|
|
859
3989
|
|
|
3990
|
+
/** @internal */
|
|
3991
|
+
export const RunAgentFallbackModels2$outboundSchema: z.ZodType<
|
|
3992
|
+
RunAgentFallbackModels2$Outbound,
|
|
3993
|
+
z.ZodTypeDef,
|
|
3994
|
+
RunAgentFallbackModels2
|
|
3995
|
+
> = z.object({
|
|
3996
|
+
id: z.string(),
|
|
3997
|
+
integrationId: z.nullable(z.string()).optional(),
|
|
3998
|
+
parameters: z.lazy(() => RunAgentFallbackModelsParameters$outboundSchema)
|
|
3999
|
+
.optional(),
|
|
4000
|
+
}).transform((v) => {
|
|
4001
|
+
return remap$(v, {
|
|
4002
|
+
integrationId: "integration_id",
|
|
4003
|
+
});
|
|
4004
|
+
});
|
|
4005
|
+
|
|
860
4006
|
/**
|
|
861
|
-
*
|
|
4007
|
+
* @internal
|
|
4008
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
862
4009
|
*/
|
|
863
|
-
export
|
|
864
|
-
/**
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
/**
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
4010
|
+
export namespace RunAgentFallbackModels2$ {
|
|
4011
|
+
/** @deprecated use `RunAgentFallbackModels2$inboundSchema` instead. */
|
|
4012
|
+
export const inboundSchema = RunAgentFallbackModels2$inboundSchema;
|
|
4013
|
+
/** @deprecated use `RunAgentFallbackModels2$outboundSchema` instead. */
|
|
4014
|
+
export const outboundSchema = RunAgentFallbackModels2$outboundSchema;
|
|
4015
|
+
/** @deprecated use `RunAgentFallbackModels2$Outbound` instead. */
|
|
4016
|
+
export type Outbound = RunAgentFallbackModels2$Outbound;
|
|
4017
|
+
}
|
|
4018
|
+
|
|
4019
|
+
export function runAgentFallbackModels2ToJSON(
|
|
4020
|
+
runAgentFallbackModels2: RunAgentFallbackModels2,
|
|
4021
|
+
): string {
|
|
4022
|
+
return JSON.stringify(
|
|
4023
|
+
RunAgentFallbackModels2$outboundSchema.parse(runAgentFallbackModels2),
|
|
4024
|
+
);
|
|
4025
|
+
}
|
|
4026
|
+
|
|
4027
|
+
export function runAgentFallbackModels2FromJSON(
|
|
4028
|
+
jsonString: string,
|
|
4029
|
+
): SafeParseResult<RunAgentFallbackModels2, SDKValidationError> {
|
|
4030
|
+
return safeParse(
|
|
4031
|
+
jsonString,
|
|
4032
|
+
(x) => RunAgentFallbackModels2$inboundSchema.parse(JSON.parse(x)),
|
|
4033
|
+
`Failed to parse 'RunAgentFallbackModels2' from JSON`,
|
|
4034
|
+
);
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
/** @internal */
|
|
4038
|
+
export const RunAgentFallbackModels$inboundSchema: z.ZodType<
|
|
4039
|
+
RunAgentFallbackModels,
|
|
4040
|
+
z.ZodTypeDef,
|
|
4041
|
+
unknown
|
|
4042
|
+
> = z.union([z.lazy(() => RunAgentFallbackModels2$inboundSchema), z.string()]);
|
|
4043
|
+
|
|
4044
|
+
/** @internal */
|
|
4045
|
+
export type RunAgentFallbackModels$Outbound =
|
|
4046
|
+
| RunAgentFallbackModels2$Outbound
|
|
4047
|
+
| string;
|
|
4048
|
+
|
|
4049
|
+
/** @internal */
|
|
4050
|
+
export const RunAgentFallbackModels$outboundSchema: z.ZodType<
|
|
4051
|
+
RunAgentFallbackModels$Outbound,
|
|
4052
|
+
z.ZodTypeDef,
|
|
4053
|
+
RunAgentFallbackModels
|
|
4054
|
+
> = z.union([z.lazy(() => RunAgentFallbackModels2$outboundSchema), z.string()]);
|
|
877
4055
|
|
|
878
4056
|
/**
|
|
879
|
-
*
|
|
4057
|
+
* @internal
|
|
4058
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
880
4059
|
*/
|
|
881
|
-
export
|
|
882
|
-
/**
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
/**
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
4060
|
+
export namespace RunAgentFallbackModels$ {
|
|
4061
|
+
/** @deprecated use `RunAgentFallbackModels$inboundSchema` instead. */
|
|
4062
|
+
export const inboundSchema = RunAgentFallbackModels$inboundSchema;
|
|
4063
|
+
/** @deprecated use `RunAgentFallbackModels$outboundSchema` instead. */
|
|
4064
|
+
export const outboundSchema = RunAgentFallbackModels$outboundSchema;
|
|
4065
|
+
/** @deprecated use `RunAgentFallbackModels$Outbound` instead. */
|
|
4066
|
+
export type Outbound = RunAgentFallbackModels$Outbound;
|
|
4067
|
+
}
|
|
4068
|
+
|
|
4069
|
+
export function runAgentFallbackModelsToJSON(
|
|
4070
|
+
runAgentFallbackModels: RunAgentFallbackModels,
|
|
4071
|
+
): string {
|
|
4072
|
+
return JSON.stringify(
|
|
4073
|
+
RunAgentFallbackModels$outboundSchema.parse(runAgentFallbackModels),
|
|
4074
|
+
);
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4077
|
+
export function runAgentFallbackModelsFromJSON(
|
|
4078
|
+
jsonString: string,
|
|
4079
|
+
): SafeParseResult<RunAgentFallbackModels, SDKValidationError> {
|
|
4080
|
+
return safeParse(
|
|
4081
|
+
jsonString,
|
|
4082
|
+
(x) => RunAgentFallbackModels$inboundSchema.parse(JSON.parse(x)),
|
|
4083
|
+
`Failed to parse 'RunAgentFallbackModels' from JSON`,
|
|
4084
|
+
);
|
|
4085
|
+
}
|
|
903
4086
|
|
|
904
4087
|
/** @internal */
|
|
905
4088
|
export const RunAgentRoleToolMessage$inboundSchema: z.ZodNativeEnum<
|
|
@@ -3952,8 +7135,10 @@ export const RunAgentRequestBody$inboundSchema: z.ZodType<
|
|
|
3952
7135
|
> = z.object({
|
|
3953
7136
|
key: z.string(),
|
|
3954
7137
|
task_id: z.string().optional(),
|
|
3955
|
-
model: z.string(),
|
|
3956
|
-
fallback_models: z.array(
|
|
7138
|
+
model: z.union([z.lazy(() => RunAgentModel2$inboundSchema), z.string()]),
|
|
7139
|
+
fallback_models: z.array(
|
|
7140
|
+
z.union([z.lazy(() => RunAgentFallbackModels2$inboundSchema), z.string()]),
|
|
7141
|
+
).optional(),
|
|
3957
7142
|
role: z.string(),
|
|
3958
7143
|
instructions: z.string(),
|
|
3959
7144
|
message: z.lazy(() => RunAgentMessage$inboundSchema),
|
|
@@ -3986,8 +7171,10 @@ export const RunAgentRequestBody$inboundSchema: z.ZodType<
|
|
|
3986
7171
|
export type RunAgentRequestBody$Outbound = {
|
|
3987
7172
|
key: string;
|
|
3988
7173
|
task_id?: string | undefined;
|
|
3989
|
-
model: string;
|
|
3990
|
-
fallback_models?:
|
|
7174
|
+
model: RunAgentModel2$Outbound | string;
|
|
7175
|
+
fallback_models?:
|
|
7176
|
+
| Array<RunAgentFallbackModels2$Outbound | string>
|
|
7177
|
+
| undefined;
|
|
3991
7178
|
role: string;
|
|
3992
7179
|
instructions: string;
|
|
3993
7180
|
message: RunAgentMessage$Outbound;
|
|
@@ -4013,8 +7200,10 @@ export const RunAgentRequestBody$outboundSchema: z.ZodType<
|
|
|
4013
7200
|
> = z.object({
|
|
4014
7201
|
key: z.string(),
|
|
4015
7202
|
taskId: z.string().optional(),
|
|
4016
|
-
model: z.string(),
|
|
4017
|
-
fallbackModels: z.array(
|
|
7203
|
+
model: z.union([z.lazy(() => RunAgentModel2$outboundSchema), z.string()]),
|
|
7204
|
+
fallbackModels: z.array(
|
|
7205
|
+
z.union([z.lazy(() => RunAgentFallbackModels2$outboundSchema), z.string()]),
|
|
7206
|
+
).optional(),
|
|
4018
7207
|
role: z.string(),
|
|
4019
7208
|
instructions: z.string(),
|
|
4020
7209
|
message: z.lazy(() => RunAgentMessage$outboundSchema),
|