@orq-ai/node 3.1.7 → 3.2.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -38
- package/docs/sdks/deployments/README.md +0 -81
- package/jsr.json +1 -2
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +1 -4
- package/lib/matchers.js.map +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +3 -2
- package/sdk/deployments.d.ts +0 -8
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +0 -10
- package/sdk/deployments.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/matchers.ts +1 -4
- package/src/models/operations/createcontact.ts +2 -2
- 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/index.ts +0 -1
- package/src/sdk/deployments.ts +0 -19
- package/funcs/deploymentsStream.d.ts +0 -16
- package/funcs/deploymentsStream.d.ts.map +0 -1
- package/funcs/deploymentsStream.js +0 -126
- package/funcs/deploymentsStream.js.map +0 -1
- package/lib/event-streams.d.ts +0 -17
- package/lib/event-streams.d.ts.map +0 -1
- package/lib/event-streams.js +0 -220
- package/lib/event-streams.js.map +0 -1
- package/models/operations/deploymentstream.d.ts +0 -1622
- package/models/operations/deploymentstream.d.ts.map +0 -1
- package/models/operations/deploymentstream.js +0 -1571
- package/models/operations/deploymentstream.js.map +0 -1
- package/packages/orq-rc/FUNCTIONS.md +0 -106
- package/packages/orq-rc/README.md +0 -506
- package/packages/orq-rc/RUNTIMES.md +0 -48
- package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
- package/packages/orq-rc/docs/sdks/deployments/README.md +0 -235
- package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
- package/packages/orq-rc/docs/sdks/files/README.md +0 -305
- package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
- package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
- package/packages/orq-rc/docs/sdks/prompts/README.md +0 -608
- package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
- package/packages/orq-rc/jsr.json +0 -27
- package/packages/orq-rc/package-lock.json +0 -1861
- package/packages/orq-rc/package.json +0 -31
- package/packages/orq-rc/src/core.ts +0 -13
- package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -127
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -135
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -143
- package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -142
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -135
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -127
- package/packages/orq-rc/src/funcs/filesCreate.ts +0 -150
- package/packages/orq-rc/src/funcs/filesDelete.ts +0 -131
- package/packages/orq-rc/src/funcs/filesGet.ts +0 -133
- package/packages/orq-rc/src/funcs/filesList.ts +0 -134
- package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -127
- package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -131
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -147
- package/packages/orq-rc/src/funcs/promptsList.ts +0 -134
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -140
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -133
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -139
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -128
- package/packages/orq-rc/src/hooks/global.ts +0 -44
- package/packages/orq-rc/src/hooks/hooks.ts +0 -132
- package/packages/orq-rc/src/hooks/index.ts +0 -6
- package/packages/orq-rc/src/hooks/registration.ts +0 -15
- package/packages/orq-rc/src/hooks/types.ts +0 -110
- package/packages/orq-rc/src/index.ts +0 -7
- package/packages/orq-rc/src/lib/base64.ts +0 -37
- package/packages/orq-rc/src/lib/config.ts +0 -70
- package/packages/orq-rc/src/lib/dlv.ts +0 -53
- package/packages/orq-rc/src/lib/encodings.ts +0 -483
- package/packages/orq-rc/src/lib/env.ts +0 -73
- package/packages/orq-rc/src/lib/files.ts +0 -40
- package/packages/orq-rc/src/lib/http.ts +0 -323
- package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
- package/packages/orq-rc/src/lib/logger.ts +0 -9
- package/packages/orq-rc/src/lib/matchers.ts +0 -322
- package/packages/orq-rc/src/lib/primitives.ts +0 -136
- package/packages/orq-rc/src/lib/retries.ts +0 -218
- package/packages/orq-rc/src/lib/schemas.ts +0 -91
- package/packages/orq-rc/src/lib/sdks.ts +0 -400
- package/packages/orq-rc/src/lib/security.ts +0 -253
- package/packages/orq-rc/src/lib/url.ts +0 -33
- package/packages/orq-rc/src/models/components/deployments.ts +0 -1666
- package/packages/orq-rc/src/models/components/index.ts +0 -6
- package/packages/orq-rc/src/models/components/security.ts +0 -71
- package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
- package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
- package/packages/orq-rc/src/models/errors/index.ts +0 -10
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
- package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
- package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
- package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3717
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3527
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1144
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -2148
- package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
- package/packages/orq-rc/src/models/operations/fileget.ts +0 -222
- package/packages/orq-rc/src/models/operations/filelist.ts +0 -336
- package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2116
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1982
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2012
- package/packages/orq-rc/src/models/operations/index.ts +0 -22
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2146
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3900
- package/packages/orq-rc/src/sdk/contacts.ts +0 -27
- package/packages/orq-rc/src/sdk/deployments.ts +0 -70
- package/packages/orq-rc/src/sdk/feedback.ts +0 -27
- package/packages/orq-rc/src/sdk/files.ts +0 -78
- package/packages/orq-rc/src/sdk/index.ts +0 -5
- package/packages/orq-rc/src/sdk/metrics.ts +0 -27
- package/packages/orq-rc/src/sdk/prompts.ts +0 -126
- package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
- package/packages/orq-rc/src/sdk/sdk.ts +0 -43
- package/packages/orq-rc/src/types/blobs.ts +0 -31
- package/packages/orq-rc/src/types/constdatetime.ts +0 -15
- package/packages/orq-rc/src/types/enums.ts +0 -16
- package/packages/orq-rc/src/types/fp.ts +0 -50
- package/packages/orq-rc/src/types/index.ts +0 -11
- package/packages/orq-rc/src/types/operations.ts +0 -105
- package/packages/orq-rc/src/types/rfcdate.ts +0 -54
- package/packages/orq-rc/src/types/streams.ts +0 -21
- package/packages/orq-rc/tsconfig.json +0 -41
- package/src/funcs/deploymentsStream.ts +0 -151
- package/src/lib/event-streams.ts +0 -264
- package/src/models/operations/deploymentstream.ts +0 -3062
|
@@ -1,1790 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Usage statistics to add to the deployment
|
|
14
|
-
*/
|
|
15
|
-
export type Usage = {
|
|
16
|
-
/**
|
|
17
|
-
* Number of tokens in the prompt.
|
|
18
|
-
*/
|
|
19
|
-
promptTokens: number;
|
|
20
|
-
/**
|
|
21
|
-
* Number of tokens in the generated completion.
|
|
22
|
-
*/
|
|
23
|
-
completionTokens: number;
|
|
24
|
-
/**
|
|
25
|
-
* Total number of tokens used in the request (prompt + completion).
|
|
26
|
-
*/
|
|
27
|
-
totalTokens?: number | undefined;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type Performance = {
|
|
31
|
-
/**
|
|
32
|
-
* Total time in milliseconds of the request to the LLM provider API.
|
|
33
|
-
*/
|
|
34
|
-
latency: number;
|
|
35
|
-
/**
|
|
36
|
-
* Total time in milliseconds to generate the first token of the completion.
|
|
37
|
-
*/
|
|
38
|
-
timeToFirstToken?: number | undefined;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The role of the prompt message
|
|
43
|
-
*/
|
|
44
|
-
export const DeploymentCreateMetricRole = {
|
|
45
|
-
System: "system",
|
|
46
|
-
Assistant: "assistant",
|
|
47
|
-
User: "user",
|
|
48
|
-
Exception: "exception",
|
|
49
|
-
Tool: "tool",
|
|
50
|
-
Prompt: "prompt",
|
|
51
|
-
Correction: "correction",
|
|
52
|
-
ExpectedOutput: "expected_output",
|
|
53
|
-
} as const;
|
|
54
|
-
/**
|
|
55
|
-
* The role of the prompt message
|
|
56
|
-
*/
|
|
57
|
-
export type DeploymentCreateMetricRole = ClosedEnum<
|
|
58
|
-
typeof DeploymentCreateMetricRole
|
|
59
|
-
>;
|
|
60
|
-
|
|
61
|
-
export const DeploymentCreateMetric2DeploymentsMetricsType = {
|
|
62
|
-
ImageUrl: "image_url",
|
|
63
|
-
} as const;
|
|
64
|
-
export type DeploymentCreateMetric2DeploymentsMetricsType = ClosedEnum<
|
|
65
|
-
typeof DeploymentCreateMetric2DeploymentsMetricsType
|
|
66
|
-
>;
|
|
67
|
-
|
|
68
|
-
export type DeploymentCreateMetric2ImageUrl = {
|
|
69
|
-
/**
|
|
70
|
-
* Either a URL of the image or the base64 encoded data URI.
|
|
71
|
-
*/
|
|
72
|
-
url: string;
|
|
73
|
-
/**
|
|
74
|
-
* Specifies the detail level of the image. Currently only supported with OpenAI models
|
|
75
|
-
*/
|
|
76
|
-
detail?: string | undefined;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* The image part of the prompt message. Only supported with vision models.
|
|
81
|
-
*/
|
|
82
|
-
export type DeploymentCreateMetric22 = {
|
|
83
|
-
type: DeploymentCreateMetric2DeploymentsMetricsType;
|
|
84
|
-
imageUrl: DeploymentCreateMetric2ImageUrl;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export const DeploymentCreateMetric2Type = {
|
|
88
|
-
Text: "text",
|
|
89
|
-
} as const;
|
|
90
|
-
export type DeploymentCreateMetric2Type = ClosedEnum<
|
|
91
|
-
typeof DeploymentCreateMetric2Type
|
|
92
|
-
>;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Text content part of a prompt message
|
|
96
|
-
*/
|
|
97
|
-
export type DeploymentCreateMetric21 = {
|
|
98
|
-
type: DeploymentCreateMetric2Type;
|
|
99
|
-
text: string;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export type DeploymentCreateMetricContent2 =
|
|
103
|
-
| DeploymentCreateMetric21
|
|
104
|
-
| DeploymentCreateMetric22;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
108
|
-
*/
|
|
109
|
-
export type DeploymentCreateMetricContent =
|
|
110
|
-
| string
|
|
111
|
-
| Array<DeploymentCreateMetric21 | DeploymentCreateMetric22>;
|
|
112
|
-
|
|
113
|
-
export const DeploymentCreateMetricType = {
|
|
114
|
-
Function: "function",
|
|
115
|
-
} as const;
|
|
116
|
-
export type DeploymentCreateMetricType = ClosedEnum<
|
|
117
|
-
typeof DeploymentCreateMetricType
|
|
118
|
-
>;
|
|
119
|
-
|
|
120
|
-
export type DeploymentCreateMetricFunction = {
|
|
121
|
-
name: string;
|
|
122
|
-
/**
|
|
123
|
-
* JSON string arguments for the functions
|
|
124
|
-
*/
|
|
125
|
-
arguments: string;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export type DeploymentCreateMetricToolCalls = {
|
|
129
|
-
id?: string | undefined;
|
|
130
|
-
index?: number | undefined;
|
|
131
|
-
type: DeploymentCreateMetricType;
|
|
132
|
-
function: DeploymentCreateMetricFunction;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export type DeploymentCreateMetricMessages = {
|
|
136
|
-
/**
|
|
137
|
-
* The role of the prompt message
|
|
138
|
-
*/
|
|
139
|
-
role: DeploymentCreateMetricRole;
|
|
140
|
-
/**
|
|
141
|
-
* The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
|
|
142
|
-
*/
|
|
143
|
-
content: string | Array<DeploymentCreateMetric21 | DeploymentCreateMetric22>;
|
|
144
|
-
toolCalls?: Array<DeploymentCreateMetricToolCalls> | undefined;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* The role of the prompt message
|
|
149
|
-
*/
|
|
150
|
-
export const DeploymentCreateMetricMessageDeploymentsMetricsRole = {
|
|
151
|
-
System: "system",
|
|
152
|
-
Assistant: "assistant",
|
|
153
|
-
User: "user",
|
|
154
|
-
Exception: "exception",
|
|
155
|
-
Tool: "tool",
|
|
156
|
-
Prompt: "prompt",
|
|
157
|
-
Correction: "correction",
|
|
158
|
-
ExpectedOutput: "expected_output",
|
|
159
|
-
} as const;
|
|
160
|
-
/**
|
|
161
|
-
* The role of the prompt message
|
|
162
|
-
*/
|
|
163
|
-
export type DeploymentCreateMetricMessageDeploymentsMetricsRole = ClosedEnum<
|
|
164
|
-
typeof DeploymentCreateMetricMessageDeploymentsMetricsRole
|
|
165
|
-
>;
|
|
166
|
-
|
|
167
|
-
export type Three = {
|
|
168
|
-
/**
|
|
169
|
-
* The role of the prompt message
|
|
170
|
-
*/
|
|
171
|
-
role: DeploymentCreateMetricMessageDeploymentsMetricsRole;
|
|
172
|
-
url: string;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* The role of the prompt message
|
|
177
|
-
*/
|
|
178
|
-
export const DeploymentCreateMetricMessageRole = {
|
|
179
|
-
System: "system",
|
|
180
|
-
Assistant: "assistant",
|
|
181
|
-
User: "user",
|
|
182
|
-
Exception: "exception",
|
|
183
|
-
Tool: "tool",
|
|
184
|
-
Prompt: "prompt",
|
|
185
|
-
Correction: "correction",
|
|
186
|
-
ExpectedOutput: "expected_output",
|
|
187
|
-
} as const;
|
|
188
|
-
/**
|
|
189
|
-
* The role of the prompt message
|
|
190
|
-
*/
|
|
191
|
-
export type DeploymentCreateMetricMessageRole = ClosedEnum<
|
|
192
|
-
typeof DeploymentCreateMetricMessageRole
|
|
193
|
-
>;
|
|
194
|
-
|
|
195
|
-
export type Message2 = {
|
|
196
|
-
/**
|
|
197
|
-
* The role of the prompt message
|
|
198
|
-
*/
|
|
199
|
-
role: DeploymentCreateMetricMessageRole;
|
|
200
|
-
content: string | null;
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* The role of the prompt message
|
|
205
|
-
*/
|
|
206
|
-
export const MessageRole = {
|
|
207
|
-
System: "system",
|
|
208
|
-
Assistant: "assistant",
|
|
209
|
-
User: "user",
|
|
210
|
-
Exception: "exception",
|
|
211
|
-
Tool: "tool",
|
|
212
|
-
Prompt: "prompt",
|
|
213
|
-
Correction: "correction",
|
|
214
|
-
ExpectedOutput: "expected_output",
|
|
215
|
-
} as const;
|
|
216
|
-
/**
|
|
217
|
-
* The role of the prompt message
|
|
218
|
-
*/
|
|
219
|
-
export type MessageRole = ClosedEnum<typeof MessageRole>;
|
|
220
|
-
|
|
221
|
-
export const MessageType = {
|
|
222
|
-
Function: "function",
|
|
223
|
-
} as const;
|
|
224
|
-
export type MessageType = ClosedEnum<typeof MessageType>;
|
|
225
|
-
|
|
226
|
-
export type MessageFunction = {
|
|
227
|
-
name: string;
|
|
228
|
-
/**
|
|
229
|
-
* JSON string arguments for the functions
|
|
230
|
-
*/
|
|
231
|
-
arguments: string;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
export type MessageToolCalls = {
|
|
235
|
-
id?: string | undefined;
|
|
236
|
-
index?: number | undefined;
|
|
237
|
-
type: MessageType;
|
|
238
|
-
function: MessageFunction;
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
export type Message1 = {
|
|
242
|
-
/**
|
|
243
|
-
* The role of the prompt message
|
|
244
|
-
*/
|
|
245
|
-
role: MessageRole;
|
|
246
|
-
content?: string | null | undefined;
|
|
247
|
-
toolCalls: Array<MessageToolCalls>;
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
export type Message = Message2 | Three | Message1;
|
|
251
|
-
|
|
252
|
-
export type Choices = {
|
|
253
|
-
index: number;
|
|
254
|
-
message?: Message2 | Three | Message1 | undefined;
|
|
255
|
-
finishReason?: string | null | undefined;
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Feedback from the user on the completion
|
|
260
|
-
*/
|
|
261
|
-
export type Feedback = {
|
|
262
|
-
/**
|
|
263
|
-
* The feedback score. This allow you to come with specific logic on what a `score` number means
|
|
264
|
-
*/
|
|
265
|
-
score: number;
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* The deployment request payload
|
|
270
|
-
*/
|
|
271
|
-
export type DeploymentCreateMetricRequestBody = {
|
|
272
|
-
/**
|
|
273
|
-
* Your own custom key-value pairs can be attached to the logs. This is useful for storing additional information related to your interactions with the LLM providers or specifics within your application.
|
|
274
|
-
*/
|
|
275
|
-
metadata?: { [k: string]: any } | undefined;
|
|
276
|
-
/**
|
|
277
|
-
* Usage statistics to add to the deployment
|
|
278
|
-
*/
|
|
279
|
-
usage?: Usage | undefined;
|
|
280
|
-
performance?: Performance | undefined;
|
|
281
|
-
/**
|
|
282
|
-
* A list of messages sent to the model.
|
|
283
|
-
*/
|
|
284
|
-
messages?: Array<DeploymentCreateMetricMessages> | undefined;
|
|
285
|
-
/**
|
|
286
|
-
* A list of completion choices. If you are using a `completion` model then you must provide the `completion content` with the chat completion format
|
|
287
|
-
*/
|
|
288
|
-
choices?: Array<Choices> | undefined;
|
|
289
|
-
/**
|
|
290
|
-
* Feedback from the user on the completion
|
|
291
|
-
*/
|
|
292
|
-
feedback?: Feedback | undefined;
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export type DeploymentCreateMetricRequest = {
|
|
296
|
-
/**
|
|
297
|
-
* Deployment ID
|
|
298
|
-
*/
|
|
299
|
-
id: string;
|
|
300
|
-
/**
|
|
301
|
-
* The deployment request payload
|
|
302
|
-
*/
|
|
303
|
-
requestBody: DeploymentCreateMetricRequestBody;
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Successful operation
|
|
308
|
-
*/
|
|
309
|
-
export type DeploymentCreateMetricResponseBody = {
|
|
310
|
-
/**
|
|
311
|
-
* The status code of the request
|
|
312
|
-
*/
|
|
313
|
-
code: number;
|
|
314
|
-
/**
|
|
315
|
-
* Whether the request was successful
|
|
316
|
-
*/
|
|
317
|
-
success: boolean;
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
/** @internal */
|
|
321
|
-
export const Usage$inboundSchema: z.ZodType<Usage, z.ZodTypeDef, unknown> = z
|
|
322
|
-
.object({
|
|
323
|
-
prompt_tokens: z.number(),
|
|
324
|
-
completion_tokens: z.number(),
|
|
325
|
-
total_tokens: z.number().optional(),
|
|
326
|
-
}).transform((v) => {
|
|
327
|
-
return remap$(v, {
|
|
328
|
-
"prompt_tokens": "promptTokens",
|
|
329
|
-
"completion_tokens": "completionTokens",
|
|
330
|
-
"total_tokens": "totalTokens",
|
|
331
|
-
});
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
/** @internal */
|
|
335
|
-
export type Usage$Outbound = {
|
|
336
|
-
prompt_tokens: number;
|
|
337
|
-
completion_tokens: number;
|
|
338
|
-
total_tokens?: number | undefined;
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
/** @internal */
|
|
342
|
-
export const Usage$outboundSchema: z.ZodType<
|
|
343
|
-
Usage$Outbound,
|
|
344
|
-
z.ZodTypeDef,
|
|
345
|
-
Usage
|
|
346
|
-
> = z.object({
|
|
347
|
-
promptTokens: z.number(),
|
|
348
|
-
completionTokens: z.number(),
|
|
349
|
-
totalTokens: z.number().optional(),
|
|
350
|
-
}).transform((v) => {
|
|
351
|
-
return remap$(v, {
|
|
352
|
-
promptTokens: "prompt_tokens",
|
|
353
|
-
completionTokens: "completion_tokens",
|
|
354
|
-
totalTokens: "total_tokens",
|
|
355
|
-
});
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* @internal
|
|
360
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
361
|
-
*/
|
|
362
|
-
export namespace Usage$ {
|
|
363
|
-
/** @deprecated use `Usage$inboundSchema` instead. */
|
|
364
|
-
export const inboundSchema = Usage$inboundSchema;
|
|
365
|
-
/** @deprecated use `Usage$outboundSchema` instead. */
|
|
366
|
-
export const outboundSchema = Usage$outboundSchema;
|
|
367
|
-
/** @deprecated use `Usage$Outbound` instead. */
|
|
368
|
-
export type Outbound = Usage$Outbound;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
export function usageToJSON(usage: Usage): string {
|
|
372
|
-
return JSON.stringify(Usage$outboundSchema.parse(usage));
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
export function usageFromJSON(
|
|
376
|
-
jsonString: string,
|
|
377
|
-
): SafeParseResult<Usage, SDKValidationError> {
|
|
378
|
-
return safeParse(
|
|
379
|
-
jsonString,
|
|
380
|
-
(x) => Usage$inboundSchema.parse(JSON.parse(x)),
|
|
381
|
-
`Failed to parse 'Usage' from JSON`,
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/** @internal */
|
|
386
|
-
export const Performance$inboundSchema: z.ZodType<
|
|
387
|
-
Performance,
|
|
388
|
-
z.ZodTypeDef,
|
|
389
|
-
unknown
|
|
390
|
-
> = z.object({
|
|
391
|
-
latency: z.number(),
|
|
392
|
-
time_to_first_token: z.number().optional(),
|
|
393
|
-
}).transform((v) => {
|
|
394
|
-
return remap$(v, {
|
|
395
|
-
"time_to_first_token": "timeToFirstToken",
|
|
396
|
-
});
|
|
397
|
-
});
|
|
398
|
-
|
|
399
|
-
/** @internal */
|
|
400
|
-
export type Performance$Outbound = {
|
|
401
|
-
latency: number;
|
|
402
|
-
time_to_first_token?: number | undefined;
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
/** @internal */
|
|
406
|
-
export const Performance$outboundSchema: z.ZodType<
|
|
407
|
-
Performance$Outbound,
|
|
408
|
-
z.ZodTypeDef,
|
|
409
|
-
Performance
|
|
410
|
-
> = z.object({
|
|
411
|
-
latency: z.number(),
|
|
412
|
-
timeToFirstToken: z.number().optional(),
|
|
413
|
-
}).transform((v) => {
|
|
414
|
-
return remap$(v, {
|
|
415
|
-
timeToFirstToken: "time_to_first_token",
|
|
416
|
-
});
|
|
417
|
-
});
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* @internal
|
|
421
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
422
|
-
*/
|
|
423
|
-
export namespace Performance$ {
|
|
424
|
-
/** @deprecated use `Performance$inboundSchema` instead. */
|
|
425
|
-
export const inboundSchema = Performance$inboundSchema;
|
|
426
|
-
/** @deprecated use `Performance$outboundSchema` instead. */
|
|
427
|
-
export const outboundSchema = Performance$outboundSchema;
|
|
428
|
-
/** @deprecated use `Performance$Outbound` instead. */
|
|
429
|
-
export type Outbound = Performance$Outbound;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
export function performanceToJSON(performance: Performance): string {
|
|
433
|
-
return JSON.stringify(Performance$outboundSchema.parse(performance));
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export function performanceFromJSON(
|
|
437
|
-
jsonString: string,
|
|
438
|
-
): SafeParseResult<Performance, SDKValidationError> {
|
|
439
|
-
return safeParse(
|
|
440
|
-
jsonString,
|
|
441
|
-
(x) => Performance$inboundSchema.parse(JSON.parse(x)),
|
|
442
|
-
`Failed to parse 'Performance' from JSON`,
|
|
443
|
-
);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
/** @internal */
|
|
447
|
-
export const DeploymentCreateMetricRole$inboundSchema: z.ZodNativeEnum<
|
|
448
|
-
typeof DeploymentCreateMetricRole
|
|
449
|
-
> = z.nativeEnum(DeploymentCreateMetricRole);
|
|
450
|
-
|
|
451
|
-
/** @internal */
|
|
452
|
-
export const DeploymentCreateMetricRole$outboundSchema: z.ZodNativeEnum<
|
|
453
|
-
typeof DeploymentCreateMetricRole
|
|
454
|
-
> = DeploymentCreateMetricRole$inboundSchema;
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* @internal
|
|
458
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
459
|
-
*/
|
|
460
|
-
export namespace DeploymentCreateMetricRole$ {
|
|
461
|
-
/** @deprecated use `DeploymentCreateMetricRole$inboundSchema` instead. */
|
|
462
|
-
export const inboundSchema = DeploymentCreateMetricRole$inboundSchema;
|
|
463
|
-
/** @deprecated use `DeploymentCreateMetricRole$outboundSchema` instead. */
|
|
464
|
-
export const outboundSchema = DeploymentCreateMetricRole$outboundSchema;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/** @internal */
|
|
468
|
-
export const DeploymentCreateMetric2DeploymentsMetricsType$inboundSchema:
|
|
469
|
-
z.ZodNativeEnum<typeof DeploymentCreateMetric2DeploymentsMetricsType> = z
|
|
470
|
-
.nativeEnum(DeploymentCreateMetric2DeploymentsMetricsType);
|
|
471
|
-
|
|
472
|
-
/** @internal */
|
|
473
|
-
export const DeploymentCreateMetric2DeploymentsMetricsType$outboundSchema:
|
|
474
|
-
z.ZodNativeEnum<typeof DeploymentCreateMetric2DeploymentsMetricsType> =
|
|
475
|
-
DeploymentCreateMetric2DeploymentsMetricsType$inboundSchema;
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* @internal
|
|
479
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
480
|
-
*/
|
|
481
|
-
export namespace DeploymentCreateMetric2DeploymentsMetricsType$ {
|
|
482
|
-
/** @deprecated use `DeploymentCreateMetric2DeploymentsMetricsType$inboundSchema` instead. */
|
|
483
|
-
export const inboundSchema =
|
|
484
|
-
DeploymentCreateMetric2DeploymentsMetricsType$inboundSchema;
|
|
485
|
-
/** @deprecated use `DeploymentCreateMetric2DeploymentsMetricsType$outboundSchema` instead. */
|
|
486
|
-
export const outboundSchema =
|
|
487
|
-
DeploymentCreateMetric2DeploymentsMetricsType$outboundSchema;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/** @internal */
|
|
491
|
-
export const DeploymentCreateMetric2ImageUrl$inboundSchema: z.ZodType<
|
|
492
|
-
DeploymentCreateMetric2ImageUrl,
|
|
493
|
-
z.ZodTypeDef,
|
|
494
|
-
unknown
|
|
495
|
-
> = z.object({
|
|
496
|
-
url: z.string(),
|
|
497
|
-
detail: z.string().optional(),
|
|
498
|
-
});
|
|
499
|
-
|
|
500
|
-
/** @internal */
|
|
501
|
-
export type DeploymentCreateMetric2ImageUrl$Outbound = {
|
|
502
|
-
url: string;
|
|
503
|
-
detail?: string | undefined;
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
/** @internal */
|
|
507
|
-
export const DeploymentCreateMetric2ImageUrl$outboundSchema: z.ZodType<
|
|
508
|
-
DeploymentCreateMetric2ImageUrl$Outbound,
|
|
509
|
-
z.ZodTypeDef,
|
|
510
|
-
DeploymentCreateMetric2ImageUrl
|
|
511
|
-
> = z.object({
|
|
512
|
-
url: z.string(),
|
|
513
|
-
detail: z.string().optional(),
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* @internal
|
|
518
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
519
|
-
*/
|
|
520
|
-
export namespace DeploymentCreateMetric2ImageUrl$ {
|
|
521
|
-
/** @deprecated use `DeploymentCreateMetric2ImageUrl$inboundSchema` instead. */
|
|
522
|
-
export const inboundSchema = DeploymentCreateMetric2ImageUrl$inboundSchema;
|
|
523
|
-
/** @deprecated use `DeploymentCreateMetric2ImageUrl$outboundSchema` instead. */
|
|
524
|
-
export const outboundSchema = DeploymentCreateMetric2ImageUrl$outboundSchema;
|
|
525
|
-
/** @deprecated use `DeploymentCreateMetric2ImageUrl$Outbound` instead. */
|
|
526
|
-
export type Outbound = DeploymentCreateMetric2ImageUrl$Outbound;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
export function deploymentCreateMetric2ImageUrlToJSON(
|
|
530
|
-
deploymentCreateMetric2ImageUrl: DeploymentCreateMetric2ImageUrl,
|
|
531
|
-
): string {
|
|
532
|
-
return JSON.stringify(
|
|
533
|
-
DeploymentCreateMetric2ImageUrl$outboundSchema.parse(
|
|
534
|
-
deploymentCreateMetric2ImageUrl,
|
|
535
|
-
),
|
|
536
|
-
);
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
export function deploymentCreateMetric2ImageUrlFromJSON(
|
|
540
|
-
jsonString: string,
|
|
541
|
-
): SafeParseResult<DeploymentCreateMetric2ImageUrl, SDKValidationError> {
|
|
542
|
-
return safeParse(
|
|
543
|
-
jsonString,
|
|
544
|
-
(x) => DeploymentCreateMetric2ImageUrl$inboundSchema.parse(JSON.parse(x)),
|
|
545
|
-
`Failed to parse 'DeploymentCreateMetric2ImageUrl' from JSON`,
|
|
546
|
-
);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/** @internal */
|
|
550
|
-
export const DeploymentCreateMetric22$inboundSchema: z.ZodType<
|
|
551
|
-
DeploymentCreateMetric22,
|
|
552
|
-
z.ZodTypeDef,
|
|
553
|
-
unknown
|
|
554
|
-
> = z.object({
|
|
555
|
-
type: DeploymentCreateMetric2DeploymentsMetricsType$inboundSchema,
|
|
556
|
-
image_url: z.lazy(() => DeploymentCreateMetric2ImageUrl$inboundSchema),
|
|
557
|
-
}).transform((v) => {
|
|
558
|
-
return remap$(v, {
|
|
559
|
-
"image_url": "imageUrl",
|
|
560
|
-
});
|
|
561
|
-
});
|
|
562
|
-
|
|
563
|
-
/** @internal */
|
|
564
|
-
export type DeploymentCreateMetric22$Outbound = {
|
|
565
|
-
type: string;
|
|
566
|
-
image_url: DeploymentCreateMetric2ImageUrl$Outbound;
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
/** @internal */
|
|
570
|
-
export const DeploymentCreateMetric22$outboundSchema: z.ZodType<
|
|
571
|
-
DeploymentCreateMetric22$Outbound,
|
|
572
|
-
z.ZodTypeDef,
|
|
573
|
-
DeploymentCreateMetric22
|
|
574
|
-
> = z.object({
|
|
575
|
-
type: DeploymentCreateMetric2DeploymentsMetricsType$outboundSchema,
|
|
576
|
-
imageUrl: z.lazy(() => DeploymentCreateMetric2ImageUrl$outboundSchema),
|
|
577
|
-
}).transform((v) => {
|
|
578
|
-
return remap$(v, {
|
|
579
|
-
imageUrl: "image_url",
|
|
580
|
-
});
|
|
581
|
-
});
|
|
582
|
-
|
|
583
|
-
/**
|
|
584
|
-
* @internal
|
|
585
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
586
|
-
*/
|
|
587
|
-
export namespace DeploymentCreateMetric22$ {
|
|
588
|
-
/** @deprecated use `DeploymentCreateMetric22$inboundSchema` instead. */
|
|
589
|
-
export const inboundSchema = DeploymentCreateMetric22$inboundSchema;
|
|
590
|
-
/** @deprecated use `DeploymentCreateMetric22$outboundSchema` instead. */
|
|
591
|
-
export const outboundSchema = DeploymentCreateMetric22$outboundSchema;
|
|
592
|
-
/** @deprecated use `DeploymentCreateMetric22$Outbound` instead. */
|
|
593
|
-
export type Outbound = DeploymentCreateMetric22$Outbound;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
export function deploymentCreateMetric22ToJSON(
|
|
597
|
-
deploymentCreateMetric22: DeploymentCreateMetric22,
|
|
598
|
-
): string {
|
|
599
|
-
return JSON.stringify(
|
|
600
|
-
DeploymentCreateMetric22$outboundSchema.parse(deploymentCreateMetric22),
|
|
601
|
-
);
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
export function deploymentCreateMetric22FromJSON(
|
|
605
|
-
jsonString: string,
|
|
606
|
-
): SafeParseResult<DeploymentCreateMetric22, SDKValidationError> {
|
|
607
|
-
return safeParse(
|
|
608
|
-
jsonString,
|
|
609
|
-
(x) => DeploymentCreateMetric22$inboundSchema.parse(JSON.parse(x)),
|
|
610
|
-
`Failed to parse 'DeploymentCreateMetric22' from JSON`,
|
|
611
|
-
);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
/** @internal */
|
|
615
|
-
export const DeploymentCreateMetric2Type$inboundSchema: z.ZodNativeEnum<
|
|
616
|
-
typeof DeploymentCreateMetric2Type
|
|
617
|
-
> = z.nativeEnum(DeploymentCreateMetric2Type);
|
|
618
|
-
|
|
619
|
-
/** @internal */
|
|
620
|
-
export const DeploymentCreateMetric2Type$outboundSchema: z.ZodNativeEnum<
|
|
621
|
-
typeof DeploymentCreateMetric2Type
|
|
622
|
-
> = DeploymentCreateMetric2Type$inboundSchema;
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* @internal
|
|
626
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
627
|
-
*/
|
|
628
|
-
export namespace DeploymentCreateMetric2Type$ {
|
|
629
|
-
/** @deprecated use `DeploymentCreateMetric2Type$inboundSchema` instead. */
|
|
630
|
-
export const inboundSchema = DeploymentCreateMetric2Type$inboundSchema;
|
|
631
|
-
/** @deprecated use `DeploymentCreateMetric2Type$outboundSchema` instead. */
|
|
632
|
-
export const outboundSchema = DeploymentCreateMetric2Type$outboundSchema;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
/** @internal */
|
|
636
|
-
export const DeploymentCreateMetric21$inboundSchema: z.ZodType<
|
|
637
|
-
DeploymentCreateMetric21,
|
|
638
|
-
z.ZodTypeDef,
|
|
639
|
-
unknown
|
|
640
|
-
> = z.object({
|
|
641
|
-
type: DeploymentCreateMetric2Type$inboundSchema,
|
|
642
|
-
text: z.string(),
|
|
643
|
-
});
|
|
644
|
-
|
|
645
|
-
/** @internal */
|
|
646
|
-
export type DeploymentCreateMetric21$Outbound = {
|
|
647
|
-
type: string;
|
|
648
|
-
text: string;
|
|
649
|
-
};
|
|
650
|
-
|
|
651
|
-
/** @internal */
|
|
652
|
-
export const DeploymentCreateMetric21$outboundSchema: z.ZodType<
|
|
653
|
-
DeploymentCreateMetric21$Outbound,
|
|
654
|
-
z.ZodTypeDef,
|
|
655
|
-
DeploymentCreateMetric21
|
|
656
|
-
> = z.object({
|
|
657
|
-
type: DeploymentCreateMetric2Type$outboundSchema,
|
|
658
|
-
text: z.string(),
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* @internal
|
|
663
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
664
|
-
*/
|
|
665
|
-
export namespace DeploymentCreateMetric21$ {
|
|
666
|
-
/** @deprecated use `DeploymentCreateMetric21$inboundSchema` instead. */
|
|
667
|
-
export const inboundSchema = DeploymentCreateMetric21$inboundSchema;
|
|
668
|
-
/** @deprecated use `DeploymentCreateMetric21$outboundSchema` instead. */
|
|
669
|
-
export const outboundSchema = DeploymentCreateMetric21$outboundSchema;
|
|
670
|
-
/** @deprecated use `DeploymentCreateMetric21$Outbound` instead. */
|
|
671
|
-
export type Outbound = DeploymentCreateMetric21$Outbound;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
export function deploymentCreateMetric21ToJSON(
|
|
675
|
-
deploymentCreateMetric21: DeploymentCreateMetric21,
|
|
676
|
-
): string {
|
|
677
|
-
return JSON.stringify(
|
|
678
|
-
DeploymentCreateMetric21$outboundSchema.parse(deploymentCreateMetric21),
|
|
679
|
-
);
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
export function deploymentCreateMetric21FromJSON(
|
|
683
|
-
jsonString: string,
|
|
684
|
-
): SafeParseResult<DeploymentCreateMetric21, SDKValidationError> {
|
|
685
|
-
return safeParse(
|
|
686
|
-
jsonString,
|
|
687
|
-
(x) => DeploymentCreateMetric21$inboundSchema.parse(JSON.parse(x)),
|
|
688
|
-
`Failed to parse 'DeploymentCreateMetric21' from JSON`,
|
|
689
|
-
);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
/** @internal */
|
|
693
|
-
export const DeploymentCreateMetricContent2$inboundSchema: z.ZodType<
|
|
694
|
-
DeploymentCreateMetricContent2,
|
|
695
|
-
z.ZodTypeDef,
|
|
696
|
-
unknown
|
|
697
|
-
> = z.union([
|
|
698
|
-
z.lazy(() => DeploymentCreateMetric21$inboundSchema),
|
|
699
|
-
z.lazy(() => DeploymentCreateMetric22$inboundSchema),
|
|
700
|
-
]);
|
|
701
|
-
|
|
702
|
-
/** @internal */
|
|
703
|
-
export type DeploymentCreateMetricContent2$Outbound =
|
|
704
|
-
| DeploymentCreateMetric21$Outbound
|
|
705
|
-
| DeploymentCreateMetric22$Outbound;
|
|
706
|
-
|
|
707
|
-
/** @internal */
|
|
708
|
-
export const DeploymentCreateMetricContent2$outboundSchema: z.ZodType<
|
|
709
|
-
DeploymentCreateMetricContent2$Outbound,
|
|
710
|
-
z.ZodTypeDef,
|
|
711
|
-
DeploymentCreateMetricContent2
|
|
712
|
-
> = z.union([
|
|
713
|
-
z.lazy(() => DeploymentCreateMetric21$outboundSchema),
|
|
714
|
-
z.lazy(() => DeploymentCreateMetric22$outboundSchema),
|
|
715
|
-
]);
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* @internal
|
|
719
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
720
|
-
*/
|
|
721
|
-
export namespace DeploymentCreateMetricContent2$ {
|
|
722
|
-
/** @deprecated use `DeploymentCreateMetricContent2$inboundSchema` instead. */
|
|
723
|
-
export const inboundSchema = DeploymentCreateMetricContent2$inboundSchema;
|
|
724
|
-
/** @deprecated use `DeploymentCreateMetricContent2$outboundSchema` instead. */
|
|
725
|
-
export const outboundSchema = DeploymentCreateMetricContent2$outboundSchema;
|
|
726
|
-
/** @deprecated use `DeploymentCreateMetricContent2$Outbound` instead. */
|
|
727
|
-
export type Outbound = DeploymentCreateMetricContent2$Outbound;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
export function deploymentCreateMetricContent2ToJSON(
|
|
731
|
-
deploymentCreateMetricContent2: DeploymentCreateMetricContent2,
|
|
732
|
-
): string {
|
|
733
|
-
return JSON.stringify(
|
|
734
|
-
DeploymentCreateMetricContent2$outboundSchema.parse(
|
|
735
|
-
deploymentCreateMetricContent2,
|
|
736
|
-
),
|
|
737
|
-
);
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
export function deploymentCreateMetricContent2FromJSON(
|
|
741
|
-
jsonString: string,
|
|
742
|
-
): SafeParseResult<DeploymentCreateMetricContent2, SDKValidationError> {
|
|
743
|
-
return safeParse(
|
|
744
|
-
jsonString,
|
|
745
|
-
(x) => DeploymentCreateMetricContent2$inboundSchema.parse(JSON.parse(x)),
|
|
746
|
-
`Failed to parse 'DeploymentCreateMetricContent2' from JSON`,
|
|
747
|
-
);
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
/** @internal */
|
|
751
|
-
export const DeploymentCreateMetricContent$inboundSchema: z.ZodType<
|
|
752
|
-
DeploymentCreateMetricContent,
|
|
753
|
-
z.ZodTypeDef,
|
|
754
|
-
unknown
|
|
755
|
-
> = z.union([
|
|
756
|
-
z.string(),
|
|
757
|
-
z.array(z.union([
|
|
758
|
-
z.lazy(() => DeploymentCreateMetric21$inboundSchema),
|
|
759
|
-
z.lazy(() => DeploymentCreateMetric22$inboundSchema),
|
|
760
|
-
])),
|
|
761
|
-
]);
|
|
762
|
-
|
|
763
|
-
/** @internal */
|
|
764
|
-
export type DeploymentCreateMetricContent$Outbound =
|
|
765
|
-
| string
|
|
766
|
-
| Array<
|
|
767
|
-
DeploymentCreateMetric21$Outbound | DeploymentCreateMetric22$Outbound
|
|
768
|
-
>;
|
|
769
|
-
|
|
770
|
-
/** @internal */
|
|
771
|
-
export const DeploymentCreateMetricContent$outboundSchema: z.ZodType<
|
|
772
|
-
DeploymentCreateMetricContent$Outbound,
|
|
773
|
-
z.ZodTypeDef,
|
|
774
|
-
DeploymentCreateMetricContent
|
|
775
|
-
> = z.union([
|
|
776
|
-
z.string(),
|
|
777
|
-
z.array(z.union([
|
|
778
|
-
z.lazy(() => DeploymentCreateMetric21$outboundSchema),
|
|
779
|
-
z.lazy(() => DeploymentCreateMetric22$outboundSchema),
|
|
780
|
-
])),
|
|
781
|
-
]);
|
|
782
|
-
|
|
783
|
-
/**
|
|
784
|
-
* @internal
|
|
785
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
786
|
-
*/
|
|
787
|
-
export namespace DeploymentCreateMetricContent$ {
|
|
788
|
-
/** @deprecated use `DeploymentCreateMetricContent$inboundSchema` instead. */
|
|
789
|
-
export const inboundSchema = DeploymentCreateMetricContent$inboundSchema;
|
|
790
|
-
/** @deprecated use `DeploymentCreateMetricContent$outboundSchema` instead. */
|
|
791
|
-
export const outboundSchema = DeploymentCreateMetricContent$outboundSchema;
|
|
792
|
-
/** @deprecated use `DeploymentCreateMetricContent$Outbound` instead. */
|
|
793
|
-
export type Outbound = DeploymentCreateMetricContent$Outbound;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
export function deploymentCreateMetricContentToJSON(
|
|
797
|
-
deploymentCreateMetricContent: DeploymentCreateMetricContent,
|
|
798
|
-
): string {
|
|
799
|
-
return JSON.stringify(
|
|
800
|
-
DeploymentCreateMetricContent$outboundSchema.parse(
|
|
801
|
-
deploymentCreateMetricContent,
|
|
802
|
-
),
|
|
803
|
-
);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
export function deploymentCreateMetricContentFromJSON(
|
|
807
|
-
jsonString: string,
|
|
808
|
-
): SafeParseResult<DeploymentCreateMetricContent, SDKValidationError> {
|
|
809
|
-
return safeParse(
|
|
810
|
-
jsonString,
|
|
811
|
-
(x) => DeploymentCreateMetricContent$inboundSchema.parse(JSON.parse(x)),
|
|
812
|
-
`Failed to parse 'DeploymentCreateMetricContent' from JSON`,
|
|
813
|
-
);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
/** @internal */
|
|
817
|
-
export const DeploymentCreateMetricType$inboundSchema: z.ZodNativeEnum<
|
|
818
|
-
typeof DeploymentCreateMetricType
|
|
819
|
-
> = z.nativeEnum(DeploymentCreateMetricType);
|
|
820
|
-
|
|
821
|
-
/** @internal */
|
|
822
|
-
export const DeploymentCreateMetricType$outboundSchema: z.ZodNativeEnum<
|
|
823
|
-
typeof DeploymentCreateMetricType
|
|
824
|
-
> = DeploymentCreateMetricType$inboundSchema;
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
* @internal
|
|
828
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
829
|
-
*/
|
|
830
|
-
export namespace DeploymentCreateMetricType$ {
|
|
831
|
-
/** @deprecated use `DeploymentCreateMetricType$inboundSchema` instead. */
|
|
832
|
-
export const inboundSchema = DeploymentCreateMetricType$inboundSchema;
|
|
833
|
-
/** @deprecated use `DeploymentCreateMetricType$outboundSchema` instead. */
|
|
834
|
-
export const outboundSchema = DeploymentCreateMetricType$outboundSchema;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
/** @internal */
|
|
838
|
-
export const DeploymentCreateMetricFunction$inboundSchema: z.ZodType<
|
|
839
|
-
DeploymentCreateMetricFunction,
|
|
840
|
-
z.ZodTypeDef,
|
|
841
|
-
unknown
|
|
842
|
-
> = z.object({
|
|
843
|
-
name: z.string(),
|
|
844
|
-
arguments: z.string(),
|
|
845
|
-
});
|
|
846
|
-
|
|
847
|
-
/** @internal */
|
|
848
|
-
export type DeploymentCreateMetricFunction$Outbound = {
|
|
849
|
-
name: string;
|
|
850
|
-
arguments: string;
|
|
851
|
-
};
|
|
852
|
-
|
|
853
|
-
/** @internal */
|
|
854
|
-
export const DeploymentCreateMetricFunction$outboundSchema: z.ZodType<
|
|
855
|
-
DeploymentCreateMetricFunction$Outbound,
|
|
856
|
-
z.ZodTypeDef,
|
|
857
|
-
DeploymentCreateMetricFunction
|
|
858
|
-
> = z.object({
|
|
859
|
-
name: z.string(),
|
|
860
|
-
arguments: z.string(),
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* @internal
|
|
865
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
866
|
-
*/
|
|
867
|
-
export namespace DeploymentCreateMetricFunction$ {
|
|
868
|
-
/** @deprecated use `DeploymentCreateMetricFunction$inboundSchema` instead. */
|
|
869
|
-
export const inboundSchema = DeploymentCreateMetricFunction$inboundSchema;
|
|
870
|
-
/** @deprecated use `DeploymentCreateMetricFunction$outboundSchema` instead. */
|
|
871
|
-
export const outboundSchema = DeploymentCreateMetricFunction$outboundSchema;
|
|
872
|
-
/** @deprecated use `DeploymentCreateMetricFunction$Outbound` instead. */
|
|
873
|
-
export type Outbound = DeploymentCreateMetricFunction$Outbound;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
export function deploymentCreateMetricFunctionToJSON(
|
|
877
|
-
deploymentCreateMetricFunction: DeploymentCreateMetricFunction,
|
|
878
|
-
): string {
|
|
879
|
-
return JSON.stringify(
|
|
880
|
-
DeploymentCreateMetricFunction$outboundSchema.parse(
|
|
881
|
-
deploymentCreateMetricFunction,
|
|
882
|
-
),
|
|
883
|
-
);
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
export function deploymentCreateMetricFunctionFromJSON(
|
|
887
|
-
jsonString: string,
|
|
888
|
-
): SafeParseResult<DeploymentCreateMetricFunction, SDKValidationError> {
|
|
889
|
-
return safeParse(
|
|
890
|
-
jsonString,
|
|
891
|
-
(x) => DeploymentCreateMetricFunction$inboundSchema.parse(JSON.parse(x)),
|
|
892
|
-
`Failed to parse 'DeploymentCreateMetricFunction' from JSON`,
|
|
893
|
-
);
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
/** @internal */
|
|
897
|
-
export const DeploymentCreateMetricToolCalls$inboundSchema: z.ZodType<
|
|
898
|
-
DeploymentCreateMetricToolCalls,
|
|
899
|
-
z.ZodTypeDef,
|
|
900
|
-
unknown
|
|
901
|
-
> = z.object({
|
|
902
|
-
id: z.string().optional(),
|
|
903
|
-
index: z.number().optional(),
|
|
904
|
-
type: DeploymentCreateMetricType$inboundSchema,
|
|
905
|
-
function: z.lazy(() => DeploymentCreateMetricFunction$inboundSchema),
|
|
906
|
-
});
|
|
907
|
-
|
|
908
|
-
/** @internal */
|
|
909
|
-
export type DeploymentCreateMetricToolCalls$Outbound = {
|
|
910
|
-
id?: string | undefined;
|
|
911
|
-
index?: number | undefined;
|
|
912
|
-
type: string;
|
|
913
|
-
function: DeploymentCreateMetricFunction$Outbound;
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
/** @internal */
|
|
917
|
-
export const DeploymentCreateMetricToolCalls$outboundSchema: z.ZodType<
|
|
918
|
-
DeploymentCreateMetricToolCalls$Outbound,
|
|
919
|
-
z.ZodTypeDef,
|
|
920
|
-
DeploymentCreateMetricToolCalls
|
|
921
|
-
> = z.object({
|
|
922
|
-
id: z.string().optional(),
|
|
923
|
-
index: z.number().optional(),
|
|
924
|
-
type: DeploymentCreateMetricType$outboundSchema,
|
|
925
|
-
function: z.lazy(() => DeploymentCreateMetricFunction$outboundSchema),
|
|
926
|
-
});
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* @internal
|
|
930
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
931
|
-
*/
|
|
932
|
-
export namespace DeploymentCreateMetricToolCalls$ {
|
|
933
|
-
/** @deprecated use `DeploymentCreateMetricToolCalls$inboundSchema` instead. */
|
|
934
|
-
export const inboundSchema = DeploymentCreateMetricToolCalls$inboundSchema;
|
|
935
|
-
/** @deprecated use `DeploymentCreateMetricToolCalls$outboundSchema` instead. */
|
|
936
|
-
export const outboundSchema = DeploymentCreateMetricToolCalls$outboundSchema;
|
|
937
|
-
/** @deprecated use `DeploymentCreateMetricToolCalls$Outbound` instead. */
|
|
938
|
-
export type Outbound = DeploymentCreateMetricToolCalls$Outbound;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
export function deploymentCreateMetricToolCallsToJSON(
|
|
942
|
-
deploymentCreateMetricToolCalls: DeploymentCreateMetricToolCalls,
|
|
943
|
-
): string {
|
|
944
|
-
return JSON.stringify(
|
|
945
|
-
DeploymentCreateMetricToolCalls$outboundSchema.parse(
|
|
946
|
-
deploymentCreateMetricToolCalls,
|
|
947
|
-
),
|
|
948
|
-
);
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
export function deploymentCreateMetricToolCallsFromJSON(
|
|
952
|
-
jsonString: string,
|
|
953
|
-
): SafeParseResult<DeploymentCreateMetricToolCalls, SDKValidationError> {
|
|
954
|
-
return safeParse(
|
|
955
|
-
jsonString,
|
|
956
|
-
(x) => DeploymentCreateMetricToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
957
|
-
`Failed to parse 'DeploymentCreateMetricToolCalls' from JSON`,
|
|
958
|
-
);
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
/** @internal */
|
|
962
|
-
export const DeploymentCreateMetricMessages$inboundSchema: z.ZodType<
|
|
963
|
-
DeploymentCreateMetricMessages,
|
|
964
|
-
z.ZodTypeDef,
|
|
965
|
-
unknown
|
|
966
|
-
> = z.object({
|
|
967
|
-
role: DeploymentCreateMetricRole$inboundSchema,
|
|
968
|
-
content: z.union([
|
|
969
|
-
z.string(),
|
|
970
|
-
z.array(z.union([
|
|
971
|
-
z.lazy(() => DeploymentCreateMetric21$inboundSchema),
|
|
972
|
-
z.lazy(() => DeploymentCreateMetric22$inboundSchema),
|
|
973
|
-
])),
|
|
974
|
-
]),
|
|
975
|
-
tool_calls: z.array(
|
|
976
|
-
z.lazy(() => DeploymentCreateMetricToolCalls$inboundSchema),
|
|
977
|
-
).optional(),
|
|
978
|
-
}).transform((v) => {
|
|
979
|
-
return remap$(v, {
|
|
980
|
-
"tool_calls": "toolCalls",
|
|
981
|
-
});
|
|
982
|
-
});
|
|
983
|
-
|
|
984
|
-
/** @internal */
|
|
985
|
-
export type DeploymentCreateMetricMessages$Outbound = {
|
|
986
|
-
role: string;
|
|
987
|
-
content:
|
|
988
|
-
| string
|
|
989
|
-
| Array<
|
|
990
|
-
DeploymentCreateMetric21$Outbound | DeploymentCreateMetric22$Outbound
|
|
991
|
-
>;
|
|
992
|
-
tool_calls?: Array<DeploymentCreateMetricToolCalls$Outbound> | undefined;
|
|
993
|
-
};
|
|
994
|
-
|
|
995
|
-
/** @internal */
|
|
996
|
-
export const DeploymentCreateMetricMessages$outboundSchema: z.ZodType<
|
|
997
|
-
DeploymentCreateMetricMessages$Outbound,
|
|
998
|
-
z.ZodTypeDef,
|
|
999
|
-
DeploymentCreateMetricMessages
|
|
1000
|
-
> = z.object({
|
|
1001
|
-
role: DeploymentCreateMetricRole$outboundSchema,
|
|
1002
|
-
content: z.union([
|
|
1003
|
-
z.string(),
|
|
1004
|
-
z.array(z.union([
|
|
1005
|
-
z.lazy(() => DeploymentCreateMetric21$outboundSchema),
|
|
1006
|
-
z.lazy(() => DeploymentCreateMetric22$outboundSchema),
|
|
1007
|
-
])),
|
|
1008
|
-
]),
|
|
1009
|
-
toolCalls: z.array(
|
|
1010
|
-
z.lazy(() => DeploymentCreateMetricToolCalls$outboundSchema),
|
|
1011
|
-
).optional(),
|
|
1012
|
-
}).transform((v) => {
|
|
1013
|
-
return remap$(v, {
|
|
1014
|
-
toolCalls: "tool_calls",
|
|
1015
|
-
});
|
|
1016
|
-
});
|
|
1017
|
-
|
|
1018
|
-
/**
|
|
1019
|
-
* @internal
|
|
1020
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1021
|
-
*/
|
|
1022
|
-
export namespace DeploymentCreateMetricMessages$ {
|
|
1023
|
-
/** @deprecated use `DeploymentCreateMetricMessages$inboundSchema` instead. */
|
|
1024
|
-
export const inboundSchema = DeploymentCreateMetricMessages$inboundSchema;
|
|
1025
|
-
/** @deprecated use `DeploymentCreateMetricMessages$outboundSchema` instead. */
|
|
1026
|
-
export const outboundSchema = DeploymentCreateMetricMessages$outboundSchema;
|
|
1027
|
-
/** @deprecated use `DeploymentCreateMetricMessages$Outbound` instead. */
|
|
1028
|
-
export type Outbound = DeploymentCreateMetricMessages$Outbound;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
export function deploymentCreateMetricMessagesToJSON(
|
|
1032
|
-
deploymentCreateMetricMessages: DeploymentCreateMetricMessages,
|
|
1033
|
-
): string {
|
|
1034
|
-
return JSON.stringify(
|
|
1035
|
-
DeploymentCreateMetricMessages$outboundSchema.parse(
|
|
1036
|
-
deploymentCreateMetricMessages,
|
|
1037
|
-
),
|
|
1038
|
-
);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
export function deploymentCreateMetricMessagesFromJSON(
|
|
1042
|
-
jsonString: string,
|
|
1043
|
-
): SafeParseResult<DeploymentCreateMetricMessages, SDKValidationError> {
|
|
1044
|
-
return safeParse(
|
|
1045
|
-
jsonString,
|
|
1046
|
-
(x) => DeploymentCreateMetricMessages$inboundSchema.parse(JSON.parse(x)),
|
|
1047
|
-
`Failed to parse 'DeploymentCreateMetricMessages' from JSON`,
|
|
1048
|
-
);
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
/** @internal */
|
|
1052
|
-
export const DeploymentCreateMetricMessageDeploymentsMetricsRole$inboundSchema:
|
|
1053
|
-
z.ZodNativeEnum<typeof DeploymentCreateMetricMessageDeploymentsMetricsRole> =
|
|
1054
|
-
z.nativeEnum(DeploymentCreateMetricMessageDeploymentsMetricsRole);
|
|
1055
|
-
|
|
1056
|
-
/** @internal */
|
|
1057
|
-
export const DeploymentCreateMetricMessageDeploymentsMetricsRole$outboundSchema:
|
|
1058
|
-
z.ZodNativeEnum<typeof DeploymentCreateMetricMessageDeploymentsMetricsRole> =
|
|
1059
|
-
DeploymentCreateMetricMessageDeploymentsMetricsRole$inboundSchema;
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* @internal
|
|
1063
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1064
|
-
*/
|
|
1065
|
-
export namespace DeploymentCreateMetricMessageDeploymentsMetricsRole$ {
|
|
1066
|
-
/** @deprecated use `DeploymentCreateMetricMessageDeploymentsMetricsRole$inboundSchema` instead. */
|
|
1067
|
-
export const inboundSchema =
|
|
1068
|
-
DeploymentCreateMetricMessageDeploymentsMetricsRole$inboundSchema;
|
|
1069
|
-
/** @deprecated use `DeploymentCreateMetricMessageDeploymentsMetricsRole$outboundSchema` instead. */
|
|
1070
|
-
export const outboundSchema =
|
|
1071
|
-
DeploymentCreateMetricMessageDeploymentsMetricsRole$outboundSchema;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
/** @internal */
|
|
1075
|
-
export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
|
|
1076
|
-
.object({
|
|
1077
|
-
role: DeploymentCreateMetricMessageDeploymentsMetricsRole$inboundSchema,
|
|
1078
|
-
url: z.string(),
|
|
1079
|
-
});
|
|
1080
|
-
|
|
1081
|
-
/** @internal */
|
|
1082
|
-
export type Three$Outbound = {
|
|
1083
|
-
role: string;
|
|
1084
|
-
url: string;
|
|
1085
|
-
};
|
|
1086
|
-
|
|
1087
|
-
/** @internal */
|
|
1088
|
-
export const Three$outboundSchema: z.ZodType<
|
|
1089
|
-
Three$Outbound,
|
|
1090
|
-
z.ZodTypeDef,
|
|
1091
|
-
Three
|
|
1092
|
-
> = z.object({
|
|
1093
|
-
role: DeploymentCreateMetricMessageDeploymentsMetricsRole$outboundSchema,
|
|
1094
|
-
url: z.string(),
|
|
1095
|
-
});
|
|
1096
|
-
|
|
1097
|
-
/**
|
|
1098
|
-
* @internal
|
|
1099
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1100
|
-
*/
|
|
1101
|
-
export namespace Three$ {
|
|
1102
|
-
/** @deprecated use `Three$inboundSchema` instead. */
|
|
1103
|
-
export const inboundSchema = Three$inboundSchema;
|
|
1104
|
-
/** @deprecated use `Three$outboundSchema` instead. */
|
|
1105
|
-
export const outboundSchema = Three$outboundSchema;
|
|
1106
|
-
/** @deprecated use `Three$Outbound` instead. */
|
|
1107
|
-
export type Outbound = Three$Outbound;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
export function threeToJSON(three: Three): string {
|
|
1111
|
-
return JSON.stringify(Three$outboundSchema.parse(three));
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
export function threeFromJSON(
|
|
1115
|
-
jsonString: string,
|
|
1116
|
-
): SafeParseResult<Three, SDKValidationError> {
|
|
1117
|
-
return safeParse(
|
|
1118
|
-
jsonString,
|
|
1119
|
-
(x) => Three$inboundSchema.parse(JSON.parse(x)),
|
|
1120
|
-
`Failed to parse 'Three' from JSON`,
|
|
1121
|
-
);
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
/** @internal */
|
|
1125
|
-
export const DeploymentCreateMetricMessageRole$inboundSchema: z.ZodNativeEnum<
|
|
1126
|
-
typeof DeploymentCreateMetricMessageRole
|
|
1127
|
-
> = z.nativeEnum(DeploymentCreateMetricMessageRole);
|
|
1128
|
-
|
|
1129
|
-
/** @internal */
|
|
1130
|
-
export const DeploymentCreateMetricMessageRole$outboundSchema: z.ZodNativeEnum<
|
|
1131
|
-
typeof DeploymentCreateMetricMessageRole
|
|
1132
|
-
> = DeploymentCreateMetricMessageRole$inboundSchema;
|
|
1133
|
-
|
|
1134
|
-
/**
|
|
1135
|
-
* @internal
|
|
1136
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1137
|
-
*/
|
|
1138
|
-
export namespace DeploymentCreateMetricMessageRole$ {
|
|
1139
|
-
/** @deprecated use `DeploymentCreateMetricMessageRole$inboundSchema` instead. */
|
|
1140
|
-
export const inboundSchema = DeploymentCreateMetricMessageRole$inboundSchema;
|
|
1141
|
-
/** @deprecated use `DeploymentCreateMetricMessageRole$outboundSchema` instead. */
|
|
1142
|
-
export const outboundSchema =
|
|
1143
|
-
DeploymentCreateMetricMessageRole$outboundSchema;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
/** @internal */
|
|
1147
|
-
export const Message2$inboundSchema: z.ZodType<
|
|
1148
|
-
Message2,
|
|
1149
|
-
z.ZodTypeDef,
|
|
1150
|
-
unknown
|
|
1151
|
-
> = z.object({
|
|
1152
|
-
role: DeploymentCreateMetricMessageRole$inboundSchema,
|
|
1153
|
-
content: z.nullable(z.string()),
|
|
1154
|
-
});
|
|
1155
|
-
|
|
1156
|
-
/** @internal */
|
|
1157
|
-
export type Message2$Outbound = {
|
|
1158
|
-
role: string;
|
|
1159
|
-
content: string | null;
|
|
1160
|
-
};
|
|
1161
|
-
|
|
1162
|
-
/** @internal */
|
|
1163
|
-
export const Message2$outboundSchema: z.ZodType<
|
|
1164
|
-
Message2$Outbound,
|
|
1165
|
-
z.ZodTypeDef,
|
|
1166
|
-
Message2
|
|
1167
|
-
> = z.object({
|
|
1168
|
-
role: DeploymentCreateMetricMessageRole$outboundSchema,
|
|
1169
|
-
content: z.nullable(z.string()),
|
|
1170
|
-
});
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* @internal
|
|
1174
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1175
|
-
*/
|
|
1176
|
-
export namespace Message2$ {
|
|
1177
|
-
/** @deprecated use `Message2$inboundSchema` instead. */
|
|
1178
|
-
export const inboundSchema = Message2$inboundSchema;
|
|
1179
|
-
/** @deprecated use `Message2$outboundSchema` instead. */
|
|
1180
|
-
export const outboundSchema = Message2$outboundSchema;
|
|
1181
|
-
/** @deprecated use `Message2$Outbound` instead. */
|
|
1182
|
-
export type Outbound = Message2$Outbound;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
export function message2ToJSON(message2: Message2): string {
|
|
1186
|
-
return JSON.stringify(Message2$outboundSchema.parse(message2));
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
export function message2FromJSON(
|
|
1190
|
-
jsonString: string,
|
|
1191
|
-
): SafeParseResult<Message2, SDKValidationError> {
|
|
1192
|
-
return safeParse(
|
|
1193
|
-
jsonString,
|
|
1194
|
-
(x) => Message2$inboundSchema.parse(JSON.parse(x)),
|
|
1195
|
-
`Failed to parse 'Message2' from JSON`,
|
|
1196
|
-
);
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
/** @internal */
|
|
1200
|
-
export const MessageRole$inboundSchema: z.ZodNativeEnum<typeof MessageRole> = z
|
|
1201
|
-
.nativeEnum(MessageRole);
|
|
1202
|
-
|
|
1203
|
-
/** @internal */
|
|
1204
|
-
export const MessageRole$outboundSchema: z.ZodNativeEnum<typeof MessageRole> =
|
|
1205
|
-
MessageRole$inboundSchema;
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* @internal
|
|
1209
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1210
|
-
*/
|
|
1211
|
-
export namespace MessageRole$ {
|
|
1212
|
-
/** @deprecated use `MessageRole$inboundSchema` instead. */
|
|
1213
|
-
export const inboundSchema = MessageRole$inboundSchema;
|
|
1214
|
-
/** @deprecated use `MessageRole$outboundSchema` instead. */
|
|
1215
|
-
export const outboundSchema = MessageRole$outboundSchema;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
/** @internal */
|
|
1219
|
-
export const MessageType$inboundSchema: z.ZodNativeEnum<typeof MessageType> = z
|
|
1220
|
-
.nativeEnum(MessageType);
|
|
1221
|
-
|
|
1222
|
-
/** @internal */
|
|
1223
|
-
export const MessageType$outboundSchema: z.ZodNativeEnum<typeof MessageType> =
|
|
1224
|
-
MessageType$inboundSchema;
|
|
1225
|
-
|
|
1226
|
-
/**
|
|
1227
|
-
* @internal
|
|
1228
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1229
|
-
*/
|
|
1230
|
-
export namespace MessageType$ {
|
|
1231
|
-
/** @deprecated use `MessageType$inboundSchema` instead. */
|
|
1232
|
-
export const inboundSchema = MessageType$inboundSchema;
|
|
1233
|
-
/** @deprecated use `MessageType$outboundSchema` instead. */
|
|
1234
|
-
export const outboundSchema = MessageType$outboundSchema;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
/** @internal */
|
|
1238
|
-
export const MessageFunction$inboundSchema: z.ZodType<
|
|
1239
|
-
MessageFunction,
|
|
1240
|
-
z.ZodTypeDef,
|
|
1241
|
-
unknown
|
|
1242
|
-
> = z.object({
|
|
1243
|
-
name: z.string(),
|
|
1244
|
-
arguments: z.string(),
|
|
1245
|
-
});
|
|
1246
|
-
|
|
1247
|
-
/** @internal */
|
|
1248
|
-
export type MessageFunction$Outbound = {
|
|
1249
|
-
name: string;
|
|
1250
|
-
arguments: string;
|
|
1251
|
-
};
|
|
1252
|
-
|
|
1253
|
-
/** @internal */
|
|
1254
|
-
export const MessageFunction$outboundSchema: z.ZodType<
|
|
1255
|
-
MessageFunction$Outbound,
|
|
1256
|
-
z.ZodTypeDef,
|
|
1257
|
-
MessageFunction
|
|
1258
|
-
> = z.object({
|
|
1259
|
-
name: z.string(),
|
|
1260
|
-
arguments: z.string(),
|
|
1261
|
-
});
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
* @internal
|
|
1265
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1266
|
-
*/
|
|
1267
|
-
export namespace MessageFunction$ {
|
|
1268
|
-
/** @deprecated use `MessageFunction$inboundSchema` instead. */
|
|
1269
|
-
export const inboundSchema = MessageFunction$inboundSchema;
|
|
1270
|
-
/** @deprecated use `MessageFunction$outboundSchema` instead. */
|
|
1271
|
-
export const outboundSchema = MessageFunction$outboundSchema;
|
|
1272
|
-
/** @deprecated use `MessageFunction$Outbound` instead. */
|
|
1273
|
-
export type Outbound = MessageFunction$Outbound;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
export function messageFunctionToJSON(
|
|
1277
|
-
messageFunction: MessageFunction,
|
|
1278
|
-
): string {
|
|
1279
|
-
return JSON.stringify(MessageFunction$outboundSchema.parse(messageFunction));
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
export function messageFunctionFromJSON(
|
|
1283
|
-
jsonString: string,
|
|
1284
|
-
): SafeParseResult<MessageFunction, SDKValidationError> {
|
|
1285
|
-
return safeParse(
|
|
1286
|
-
jsonString,
|
|
1287
|
-
(x) => MessageFunction$inboundSchema.parse(JSON.parse(x)),
|
|
1288
|
-
`Failed to parse 'MessageFunction' from JSON`,
|
|
1289
|
-
);
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
/** @internal */
|
|
1293
|
-
export const MessageToolCalls$inboundSchema: z.ZodType<
|
|
1294
|
-
MessageToolCalls,
|
|
1295
|
-
z.ZodTypeDef,
|
|
1296
|
-
unknown
|
|
1297
|
-
> = z.object({
|
|
1298
|
-
id: z.string().optional(),
|
|
1299
|
-
index: z.number().optional(),
|
|
1300
|
-
type: MessageType$inboundSchema,
|
|
1301
|
-
function: z.lazy(() => MessageFunction$inboundSchema),
|
|
1302
|
-
});
|
|
1303
|
-
|
|
1304
|
-
/** @internal */
|
|
1305
|
-
export type MessageToolCalls$Outbound = {
|
|
1306
|
-
id?: string | undefined;
|
|
1307
|
-
index?: number | undefined;
|
|
1308
|
-
type: string;
|
|
1309
|
-
function: MessageFunction$Outbound;
|
|
1310
|
-
};
|
|
1311
|
-
|
|
1312
|
-
/** @internal */
|
|
1313
|
-
export const MessageToolCalls$outboundSchema: z.ZodType<
|
|
1314
|
-
MessageToolCalls$Outbound,
|
|
1315
|
-
z.ZodTypeDef,
|
|
1316
|
-
MessageToolCalls
|
|
1317
|
-
> = z.object({
|
|
1318
|
-
id: z.string().optional(),
|
|
1319
|
-
index: z.number().optional(),
|
|
1320
|
-
type: MessageType$outboundSchema,
|
|
1321
|
-
function: z.lazy(() => MessageFunction$outboundSchema),
|
|
1322
|
-
});
|
|
1323
|
-
|
|
1324
|
-
/**
|
|
1325
|
-
* @internal
|
|
1326
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1327
|
-
*/
|
|
1328
|
-
export namespace MessageToolCalls$ {
|
|
1329
|
-
/** @deprecated use `MessageToolCalls$inboundSchema` instead. */
|
|
1330
|
-
export const inboundSchema = MessageToolCalls$inboundSchema;
|
|
1331
|
-
/** @deprecated use `MessageToolCalls$outboundSchema` instead. */
|
|
1332
|
-
export const outboundSchema = MessageToolCalls$outboundSchema;
|
|
1333
|
-
/** @deprecated use `MessageToolCalls$Outbound` instead. */
|
|
1334
|
-
export type Outbound = MessageToolCalls$Outbound;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
export function messageToolCallsToJSON(
|
|
1338
|
-
messageToolCalls: MessageToolCalls,
|
|
1339
|
-
): string {
|
|
1340
|
-
return JSON.stringify(
|
|
1341
|
-
MessageToolCalls$outboundSchema.parse(messageToolCalls),
|
|
1342
|
-
);
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
export function messageToolCallsFromJSON(
|
|
1346
|
-
jsonString: string,
|
|
1347
|
-
): SafeParseResult<MessageToolCalls, SDKValidationError> {
|
|
1348
|
-
return safeParse(
|
|
1349
|
-
jsonString,
|
|
1350
|
-
(x) => MessageToolCalls$inboundSchema.parse(JSON.parse(x)),
|
|
1351
|
-
`Failed to parse 'MessageToolCalls' from JSON`,
|
|
1352
|
-
);
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
/** @internal */
|
|
1356
|
-
export const Message1$inboundSchema: z.ZodType<
|
|
1357
|
-
Message1,
|
|
1358
|
-
z.ZodTypeDef,
|
|
1359
|
-
unknown
|
|
1360
|
-
> = z.object({
|
|
1361
|
-
role: MessageRole$inboundSchema,
|
|
1362
|
-
content: z.nullable(z.string()).optional(),
|
|
1363
|
-
tool_calls: z.array(z.lazy(() => MessageToolCalls$inboundSchema)),
|
|
1364
|
-
}).transform((v) => {
|
|
1365
|
-
return remap$(v, {
|
|
1366
|
-
"tool_calls": "toolCalls",
|
|
1367
|
-
});
|
|
1368
|
-
});
|
|
1369
|
-
|
|
1370
|
-
/** @internal */
|
|
1371
|
-
export type Message1$Outbound = {
|
|
1372
|
-
role: string;
|
|
1373
|
-
content?: string | null | undefined;
|
|
1374
|
-
tool_calls: Array<MessageToolCalls$Outbound>;
|
|
1375
|
-
};
|
|
1376
|
-
|
|
1377
|
-
/** @internal */
|
|
1378
|
-
export const Message1$outboundSchema: z.ZodType<
|
|
1379
|
-
Message1$Outbound,
|
|
1380
|
-
z.ZodTypeDef,
|
|
1381
|
-
Message1
|
|
1382
|
-
> = z.object({
|
|
1383
|
-
role: MessageRole$outboundSchema,
|
|
1384
|
-
content: z.nullable(z.string()).optional(),
|
|
1385
|
-
toolCalls: z.array(z.lazy(() => MessageToolCalls$outboundSchema)),
|
|
1386
|
-
}).transform((v) => {
|
|
1387
|
-
return remap$(v, {
|
|
1388
|
-
toolCalls: "tool_calls",
|
|
1389
|
-
});
|
|
1390
|
-
});
|
|
1391
|
-
|
|
1392
|
-
/**
|
|
1393
|
-
* @internal
|
|
1394
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1395
|
-
*/
|
|
1396
|
-
export namespace Message1$ {
|
|
1397
|
-
/** @deprecated use `Message1$inboundSchema` instead. */
|
|
1398
|
-
export const inboundSchema = Message1$inboundSchema;
|
|
1399
|
-
/** @deprecated use `Message1$outboundSchema` instead. */
|
|
1400
|
-
export const outboundSchema = Message1$outboundSchema;
|
|
1401
|
-
/** @deprecated use `Message1$Outbound` instead. */
|
|
1402
|
-
export type Outbound = Message1$Outbound;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
export function message1ToJSON(message1: Message1): string {
|
|
1406
|
-
return JSON.stringify(Message1$outboundSchema.parse(message1));
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
export function message1FromJSON(
|
|
1410
|
-
jsonString: string,
|
|
1411
|
-
): SafeParseResult<Message1, SDKValidationError> {
|
|
1412
|
-
return safeParse(
|
|
1413
|
-
jsonString,
|
|
1414
|
-
(x) => Message1$inboundSchema.parse(JSON.parse(x)),
|
|
1415
|
-
`Failed to parse 'Message1' from JSON`,
|
|
1416
|
-
);
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
/** @internal */
|
|
1420
|
-
export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
|
|
1421
|
-
z.union([
|
|
1422
|
-
z.lazy(() => Message2$inboundSchema),
|
|
1423
|
-
z.lazy(() => Three$inboundSchema),
|
|
1424
|
-
z.lazy(() => Message1$inboundSchema),
|
|
1425
|
-
]);
|
|
1426
|
-
|
|
1427
|
-
/** @internal */
|
|
1428
|
-
export type Message$Outbound =
|
|
1429
|
-
| Message2$Outbound
|
|
1430
|
-
| Three$Outbound
|
|
1431
|
-
| Message1$Outbound;
|
|
1432
|
-
|
|
1433
|
-
/** @internal */
|
|
1434
|
-
export const Message$outboundSchema: z.ZodType<
|
|
1435
|
-
Message$Outbound,
|
|
1436
|
-
z.ZodTypeDef,
|
|
1437
|
-
Message
|
|
1438
|
-
> = z.union([
|
|
1439
|
-
z.lazy(() => Message2$outboundSchema),
|
|
1440
|
-
z.lazy(() => Three$outboundSchema),
|
|
1441
|
-
z.lazy(() => Message1$outboundSchema),
|
|
1442
|
-
]);
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* @internal
|
|
1446
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1447
|
-
*/
|
|
1448
|
-
export namespace Message$ {
|
|
1449
|
-
/** @deprecated use `Message$inboundSchema` instead. */
|
|
1450
|
-
export const inboundSchema = Message$inboundSchema;
|
|
1451
|
-
/** @deprecated use `Message$outboundSchema` instead. */
|
|
1452
|
-
export const outboundSchema = Message$outboundSchema;
|
|
1453
|
-
/** @deprecated use `Message$Outbound` instead. */
|
|
1454
|
-
export type Outbound = Message$Outbound;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
export function messageToJSON(message: Message): string {
|
|
1458
|
-
return JSON.stringify(Message$outboundSchema.parse(message));
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
export function messageFromJSON(
|
|
1462
|
-
jsonString: string,
|
|
1463
|
-
): SafeParseResult<Message, SDKValidationError> {
|
|
1464
|
-
return safeParse(
|
|
1465
|
-
jsonString,
|
|
1466
|
-
(x) => Message$inboundSchema.parse(JSON.parse(x)),
|
|
1467
|
-
`Failed to parse 'Message' from JSON`,
|
|
1468
|
-
);
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
/** @internal */
|
|
1472
|
-
export const Choices$inboundSchema: z.ZodType<Choices, z.ZodTypeDef, unknown> =
|
|
1473
|
-
z.object({
|
|
1474
|
-
index: z.number(),
|
|
1475
|
-
message: z.union([
|
|
1476
|
-
z.lazy(() => Message2$inboundSchema),
|
|
1477
|
-
z.lazy(() => Three$inboundSchema),
|
|
1478
|
-
z.lazy(() => Message1$inboundSchema),
|
|
1479
|
-
]).optional(),
|
|
1480
|
-
finish_reason: z.nullable(z.string()).optional(),
|
|
1481
|
-
}).transform((v) => {
|
|
1482
|
-
return remap$(v, {
|
|
1483
|
-
"finish_reason": "finishReason",
|
|
1484
|
-
});
|
|
1485
|
-
});
|
|
1486
|
-
|
|
1487
|
-
/** @internal */
|
|
1488
|
-
export type Choices$Outbound = {
|
|
1489
|
-
index: number;
|
|
1490
|
-
message?: Message2$Outbound | Three$Outbound | Message1$Outbound | undefined;
|
|
1491
|
-
finish_reason?: string | null | undefined;
|
|
1492
|
-
};
|
|
1493
|
-
|
|
1494
|
-
/** @internal */
|
|
1495
|
-
export const Choices$outboundSchema: z.ZodType<
|
|
1496
|
-
Choices$Outbound,
|
|
1497
|
-
z.ZodTypeDef,
|
|
1498
|
-
Choices
|
|
1499
|
-
> = z.object({
|
|
1500
|
-
index: z.number(),
|
|
1501
|
-
message: z.union([
|
|
1502
|
-
z.lazy(() => Message2$outboundSchema),
|
|
1503
|
-
z.lazy(() => Three$outboundSchema),
|
|
1504
|
-
z.lazy(() => Message1$outboundSchema),
|
|
1505
|
-
]).optional(),
|
|
1506
|
-
finishReason: z.nullable(z.string()).optional(),
|
|
1507
|
-
}).transform((v) => {
|
|
1508
|
-
return remap$(v, {
|
|
1509
|
-
finishReason: "finish_reason",
|
|
1510
|
-
});
|
|
1511
|
-
});
|
|
1512
|
-
|
|
1513
|
-
/**
|
|
1514
|
-
* @internal
|
|
1515
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1516
|
-
*/
|
|
1517
|
-
export namespace Choices$ {
|
|
1518
|
-
/** @deprecated use `Choices$inboundSchema` instead. */
|
|
1519
|
-
export const inboundSchema = Choices$inboundSchema;
|
|
1520
|
-
/** @deprecated use `Choices$outboundSchema` instead. */
|
|
1521
|
-
export const outboundSchema = Choices$outboundSchema;
|
|
1522
|
-
/** @deprecated use `Choices$Outbound` instead. */
|
|
1523
|
-
export type Outbound = Choices$Outbound;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
export function choicesToJSON(choices: Choices): string {
|
|
1527
|
-
return JSON.stringify(Choices$outboundSchema.parse(choices));
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
export function choicesFromJSON(
|
|
1531
|
-
jsonString: string,
|
|
1532
|
-
): SafeParseResult<Choices, SDKValidationError> {
|
|
1533
|
-
return safeParse(
|
|
1534
|
-
jsonString,
|
|
1535
|
-
(x) => Choices$inboundSchema.parse(JSON.parse(x)),
|
|
1536
|
-
`Failed to parse 'Choices' from JSON`,
|
|
1537
|
-
);
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
/** @internal */
|
|
1541
|
-
export const Feedback$inboundSchema: z.ZodType<
|
|
1542
|
-
Feedback,
|
|
1543
|
-
z.ZodTypeDef,
|
|
1544
|
-
unknown
|
|
1545
|
-
> = z.object({
|
|
1546
|
-
score: z.number().int(),
|
|
1547
|
-
});
|
|
1548
|
-
|
|
1549
|
-
/** @internal */
|
|
1550
|
-
export type Feedback$Outbound = {
|
|
1551
|
-
score: number;
|
|
1552
|
-
};
|
|
1553
|
-
|
|
1554
|
-
/** @internal */
|
|
1555
|
-
export const Feedback$outboundSchema: z.ZodType<
|
|
1556
|
-
Feedback$Outbound,
|
|
1557
|
-
z.ZodTypeDef,
|
|
1558
|
-
Feedback
|
|
1559
|
-
> = z.object({
|
|
1560
|
-
score: z.number().int(),
|
|
1561
|
-
});
|
|
1562
|
-
|
|
1563
|
-
/**
|
|
1564
|
-
* @internal
|
|
1565
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1566
|
-
*/
|
|
1567
|
-
export namespace Feedback$ {
|
|
1568
|
-
/** @deprecated use `Feedback$inboundSchema` instead. */
|
|
1569
|
-
export const inboundSchema = Feedback$inboundSchema;
|
|
1570
|
-
/** @deprecated use `Feedback$outboundSchema` instead. */
|
|
1571
|
-
export const outboundSchema = Feedback$outboundSchema;
|
|
1572
|
-
/** @deprecated use `Feedback$Outbound` instead. */
|
|
1573
|
-
export type Outbound = Feedback$Outbound;
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
export function feedbackToJSON(feedback: Feedback): string {
|
|
1577
|
-
return JSON.stringify(Feedback$outboundSchema.parse(feedback));
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
export function feedbackFromJSON(
|
|
1581
|
-
jsonString: string,
|
|
1582
|
-
): SafeParseResult<Feedback, SDKValidationError> {
|
|
1583
|
-
return safeParse(
|
|
1584
|
-
jsonString,
|
|
1585
|
-
(x) => Feedback$inboundSchema.parse(JSON.parse(x)),
|
|
1586
|
-
`Failed to parse 'Feedback' from JSON`,
|
|
1587
|
-
);
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
/** @internal */
|
|
1591
|
-
export const DeploymentCreateMetricRequestBody$inboundSchema: z.ZodType<
|
|
1592
|
-
DeploymentCreateMetricRequestBody,
|
|
1593
|
-
z.ZodTypeDef,
|
|
1594
|
-
unknown
|
|
1595
|
-
> = z.object({
|
|
1596
|
-
metadata: z.record(z.any()).optional(),
|
|
1597
|
-
usage: z.lazy(() => Usage$inboundSchema).optional(),
|
|
1598
|
-
performance: z.lazy(() => Performance$inboundSchema).optional(),
|
|
1599
|
-
messages: z.array(z.lazy(() => DeploymentCreateMetricMessages$inboundSchema))
|
|
1600
|
-
.optional(),
|
|
1601
|
-
choices: z.array(z.lazy(() => Choices$inboundSchema)).optional(),
|
|
1602
|
-
feedback: z.lazy(() => Feedback$inboundSchema).optional(),
|
|
1603
|
-
});
|
|
1604
|
-
|
|
1605
|
-
/** @internal */
|
|
1606
|
-
export type DeploymentCreateMetricRequestBody$Outbound = {
|
|
1607
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1608
|
-
usage?: Usage$Outbound | undefined;
|
|
1609
|
-
performance?: Performance$Outbound | undefined;
|
|
1610
|
-
messages?: Array<DeploymentCreateMetricMessages$Outbound> | undefined;
|
|
1611
|
-
choices?: Array<Choices$Outbound> | undefined;
|
|
1612
|
-
feedback?: Feedback$Outbound | undefined;
|
|
1613
|
-
};
|
|
1614
|
-
|
|
1615
|
-
/** @internal */
|
|
1616
|
-
export const DeploymentCreateMetricRequestBody$outboundSchema: z.ZodType<
|
|
1617
|
-
DeploymentCreateMetricRequestBody$Outbound,
|
|
1618
|
-
z.ZodTypeDef,
|
|
1619
|
-
DeploymentCreateMetricRequestBody
|
|
1620
|
-
> = z.object({
|
|
1621
|
-
metadata: z.record(z.any()).optional(),
|
|
1622
|
-
usage: z.lazy(() => Usage$outboundSchema).optional(),
|
|
1623
|
-
performance: z.lazy(() => Performance$outboundSchema).optional(),
|
|
1624
|
-
messages: z.array(z.lazy(() => DeploymentCreateMetricMessages$outboundSchema))
|
|
1625
|
-
.optional(),
|
|
1626
|
-
choices: z.array(z.lazy(() => Choices$outboundSchema)).optional(),
|
|
1627
|
-
feedback: z.lazy(() => Feedback$outboundSchema).optional(),
|
|
1628
|
-
});
|
|
1629
|
-
|
|
1630
|
-
/**
|
|
1631
|
-
* @internal
|
|
1632
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1633
|
-
*/
|
|
1634
|
-
export namespace DeploymentCreateMetricRequestBody$ {
|
|
1635
|
-
/** @deprecated use `DeploymentCreateMetricRequestBody$inboundSchema` instead. */
|
|
1636
|
-
export const inboundSchema = DeploymentCreateMetricRequestBody$inboundSchema;
|
|
1637
|
-
/** @deprecated use `DeploymentCreateMetricRequestBody$outboundSchema` instead. */
|
|
1638
|
-
export const outboundSchema =
|
|
1639
|
-
DeploymentCreateMetricRequestBody$outboundSchema;
|
|
1640
|
-
/** @deprecated use `DeploymentCreateMetricRequestBody$Outbound` instead. */
|
|
1641
|
-
export type Outbound = DeploymentCreateMetricRequestBody$Outbound;
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
export function deploymentCreateMetricRequestBodyToJSON(
|
|
1645
|
-
deploymentCreateMetricRequestBody: DeploymentCreateMetricRequestBody,
|
|
1646
|
-
): string {
|
|
1647
|
-
return JSON.stringify(
|
|
1648
|
-
DeploymentCreateMetricRequestBody$outboundSchema.parse(
|
|
1649
|
-
deploymentCreateMetricRequestBody,
|
|
1650
|
-
),
|
|
1651
|
-
);
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
export function deploymentCreateMetricRequestBodyFromJSON(
|
|
1655
|
-
jsonString: string,
|
|
1656
|
-
): SafeParseResult<DeploymentCreateMetricRequestBody, SDKValidationError> {
|
|
1657
|
-
return safeParse(
|
|
1658
|
-
jsonString,
|
|
1659
|
-
(x) => DeploymentCreateMetricRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
1660
|
-
`Failed to parse 'DeploymentCreateMetricRequestBody' from JSON`,
|
|
1661
|
-
);
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
/** @internal */
|
|
1665
|
-
export const DeploymentCreateMetricRequest$inboundSchema: z.ZodType<
|
|
1666
|
-
DeploymentCreateMetricRequest,
|
|
1667
|
-
z.ZodTypeDef,
|
|
1668
|
-
unknown
|
|
1669
|
-
> = z.object({
|
|
1670
|
-
id: z.string(),
|
|
1671
|
-
RequestBody: z.lazy(() => DeploymentCreateMetricRequestBody$inboundSchema),
|
|
1672
|
-
}).transform((v) => {
|
|
1673
|
-
return remap$(v, {
|
|
1674
|
-
"RequestBody": "requestBody",
|
|
1675
|
-
});
|
|
1676
|
-
});
|
|
1677
|
-
|
|
1678
|
-
/** @internal */
|
|
1679
|
-
export type DeploymentCreateMetricRequest$Outbound = {
|
|
1680
|
-
id: string;
|
|
1681
|
-
RequestBody: DeploymentCreateMetricRequestBody$Outbound;
|
|
1682
|
-
};
|
|
1683
|
-
|
|
1684
|
-
/** @internal */
|
|
1685
|
-
export const DeploymentCreateMetricRequest$outboundSchema: z.ZodType<
|
|
1686
|
-
DeploymentCreateMetricRequest$Outbound,
|
|
1687
|
-
z.ZodTypeDef,
|
|
1688
|
-
DeploymentCreateMetricRequest
|
|
1689
|
-
> = z.object({
|
|
1690
|
-
id: z.string(),
|
|
1691
|
-
requestBody: z.lazy(() => DeploymentCreateMetricRequestBody$outboundSchema),
|
|
1692
|
-
}).transform((v) => {
|
|
1693
|
-
return remap$(v, {
|
|
1694
|
-
requestBody: "RequestBody",
|
|
1695
|
-
});
|
|
1696
|
-
});
|
|
1697
|
-
|
|
1698
|
-
/**
|
|
1699
|
-
* @internal
|
|
1700
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1701
|
-
*/
|
|
1702
|
-
export namespace DeploymentCreateMetricRequest$ {
|
|
1703
|
-
/** @deprecated use `DeploymentCreateMetricRequest$inboundSchema` instead. */
|
|
1704
|
-
export const inboundSchema = DeploymentCreateMetricRequest$inboundSchema;
|
|
1705
|
-
/** @deprecated use `DeploymentCreateMetricRequest$outboundSchema` instead. */
|
|
1706
|
-
export const outboundSchema = DeploymentCreateMetricRequest$outboundSchema;
|
|
1707
|
-
/** @deprecated use `DeploymentCreateMetricRequest$Outbound` instead. */
|
|
1708
|
-
export type Outbound = DeploymentCreateMetricRequest$Outbound;
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
export function deploymentCreateMetricRequestToJSON(
|
|
1712
|
-
deploymentCreateMetricRequest: DeploymentCreateMetricRequest,
|
|
1713
|
-
): string {
|
|
1714
|
-
return JSON.stringify(
|
|
1715
|
-
DeploymentCreateMetricRequest$outboundSchema.parse(
|
|
1716
|
-
deploymentCreateMetricRequest,
|
|
1717
|
-
),
|
|
1718
|
-
);
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
export function deploymentCreateMetricRequestFromJSON(
|
|
1722
|
-
jsonString: string,
|
|
1723
|
-
): SafeParseResult<DeploymentCreateMetricRequest, SDKValidationError> {
|
|
1724
|
-
return safeParse(
|
|
1725
|
-
jsonString,
|
|
1726
|
-
(x) => DeploymentCreateMetricRequest$inboundSchema.parse(JSON.parse(x)),
|
|
1727
|
-
`Failed to parse 'DeploymentCreateMetricRequest' from JSON`,
|
|
1728
|
-
);
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
/** @internal */
|
|
1732
|
-
export const DeploymentCreateMetricResponseBody$inboundSchema: z.ZodType<
|
|
1733
|
-
DeploymentCreateMetricResponseBody,
|
|
1734
|
-
z.ZodTypeDef,
|
|
1735
|
-
unknown
|
|
1736
|
-
> = z.object({
|
|
1737
|
-
code: z.number(),
|
|
1738
|
-
success: z.boolean(),
|
|
1739
|
-
});
|
|
1740
|
-
|
|
1741
|
-
/** @internal */
|
|
1742
|
-
export type DeploymentCreateMetricResponseBody$Outbound = {
|
|
1743
|
-
code: number;
|
|
1744
|
-
success: boolean;
|
|
1745
|
-
};
|
|
1746
|
-
|
|
1747
|
-
/** @internal */
|
|
1748
|
-
export const DeploymentCreateMetricResponseBody$outboundSchema: z.ZodType<
|
|
1749
|
-
DeploymentCreateMetricResponseBody$Outbound,
|
|
1750
|
-
z.ZodTypeDef,
|
|
1751
|
-
DeploymentCreateMetricResponseBody
|
|
1752
|
-
> = z.object({
|
|
1753
|
-
code: z.number(),
|
|
1754
|
-
success: z.boolean(),
|
|
1755
|
-
});
|
|
1756
|
-
|
|
1757
|
-
/**
|
|
1758
|
-
* @internal
|
|
1759
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1760
|
-
*/
|
|
1761
|
-
export namespace DeploymentCreateMetricResponseBody$ {
|
|
1762
|
-
/** @deprecated use `DeploymentCreateMetricResponseBody$inboundSchema` instead. */
|
|
1763
|
-
export const inboundSchema = DeploymentCreateMetricResponseBody$inboundSchema;
|
|
1764
|
-
/** @deprecated use `DeploymentCreateMetricResponseBody$outboundSchema` instead. */
|
|
1765
|
-
export const outboundSchema =
|
|
1766
|
-
DeploymentCreateMetricResponseBody$outboundSchema;
|
|
1767
|
-
/** @deprecated use `DeploymentCreateMetricResponseBody$Outbound` instead. */
|
|
1768
|
-
export type Outbound = DeploymentCreateMetricResponseBody$Outbound;
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
export function deploymentCreateMetricResponseBodyToJSON(
|
|
1772
|
-
deploymentCreateMetricResponseBody: DeploymentCreateMetricResponseBody,
|
|
1773
|
-
): string {
|
|
1774
|
-
return JSON.stringify(
|
|
1775
|
-
DeploymentCreateMetricResponseBody$outboundSchema.parse(
|
|
1776
|
-
deploymentCreateMetricResponseBody,
|
|
1777
|
-
),
|
|
1778
|
-
);
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
export function deploymentCreateMetricResponseBodyFromJSON(
|
|
1782
|
-
jsonString: string,
|
|
1783
|
-
): SafeParseResult<DeploymentCreateMetricResponseBody, SDKValidationError> {
|
|
1784
|
-
return safeParse(
|
|
1785
|
-
jsonString,
|
|
1786
|
-
(x) =>
|
|
1787
|
-
DeploymentCreateMetricResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
1788
|
-
`Failed to parse 'DeploymentCreateMetricResponseBody' from JSON`,
|
|
1789
|
-
);
|
|
1790
|
-
}
|