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