@orq-ai/node 4.2.7 → 4.2.9
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/examples/package-lock.json +1 -1
- package/funcs/routerAudioTranscriptionsCreate.js +15 -0
- package/funcs/routerAudioTranscriptionsCreate.js.map +1 -1
- package/funcs/routerAudioTranslationsCreate.js +15 -0
- package/funcs/routerAudioTranslationsCreate.js.map +1 -1
- package/funcs/routerImagesEditsCreate.js +18 -0
- package/funcs/routerImagesEditsCreate.js.map +1 -1
- package/funcs/routerImagesVariationsCreate.js +18 -0
- package/funcs/routerImagesVariationsCreate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/conversationresponse.js +1 -1
- package/models/components/conversationwithmessagesresponse.js +1 -1
- package/models/components/partdoneevent.js +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createagentrequest.d.ts +18 -0
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +4 -0
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +5 -0
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +1 -0
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createcompletion.d.ts +193 -44
- package/models/operations/createcompletion.d.ts.map +1 -1
- package/models/operations/createcompletion.js +125 -38
- package/models/operations/createcompletion.js.map +1 -1
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createconversation.js +1 -1
- package/models/operations/createconversationresponse.js +2 -2
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createembedding.d.ts +176 -27
- package/models/operations/createembedding.d.ts.map +1 -1
- package/models/operations/createembedding.js +104 -17
- package/models/operations/createembedding.js.map +1 -1
- package/models/operations/createeval.js +14 -14
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createimage.d.ts +173 -24
- package/models/operations/createimage.d.ts.map +1 -1
- package/models/operations/createimage.js +100 -14
- package/models/operations/createimage.js.map +1 -1
- package/models/operations/createimageedit.d.ts +187 -38
- package/models/operations/createimageedit.d.ts.map +1 -1
- package/models/operations/createimageedit.js +114 -27
- package/models/operations/createimageedit.js.map +1 -1
- package/models/operations/createimagevariation.d.ts +187 -38
- package/models/operations/createimagevariation.d.ts.map +1 -1
- package/models/operations/createimagevariation.js +115 -29
- package/models/operations/createimagevariation.js.map +1 -1
- package/models/operations/createprompt.d.ts +9 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +2 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/creatererank.d.ts +176 -27
- package/models/operations/creatererank.d.ts.map +1 -1
- package/models/operations/creatererank.js +103 -18
- package/models/operations/creatererank.js.map +1 -1
- package/models/operations/createspeech.d.ts +150 -30
- package/models/operations/createspeech.d.ts.map +1 -1
- package/models/operations/createspeech.js +93 -22
- package/models/operations/createspeech.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/createtranscription.d.ts +129 -9
- package/models/operations/createtranscription.d.ts.map +1 -1
- package/models/operations/createtranscription.js +78 -7
- package/models/operations/createtranscription.js.map +1 -1
- package/models/operations/createtranslation.d.ts +129 -9
- package/models/operations/createtranslation.d.ts.map +1 -1
- package/models/operations/createtranslation.js +76 -7
- package/models/operations/createtranslation.js.map +1 -1
- package/models/operations/fileget.js +1 -1
- package/models/operations/filelist.js +1 -1
- package/models/operations/fileupload.js +1 -1
- package/models/operations/generateconversationname.js +1 -1
- package/models/operations/getallprompts.d.ts +4 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +1 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +14 -14
- package/models/operations/getoneprompt.d.ts +4 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +4 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +1 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/listagents.d.ts +8 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +2 -0
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +1 -1
- package/models/operations/listpromptversions.d.ts +4 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +1 -0
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrieveagentrequest.d.ts +8 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +2 -0
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +10 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +3 -1
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +10 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +3 -1
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +18 -0
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +4 -0
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updateconversation.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +14 -14
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updateprompt.d.ts +9 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +2 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +1 -1
- package/src/funcs/routerAudioTranscriptionsCreate.ts +31 -0
- package/src/funcs/routerAudioTranslationsCreate.ts +31 -0
- package/src/funcs/routerImagesEditsCreate.ts +38 -0
- package/src/funcs/routerImagesVariationsCreate.ts +38 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/conversationresponse.ts +1 -1
- package/src/models/components/conversationwithmessagesresponse.ts +1 -1
- package/src/models/components/partdoneevent.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createagentrequest.ts +22 -0
- package/src/models/operations/createchatcompletion.ts +6 -0
- package/src/models/operations/createcompletion.ts +432 -97
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createconversation.ts +1 -1
- package/src/models/operations/createconversationresponse.ts +2 -2
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createembedding.ts +383 -53
- package/src/models/operations/createeval.ts +14 -14
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createimage.ts +382 -45
- package/src/models/operations/createimageedit.ts +406 -73
- package/src/models/operations/createimagevariation.ts +428 -78
- package/src/models/operations/createprompt.ts +11 -0
- package/src/models/operations/creatererank.ts +369 -54
- package/src/models/operations/createspeech.ts +333 -61
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/createtranscription.ts +312 -15
- package/src/models/operations/createtranslation.ts +307 -15
- package/src/models/operations/fileget.ts +1 -1
- package/src/models/operations/filelist.ts +1 -1
- package/src/models/operations/fileupload.ts +1 -1
- package/src/models/operations/generateconversationname.ts +1 -1
- package/src/models/operations/getallprompts.ts +5 -0
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +14 -14
- package/src/models/operations/getoneprompt.ts +5 -0
- package/src/models/operations/getpromptversion.ts +5 -0
- package/src/models/operations/listagents.ts +10 -0
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +1 -1
- package/src/models/operations/listpromptversions.ts +5 -0
- package/src/models/operations/retrieveagentrequest.ts +10 -0
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +13 -1
- package/src/models/operations/streamrunagent.ts +13 -1
- package/src/models/operations/updateagent.ts +22 -0
- package/src/models/operations/updateconversation.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +14 -14
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updateprompt.ts +11 -0
- package/src/models/operations/updatetool.ts +7 -7
|
@@ -1569,8 +1569,8 @@ export const Typescript$inboundSchema: z.ZodType<
|
|
|
1569
1569
|
> = z.object({
|
|
1570
1570
|
_id: z.string(),
|
|
1571
1571
|
description: z.string(),
|
|
1572
|
-
created: z.string().default("2026-01-
|
|
1573
|
-
updated: z.string().default("2026-01-
|
|
1572
|
+
created: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
1573
|
+
updated: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
1574
1574
|
guardrail_config: z.union([
|
|
1575
1575
|
z.lazy(() =>
|
|
1576
1576
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody7Boolean$inboundSchema
|
|
@@ -1712,8 +1712,8 @@ export const Ragas$inboundSchema: z.ZodType<Ragas, z.ZodTypeDef, unknown> = z
|
|
|
1712
1712
|
.object({
|
|
1713
1713
|
_id: z.string(),
|
|
1714
1714
|
description: z.string(),
|
|
1715
|
-
created: z.string().default("2026-01-
|
|
1716
|
-
updated: z.string().default("2026-01-
|
|
1715
|
+
created: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
1716
|
+
updated: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
1717
1717
|
guardrail_config: z.union([
|
|
1718
1718
|
z.lazy(() =>
|
|
1719
1719
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody6Boolean$inboundSchema
|
|
@@ -2491,8 +2491,8 @@ export const CreateEvalResponseBodyFunction$inboundSchema: z.ZodType<
|
|
|
2491
2491
|
> = z.object({
|
|
2492
2492
|
_id: z.string(),
|
|
2493
2493
|
description: z.string(),
|
|
2494
|
-
created: z.string().default("2026-01-
|
|
2495
|
-
updated: z.string().default("2026-01-
|
|
2494
|
+
created: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2495
|
+
updated: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2496
2496
|
guardrail_config: z.union([
|
|
2497
2497
|
z.lazy(() =>
|
|
2498
2498
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBody5Boolean$inboundSchema
|
|
@@ -2668,8 +2668,8 @@ export const ResponseBodyPython$inboundSchema: z.ZodType<
|
|
|
2668
2668
|
> = z.object({
|
|
2669
2669
|
_id: z.string(),
|
|
2670
2670
|
description: z.string(),
|
|
2671
|
-
created: z.string().default("2026-01-
|
|
2672
|
-
updated: z.string().default("2026-01-
|
|
2671
|
+
created: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2672
|
+
updated: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2673
2673
|
guardrail_config: z.union([
|
|
2674
2674
|
z.lazy(() =>
|
|
2675
2675
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyBoolean$inboundSchema
|
|
@@ -2813,8 +2813,8 @@ export const ResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
|
2813
2813
|
> = z.object({
|
|
2814
2814
|
_id: z.string(),
|
|
2815
2815
|
description: z.string(),
|
|
2816
|
-
created: z.string().default("2026-01-
|
|
2817
|
-
updated: z.string().default("2026-01-
|
|
2816
|
+
created: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2817
|
+
updated: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2818
2818
|
guardrail_config: z.union([
|
|
2819
2819
|
z.lazy(() =>
|
|
2820
2820
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONBoolean$inboundSchema
|
|
@@ -2947,8 +2947,8 @@ export const ResponseBodyJSON$inboundSchema: z.ZodType<
|
|
|
2947
2947
|
> = z.object({
|
|
2948
2948
|
_id: z.string(),
|
|
2949
2949
|
description: z.string(),
|
|
2950
|
-
created: z.string().default("2026-01-
|
|
2951
|
-
updated: z.string().default("2026-01-
|
|
2950
|
+
created: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2951
|
+
updated: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
2952
2952
|
guardrail_config: z.union([
|
|
2953
2953
|
z.lazy(() =>
|
|
2954
2954
|
CreateEvalGuardrailConfigEvalsResponse200Boolean$inboundSchema
|
|
@@ -3075,8 +3075,8 @@ export const ResponseBodyLLM$inboundSchema: z.ZodType<
|
|
|
3075
3075
|
> = z.object({
|
|
3076
3076
|
_id: z.string(),
|
|
3077
3077
|
description: z.string(),
|
|
3078
|
-
created: z.string().default("2026-01-
|
|
3079
|
-
updated: z.string().default("2026-01-
|
|
3078
|
+
created: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
3079
|
+
updated: z.string().default("2026-01-25T22:42:53.396Z"),
|
|
3080
3080
|
guardrail_config: z.union([
|
|
3081
3081
|
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
3082
3082
|
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
@@ -139,7 +139,7 @@ export const CreateIdentityResponseBody$inboundSchema: z.ZodType<
|
|
|
139
139
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
140
140
|
.optional(),
|
|
141
141
|
updated: z.string().datetime({ offset: true }).default(
|
|
142
|
-
"2026-01-
|
|
142
|
+
"2026-01-25T22:42:51.693Z",
|
|
143
143
|
).transform(v => new Date(v)),
|
|
144
144
|
}).transform((v) => {
|
|
145
145
|
return remap$(v, {
|
|
@@ -90,6 +90,13 @@ export const Style = {
|
|
|
90
90
|
*/
|
|
91
91
|
export type Style = ClosedEnum<typeof Style>;
|
|
92
92
|
|
|
93
|
+
export type CreateImageFallbacks = {
|
|
94
|
+
/**
|
|
95
|
+
* Fallback model identifier
|
|
96
|
+
*/
|
|
97
|
+
model: string;
|
|
98
|
+
};
|
|
99
|
+
|
|
93
100
|
/**
|
|
94
101
|
* Retry configuration for the request
|
|
95
102
|
*/
|
|
@@ -104,13 +111,6 @@ export type CreateImageRetry = {
|
|
|
104
111
|
onCodes?: Array<number> | undefined;
|
|
105
112
|
};
|
|
106
113
|
|
|
107
|
-
export type CreateImageFallbacks = {
|
|
108
|
-
/**
|
|
109
|
-
* Fallback model identifier
|
|
110
|
-
*/
|
|
111
|
-
model: string;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
114
|
export const CreateImageType = {
|
|
115
115
|
ExactMatch: "exact_match",
|
|
116
116
|
} as const;
|
|
@@ -151,7 +151,7 @@ export type CreateImageLoadBalancer1 = {
|
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
154
|
+
* Load balancer configuration for the request.
|
|
155
155
|
*/
|
|
156
156
|
export type CreateImageLoadBalancer = CreateImageLoadBalancer1;
|
|
157
157
|
|
|
@@ -165,6 +165,84 @@ export type CreateImageTimeout = {
|
|
|
165
165
|
callTimeout: number;
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Retry configuration for the request
|
|
170
|
+
*/
|
|
171
|
+
export type CreateImageRouterImagesGenerationsRetry = {
|
|
172
|
+
/**
|
|
173
|
+
* Number of retry attempts (1-5)
|
|
174
|
+
*/
|
|
175
|
+
count?: number | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* HTTP status codes that trigger retry logic
|
|
178
|
+
*/
|
|
179
|
+
onCodes?: Array<number> | undefined;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export type CreateImageRouterImagesGenerationsFallbacks = {
|
|
183
|
+
/**
|
|
184
|
+
* Fallback model identifier
|
|
185
|
+
*/
|
|
186
|
+
model: string;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export const CreateImageRouterImagesGenerationsType = {
|
|
190
|
+
ExactMatch: "exact_match",
|
|
191
|
+
} as const;
|
|
192
|
+
export type CreateImageRouterImagesGenerationsType = ClosedEnum<
|
|
193
|
+
typeof CreateImageRouterImagesGenerationsType
|
|
194
|
+
>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Cache configuration for the request.
|
|
198
|
+
*/
|
|
199
|
+
export type CreateImageRouterImagesGenerationsCache = {
|
|
200
|
+
/**
|
|
201
|
+
* Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
|
|
202
|
+
*/
|
|
203
|
+
ttl?: number | undefined;
|
|
204
|
+
type: CreateImageRouterImagesGenerationsType;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export const CreateImageLoadBalancerRouterImagesGenerationsType = {
|
|
208
|
+
WeightBased: "weight_based",
|
|
209
|
+
} as const;
|
|
210
|
+
export type CreateImageLoadBalancerRouterImagesGenerationsType = ClosedEnum<
|
|
211
|
+
typeof CreateImageLoadBalancerRouterImagesGenerationsType
|
|
212
|
+
>;
|
|
213
|
+
|
|
214
|
+
export type CreateImageLoadBalancerRouterImagesGenerationsModels = {
|
|
215
|
+
/**
|
|
216
|
+
* Model identifier for load balancing
|
|
217
|
+
*/
|
|
218
|
+
model: string;
|
|
219
|
+
/**
|
|
220
|
+
* Weight assigned to this model for load balancing
|
|
221
|
+
*/
|
|
222
|
+
weight?: number | undefined;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export type CreateImageLoadBalancerRouterImagesGenerations1 = {
|
|
226
|
+
type: CreateImageLoadBalancerRouterImagesGenerationsType;
|
|
227
|
+
models: Array<CreateImageLoadBalancerRouterImagesGenerationsModels>;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Array of models with weights for load balancing requests
|
|
232
|
+
*/
|
|
233
|
+
export type CreateImageRouterImagesGenerationsLoadBalancer =
|
|
234
|
+
CreateImageLoadBalancerRouterImagesGenerations1;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
|
|
238
|
+
*/
|
|
239
|
+
export type CreateImageRouterImagesGenerationsTimeout = {
|
|
240
|
+
/**
|
|
241
|
+
* Timeout value in milliseconds
|
|
242
|
+
*/
|
|
243
|
+
callTimeout: number;
|
|
244
|
+
};
|
|
245
|
+
|
|
168
246
|
export type CreateImageOrq = {
|
|
169
247
|
/**
|
|
170
248
|
* The name to display on the trace. If not specified, the default system name will be used.
|
|
@@ -173,11 +251,11 @@ export type CreateImageOrq = {
|
|
|
173
251
|
/**
|
|
174
252
|
* Retry configuration for the request
|
|
175
253
|
*/
|
|
176
|
-
retry?:
|
|
254
|
+
retry?: CreateImageRouterImagesGenerationsRetry | undefined;
|
|
177
255
|
/**
|
|
178
256
|
* Array of fallback models to use if primary model fails
|
|
179
257
|
*/
|
|
180
|
-
fallbacks?: Array<
|
|
258
|
+
fallbacks?: Array<CreateImageRouterImagesGenerationsFallbacks> | undefined;
|
|
181
259
|
/**
|
|
182
260
|
* Information about the identity making the request. If the identity does not exist, it will be created automatically.
|
|
183
261
|
*/
|
|
@@ -191,15 +269,15 @@ export type CreateImageOrq = {
|
|
|
191
269
|
/**
|
|
192
270
|
* Cache configuration for the request.
|
|
193
271
|
*/
|
|
194
|
-
cache?:
|
|
272
|
+
cache?: CreateImageRouterImagesGenerationsCache | undefined;
|
|
195
273
|
/**
|
|
196
274
|
* Array of models with weights for load balancing requests
|
|
197
275
|
*/
|
|
198
|
-
loadBalancer?:
|
|
276
|
+
loadBalancer?: CreateImageLoadBalancerRouterImagesGenerations1 | undefined;
|
|
199
277
|
/**
|
|
200
278
|
* Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
|
|
201
279
|
*/
|
|
202
|
-
timeout?:
|
|
280
|
+
timeout?: CreateImageRouterImagesGenerationsTimeout | undefined;
|
|
203
281
|
};
|
|
204
282
|
|
|
205
283
|
/**
|
|
@@ -250,6 +328,30 @@ export type CreateImageRequestBody = {
|
|
|
250
328
|
* The style of the generated images. This parameter is only supported for `openai/dall-e-3`. Must be one of `vivid` or `natural`.
|
|
251
329
|
*/
|
|
252
330
|
style?: Style | null | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* The name to display on the trace. If not specified, the default system name will be used.
|
|
333
|
+
*/
|
|
334
|
+
name?: string | undefined;
|
|
335
|
+
/**
|
|
336
|
+
* Array of fallback models to use if primary model fails
|
|
337
|
+
*/
|
|
338
|
+
fallbacks?: Array<CreateImageFallbacks> | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* Retry configuration for the request
|
|
341
|
+
*/
|
|
342
|
+
retry?: CreateImageRetry | undefined;
|
|
343
|
+
/**
|
|
344
|
+
* Cache configuration for the request.
|
|
345
|
+
*/
|
|
346
|
+
cache?: CreateImageCache | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* Load balancer configuration for the request.
|
|
349
|
+
*/
|
|
350
|
+
loadBalancer?: CreateImageLoadBalancer1 | undefined;
|
|
351
|
+
/**
|
|
352
|
+
* Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
|
|
353
|
+
*/
|
|
354
|
+
timeout?: CreateImageTimeout | undefined;
|
|
253
355
|
orq?: CreateImageOrq | undefined;
|
|
254
356
|
};
|
|
255
357
|
|
|
@@ -321,6 +423,28 @@ export const Style$outboundSchema: z.ZodNativeEnum<typeof Style> = z.nativeEnum(
|
|
|
321
423
|
Style,
|
|
322
424
|
);
|
|
323
425
|
|
|
426
|
+
/** @internal */
|
|
427
|
+
export type CreateImageFallbacks$Outbound = {
|
|
428
|
+
model: string;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
/** @internal */
|
|
432
|
+
export const CreateImageFallbacks$outboundSchema: z.ZodType<
|
|
433
|
+
CreateImageFallbacks$Outbound,
|
|
434
|
+
z.ZodTypeDef,
|
|
435
|
+
CreateImageFallbacks
|
|
436
|
+
> = z.object({
|
|
437
|
+
model: z.string(),
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
export function createImageFallbacksToJSON(
|
|
441
|
+
createImageFallbacks: CreateImageFallbacks,
|
|
442
|
+
): string {
|
|
443
|
+
return JSON.stringify(
|
|
444
|
+
CreateImageFallbacks$outboundSchema.parse(createImageFallbacks),
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
324
448
|
/** @internal */
|
|
325
449
|
export type CreateImageRetry$Outbound = {
|
|
326
450
|
count: number;
|
|
@@ -349,28 +473,6 @@ export function createImageRetryToJSON(
|
|
|
349
473
|
);
|
|
350
474
|
}
|
|
351
475
|
|
|
352
|
-
/** @internal */
|
|
353
|
-
export type CreateImageFallbacks$Outbound = {
|
|
354
|
-
model: string;
|
|
355
|
-
};
|
|
356
|
-
|
|
357
|
-
/** @internal */
|
|
358
|
-
export const CreateImageFallbacks$outboundSchema: z.ZodType<
|
|
359
|
-
CreateImageFallbacks$Outbound,
|
|
360
|
-
z.ZodTypeDef,
|
|
361
|
-
CreateImageFallbacks
|
|
362
|
-
> = z.object({
|
|
363
|
-
model: z.string(),
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
export function createImageFallbacksToJSON(
|
|
367
|
-
createImageFallbacks: CreateImageFallbacks,
|
|
368
|
-
): string {
|
|
369
|
-
return JSON.stringify(
|
|
370
|
-
CreateImageFallbacks$outboundSchema.parse(createImageFallbacks),
|
|
371
|
-
);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
476
|
/** @internal */
|
|
375
477
|
export const CreateImageType$outboundSchema: z.ZodNativeEnum<
|
|
376
478
|
typeof CreateImageType
|
|
@@ -500,16 +602,230 @@ export function createImageTimeoutToJSON(
|
|
|
500
602
|
);
|
|
501
603
|
}
|
|
502
604
|
|
|
605
|
+
/** @internal */
|
|
606
|
+
export type CreateImageRouterImagesGenerationsRetry$Outbound = {
|
|
607
|
+
count: number;
|
|
608
|
+
on_codes?: Array<number> | undefined;
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
/** @internal */
|
|
612
|
+
export const CreateImageRouterImagesGenerationsRetry$outboundSchema: z.ZodType<
|
|
613
|
+
CreateImageRouterImagesGenerationsRetry$Outbound,
|
|
614
|
+
z.ZodTypeDef,
|
|
615
|
+
CreateImageRouterImagesGenerationsRetry
|
|
616
|
+
> = z.object({
|
|
617
|
+
count: z.number().default(3),
|
|
618
|
+
onCodes: z.array(z.number()).optional(),
|
|
619
|
+
}).transform((v) => {
|
|
620
|
+
return remap$(v, {
|
|
621
|
+
onCodes: "on_codes",
|
|
622
|
+
});
|
|
623
|
+
});
|
|
624
|
+
|
|
625
|
+
export function createImageRouterImagesGenerationsRetryToJSON(
|
|
626
|
+
createImageRouterImagesGenerationsRetry:
|
|
627
|
+
CreateImageRouterImagesGenerationsRetry,
|
|
628
|
+
): string {
|
|
629
|
+
return JSON.stringify(
|
|
630
|
+
CreateImageRouterImagesGenerationsRetry$outboundSchema.parse(
|
|
631
|
+
createImageRouterImagesGenerationsRetry,
|
|
632
|
+
),
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/** @internal */
|
|
637
|
+
export type CreateImageRouterImagesGenerationsFallbacks$Outbound = {
|
|
638
|
+
model: string;
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
/** @internal */
|
|
642
|
+
export const CreateImageRouterImagesGenerationsFallbacks$outboundSchema:
|
|
643
|
+
z.ZodType<
|
|
644
|
+
CreateImageRouterImagesGenerationsFallbacks$Outbound,
|
|
645
|
+
z.ZodTypeDef,
|
|
646
|
+
CreateImageRouterImagesGenerationsFallbacks
|
|
647
|
+
> = z.object({
|
|
648
|
+
model: z.string(),
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
export function createImageRouterImagesGenerationsFallbacksToJSON(
|
|
652
|
+
createImageRouterImagesGenerationsFallbacks:
|
|
653
|
+
CreateImageRouterImagesGenerationsFallbacks,
|
|
654
|
+
): string {
|
|
655
|
+
return JSON.stringify(
|
|
656
|
+
CreateImageRouterImagesGenerationsFallbacks$outboundSchema.parse(
|
|
657
|
+
createImageRouterImagesGenerationsFallbacks,
|
|
658
|
+
),
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/** @internal */
|
|
663
|
+
export const CreateImageRouterImagesGenerationsType$outboundSchema:
|
|
664
|
+
z.ZodNativeEnum<typeof CreateImageRouterImagesGenerationsType> = z.nativeEnum(
|
|
665
|
+
CreateImageRouterImagesGenerationsType,
|
|
666
|
+
);
|
|
667
|
+
|
|
668
|
+
/** @internal */
|
|
669
|
+
export type CreateImageRouterImagesGenerationsCache$Outbound = {
|
|
670
|
+
ttl: number;
|
|
671
|
+
type: string;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
/** @internal */
|
|
675
|
+
export const CreateImageRouterImagesGenerationsCache$outboundSchema: z.ZodType<
|
|
676
|
+
CreateImageRouterImagesGenerationsCache$Outbound,
|
|
677
|
+
z.ZodTypeDef,
|
|
678
|
+
CreateImageRouterImagesGenerationsCache
|
|
679
|
+
> = z.object({
|
|
680
|
+
ttl: z.number().default(1800),
|
|
681
|
+
type: CreateImageRouterImagesGenerationsType$outboundSchema,
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
export function createImageRouterImagesGenerationsCacheToJSON(
|
|
685
|
+
createImageRouterImagesGenerationsCache:
|
|
686
|
+
CreateImageRouterImagesGenerationsCache,
|
|
687
|
+
): string {
|
|
688
|
+
return JSON.stringify(
|
|
689
|
+
CreateImageRouterImagesGenerationsCache$outboundSchema.parse(
|
|
690
|
+
createImageRouterImagesGenerationsCache,
|
|
691
|
+
),
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/** @internal */
|
|
696
|
+
export const CreateImageLoadBalancerRouterImagesGenerationsType$outboundSchema:
|
|
697
|
+
z.ZodNativeEnum<typeof CreateImageLoadBalancerRouterImagesGenerationsType> = z
|
|
698
|
+
.nativeEnum(CreateImageLoadBalancerRouterImagesGenerationsType);
|
|
699
|
+
|
|
700
|
+
/** @internal */
|
|
701
|
+
export type CreateImageLoadBalancerRouterImagesGenerationsModels$Outbound = {
|
|
702
|
+
model: string;
|
|
703
|
+
weight: number;
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
/** @internal */
|
|
707
|
+
export const CreateImageLoadBalancerRouterImagesGenerationsModels$outboundSchema:
|
|
708
|
+
z.ZodType<
|
|
709
|
+
CreateImageLoadBalancerRouterImagesGenerationsModels$Outbound,
|
|
710
|
+
z.ZodTypeDef,
|
|
711
|
+
CreateImageLoadBalancerRouterImagesGenerationsModels
|
|
712
|
+
> = z.object({
|
|
713
|
+
model: z.string(),
|
|
714
|
+
weight: z.number().default(0.5),
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
export function createImageLoadBalancerRouterImagesGenerationsModelsToJSON(
|
|
718
|
+
createImageLoadBalancerRouterImagesGenerationsModels:
|
|
719
|
+
CreateImageLoadBalancerRouterImagesGenerationsModels,
|
|
720
|
+
): string {
|
|
721
|
+
return JSON.stringify(
|
|
722
|
+
CreateImageLoadBalancerRouterImagesGenerationsModels$outboundSchema.parse(
|
|
723
|
+
createImageLoadBalancerRouterImagesGenerationsModels,
|
|
724
|
+
),
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/** @internal */
|
|
729
|
+
export type CreateImageLoadBalancerRouterImagesGenerations1$Outbound = {
|
|
730
|
+
type: string;
|
|
731
|
+
models: Array<CreateImageLoadBalancerRouterImagesGenerationsModels$Outbound>;
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
/** @internal */
|
|
735
|
+
export const CreateImageLoadBalancerRouterImagesGenerations1$outboundSchema:
|
|
736
|
+
z.ZodType<
|
|
737
|
+
CreateImageLoadBalancerRouterImagesGenerations1$Outbound,
|
|
738
|
+
z.ZodTypeDef,
|
|
739
|
+
CreateImageLoadBalancerRouterImagesGenerations1
|
|
740
|
+
> = z.object({
|
|
741
|
+
type: CreateImageLoadBalancerRouterImagesGenerationsType$outboundSchema,
|
|
742
|
+
models: z.array(
|
|
743
|
+
z.lazy(() =>
|
|
744
|
+
CreateImageLoadBalancerRouterImagesGenerationsModels$outboundSchema
|
|
745
|
+
),
|
|
746
|
+
),
|
|
747
|
+
});
|
|
748
|
+
|
|
749
|
+
export function createImageLoadBalancerRouterImagesGenerations1ToJSON(
|
|
750
|
+
createImageLoadBalancerRouterImagesGenerations1:
|
|
751
|
+
CreateImageLoadBalancerRouterImagesGenerations1,
|
|
752
|
+
): string {
|
|
753
|
+
return JSON.stringify(
|
|
754
|
+
CreateImageLoadBalancerRouterImagesGenerations1$outboundSchema.parse(
|
|
755
|
+
createImageLoadBalancerRouterImagesGenerations1,
|
|
756
|
+
),
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/** @internal */
|
|
761
|
+
export type CreateImageRouterImagesGenerationsLoadBalancer$Outbound =
|
|
762
|
+
CreateImageLoadBalancerRouterImagesGenerations1$Outbound;
|
|
763
|
+
|
|
764
|
+
/** @internal */
|
|
765
|
+
export const CreateImageRouterImagesGenerationsLoadBalancer$outboundSchema:
|
|
766
|
+
z.ZodType<
|
|
767
|
+
CreateImageRouterImagesGenerationsLoadBalancer$Outbound,
|
|
768
|
+
z.ZodTypeDef,
|
|
769
|
+
CreateImageRouterImagesGenerationsLoadBalancer
|
|
770
|
+
> = z.lazy(() =>
|
|
771
|
+
CreateImageLoadBalancerRouterImagesGenerations1$outboundSchema
|
|
772
|
+
);
|
|
773
|
+
|
|
774
|
+
export function createImageRouterImagesGenerationsLoadBalancerToJSON(
|
|
775
|
+
createImageRouterImagesGenerationsLoadBalancer:
|
|
776
|
+
CreateImageRouterImagesGenerationsLoadBalancer,
|
|
777
|
+
): string {
|
|
778
|
+
return JSON.stringify(
|
|
779
|
+
CreateImageRouterImagesGenerationsLoadBalancer$outboundSchema.parse(
|
|
780
|
+
createImageRouterImagesGenerationsLoadBalancer,
|
|
781
|
+
),
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** @internal */
|
|
786
|
+
export type CreateImageRouterImagesGenerationsTimeout$Outbound = {
|
|
787
|
+
call_timeout: number;
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
/** @internal */
|
|
791
|
+
export const CreateImageRouterImagesGenerationsTimeout$outboundSchema:
|
|
792
|
+
z.ZodType<
|
|
793
|
+
CreateImageRouterImagesGenerationsTimeout$Outbound,
|
|
794
|
+
z.ZodTypeDef,
|
|
795
|
+
CreateImageRouterImagesGenerationsTimeout
|
|
796
|
+
> = z.object({
|
|
797
|
+
callTimeout: z.number(),
|
|
798
|
+
}).transform((v) => {
|
|
799
|
+
return remap$(v, {
|
|
800
|
+
callTimeout: "call_timeout",
|
|
801
|
+
});
|
|
802
|
+
});
|
|
803
|
+
|
|
804
|
+
export function createImageRouterImagesGenerationsTimeoutToJSON(
|
|
805
|
+
createImageRouterImagesGenerationsTimeout:
|
|
806
|
+
CreateImageRouterImagesGenerationsTimeout,
|
|
807
|
+
): string {
|
|
808
|
+
return JSON.stringify(
|
|
809
|
+
CreateImageRouterImagesGenerationsTimeout$outboundSchema.parse(
|
|
810
|
+
createImageRouterImagesGenerationsTimeout,
|
|
811
|
+
),
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
|
|
503
815
|
/** @internal */
|
|
504
816
|
export type CreateImageOrq$Outbound = {
|
|
505
817
|
name?: string | undefined;
|
|
506
|
-
retry?:
|
|
507
|
-
fallbacks?:
|
|
818
|
+
retry?: CreateImageRouterImagesGenerationsRetry$Outbound | undefined;
|
|
819
|
+
fallbacks?:
|
|
820
|
+
| Array<CreateImageRouterImagesGenerationsFallbacks$Outbound>
|
|
821
|
+
| undefined;
|
|
508
822
|
identity?: components.PublicIdentity$Outbound | undefined;
|
|
509
823
|
contact?: components.PublicContact$Outbound | undefined;
|
|
510
|
-
cache?:
|
|
511
|
-
load_balancer?:
|
|
512
|
-
|
|
824
|
+
cache?: CreateImageRouterImagesGenerationsCache$Outbound | undefined;
|
|
825
|
+
load_balancer?:
|
|
826
|
+
| CreateImageLoadBalancerRouterImagesGenerations1$Outbound
|
|
827
|
+
| undefined;
|
|
828
|
+
timeout?: CreateImageRouterImagesGenerationsTimeout$Outbound | undefined;
|
|
513
829
|
};
|
|
514
830
|
|
|
515
831
|
/** @internal */
|
|
@@ -519,15 +835,21 @@ export const CreateImageOrq$outboundSchema: z.ZodType<
|
|
|
519
835
|
CreateImageOrq
|
|
520
836
|
> = z.object({
|
|
521
837
|
name: z.string().optional(),
|
|
522
|
-
retry: z.lazy(() =>
|
|
523
|
-
fallbacks: z.array(z.lazy(() => CreateImageFallbacks$outboundSchema))
|
|
838
|
+
retry: z.lazy(() => CreateImageRouterImagesGenerationsRetry$outboundSchema)
|
|
524
839
|
.optional(),
|
|
840
|
+
fallbacks: z.array(
|
|
841
|
+
z.lazy(() => CreateImageRouterImagesGenerationsFallbacks$outboundSchema),
|
|
842
|
+
).optional(),
|
|
525
843
|
identity: components.PublicIdentity$outboundSchema.optional(),
|
|
526
844
|
contact: components.PublicContact$outboundSchema.optional(),
|
|
527
|
-
cache: z.lazy(() =>
|
|
528
|
-
loadBalancer: z.lazy(() => CreateImageLoadBalancer1$outboundSchema)
|
|
845
|
+
cache: z.lazy(() => CreateImageRouterImagesGenerationsCache$outboundSchema)
|
|
529
846
|
.optional(),
|
|
530
|
-
|
|
847
|
+
loadBalancer: z.lazy(() =>
|
|
848
|
+
CreateImageLoadBalancerRouterImagesGenerations1$outboundSchema
|
|
849
|
+
).optional(),
|
|
850
|
+
timeout: z.lazy(() =>
|
|
851
|
+
CreateImageRouterImagesGenerationsTimeout$outboundSchema
|
|
852
|
+
).optional(),
|
|
531
853
|
}).transform((v) => {
|
|
532
854
|
return remap$(v, {
|
|
533
855
|
loadBalancer: "load_balancer",
|
|
@@ -551,6 +873,12 @@ export type CreateImageRequestBody$Outbound = {
|
|
|
551
873
|
response_format?: string | null | undefined;
|
|
552
874
|
size?: string | null | undefined;
|
|
553
875
|
style?: string | null | undefined;
|
|
876
|
+
name?: string | undefined;
|
|
877
|
+
fallbacks?: Array<CreateImageFallbacks$Outbound> | undefined;
|
|
878
|
+
retry?: CreateImageRetry$Outbound | undefined;
|
|
879
|
+
cache?: CreateImageCache$Outbound | undefined;
|
|
880
|
+
load_balancer?: CreateImageLoadBalancer1$Outbound | undefined;
|
|
881
|
+
timeout?: CreateImageTimeout$Outbound | undefined;
|
|
554
882
|
orq?: CreateImageOrq$Outbound | undefined;
|
|
555
883
|
};
|
|
556
884
|
|
|
@@ -572,12 +900,21 @@ export const CreateImageRequestBody$outboundSchema: z.ZodType<
|
|
|
572
900
|
.optional(),
|
|
573
901
|
size: z.nullable(z.string()).optional(),
|
|
574
902
|
style: z.nullable(Style$outboundSchema).optional(),
|
|
903
|
+
name: z.string().optional(),
|
|
904
|
+
fallbacks: z.array(z.lazy(() => CreateImageFallbacks$outboundSchema))
|
|
905
|
+
.optional(),
|
|
906
|
+
retry: z.lazy(() => CreateImageRetry$outboundSchema).optional(),
|
|
907
|
+
cache: z.lazy(() => CreateImageCache$outboundSchema).optional(),
|
|
908
|
+
loadBalancer: z.lazy(() => CreateImageLoadBalancer1$outboundSchema)
|
|
909
|
+
.optional(),
|
|
910
|
+
timeout: z.lazy(() => CreateImageTimeout$outboundSchema).optional(),
|
|
575
911
|
orq: z.lazy(() => CreateImageOrq$outboundSchema).optional(),
|
|
576
912
|
}).transform((v) => {
|
|
577
913
|
return remap$(v, {
|
|
578
914
|
outputCompression: "output_compression",
|
|
579
915
|
outputFormat: "output_format",
|
|
580
916
|
responseFormat: "response_format",
|
|
917
|
+
loadBalancer: "load_balancer",
|
|
581
918
|
});
|
|
582
919
|
});
|
|
583
920
|
|