@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
|
@@ -17,6 +17,20 @@ export type CreateRerankFallbacks = {
|
|
|
17
17
|
model: string;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Retry configuration for the request
|
|
22
|
+
*/
|
|
23
|
+
export type CreateRerankRetry = {
|
|
24
|
+
/**
|
|
25
|
+
* Number of retry attempts (1-5)
|
|
26
|
+
*/
|
|
27
|
+
count?: number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* HTTP status codes that trigger retry logic
|
|
30
|
+
*/
|
|
31
|
+
onCodes?: Array<number> | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
20
34
|
export const CreateRerankType = {
|
|
21
35
|
ExactMatch: "exact_match",
|
|
22
36
|
} as const;
|
|
@@ -33,10 +47,73 @@ export type CreateRerankCache = {
|
|
|
33
47
|
type: CreateRerankType;
|
|
34
48
|
};
|
|
35
49
|
|
|
50
|
+
export const CreateRerankLoadBalancerType = {
|
|
51
|
+
WeightBased: "weight_based",
|
|
52
|
+
} as const;
|
|
53
|
+
export type CreateRerankLoadBalancerType = ClosedEnum<
|
|
54
|
+
typeof CreateRerankLoadBalancerType
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
export type CreateRerankLoadBalancerModels = {
|
|
58
|
+
/**
|
|
59
|
+
* Model identifier for load balancing
|
|
60
|
+
*/
|
|
61
|
+
model: string;
|
|
62
|
+
/**
|
|
63
|
+
* Weight assigned to this model for load balancing
|
|
64
|
+
*/
|
|
65
|
+
weight?: number | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type CreateRerankLoadBalancer1 = {
|
|
69
|
+
type: CreateRerankLoadBalancerType;
|
|
70
|
+
models: Array<CreateRerankLoadBalancerModels>;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Load balancer configuration for the request.
|
|
75
|
+
*/
|
|
76
|
+
export type CreateRerankLoadBalancer = CreateRerankLoadBalancer1;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 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.
|
|
80
|
+
*/
|
|
81
|
+
export type CreateRerankTimeout = {
|
|
82
|
+
/**
|
|
83
|
+
* Timeout value in milliseconds
|
|
84
|
+
*/
|
|
85
|
+
callTimeout: number;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type CreateRerankRouterRerankFallbacks = {
|
|
89
|
+
/**
|
|
90
|
+
* Fallback model identifier
|
|
91
|
+
*/
|
|
92
|
+
model: string;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const CreateRerankRouterRerankType = {
|
|
96
|
+
ExactMatch: "exact_match",
|
|
97
|
+
} as const;
|
|
98
|
+
export type CreateRerankRouterRerankType = ClosedEnum<
|
|
99
|
+
typeof CreateRerankRouterRerankType
|
|
100
|
+
>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Cache configuration for the request.
|
|
104
|
+
*/
|
|
105
|
+
export type CreateRerankRouterRerankCache = {
|
|
106
|
+
/**
|
|
107
|
+
* Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
|
|
108
|
+
*/
|
|
109
|
+
ttl?: number | undefined;
|
|
110
|
+
type: CreateRerankRouterRerankType;
|
|
111
|
+
};
|
|
112
|
+
|
|
36
113
|
/**
|
|
37
114
|
* Retry configuration for the request
|
|
38
115
|
*/
|
|
39
|
-
export type
|
|
116
|
+
export type CreateRerankRouterRerankRetry = {
|
|
40
117
|
/**
|
|
41
118
|
* Number of retry attempts (1-5)
|
|
42
119
|
*/
|
|
@@ -47,14 +124,14 @@ export type CreateRerankRetry = {
|
|
|
47
124
|
onCodes?: Array<number> | undefined;
|
|
48
125
|
};
|
|
49
126
|
|
|
50
|
-
export const
|
|
127
|
+
export const CreateRerankLoadBalancerRouterRerankType = {
|
|
51
128
|
WeightBased: "weight_based",
|
|
52
129
|
} as const;
|
|
53
|
-
export type
|
|
54
|
-
typeof
|
|
130
|
+
export type CreateRerankLoadBalancerRouterRerankType = ClosedEnum<
|
|
131
|
+
typeof CreateRerankLoadBalancerRouterRerankType
|
|
55
132
|
>;
|
|
56
133
|
|
|
57
|
-
export type
|
|
134
|
+
export type CreateRerankLoadBalancerRouterRerankModels = {
|
|
58
135
|
/**
|
|
59
136
|
* Model identifier for load balancing
|
|
60
137
|
*/
|
|
@@ -65,20 +142,21 @@ export type CreateRerankLoadBalancerModels = {
|
|
|
65
142
|
weight?: number | undefined;
|
|
66
143
|
};
|
|
67
144
|
|
|
68
|
-
export type
|
|
69
|
-
type:
|
|
70
|
-
models: Array<
|
|
145
|
+
export type CreateRerankLoadBalancerRouterRerank1 = {
|
|
146
|
+
type: CreateRerankLoadBalancerRouterRerankType;
|
|
147
|
+
models: Array<CreateRerankLoadBalancerRouterRerankModels>;
|
|
71
148
|
};
|
|
72
149
|
|
|
73
150
|
/**
|
|
74
151
|
* Array of models with weights for load balancing requests
|
|
75
152
|
*/
|
|
76
|
-
export type
|
|
153
|
+
export type CreateRerankRouterRerankLoadBalancer =
|
|
154
|
+
CreateRerankLoadBalancerRouterRerank1;
|
|
77
155
|
|
|
78
156
|
/**
|
|
79
157
|
* 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.
|
|
80
158
|
*/
|
|
81
|
-
export type
|
|
159
|
+
export type CreateRerankRouterRerankTimeout = {
|
|
82
160
|
/**
|
|
83
161
|
* Timeout value in milliseconds
|
|
84
162
|
*/
|
|
@@ -93,15 +171,15 @@ export type CreateRerankOrq = {
|
|
|
93
171
|
/**
|
|
94
172
|
* Array of fallback models to use if primary model fails
|
|
95
173
|
*/
|
|
96
|
-
fallbacks?: Array<
|
|
174
|
+
fallbacks?: Array<CreateRerankRouterRerankFallbacks> | undefined;
|
|
97
175
|
/**
|
|
98
176
|
* Cache configuration for the request.
|
|
99
177
|
*/
|
|
100
|
-
cache?:
|
|
178
|
+
cache?: CreateRerankRouterRerankCache | undefined;
|
|
101
179
|
/**
|
|
102
180
|
* Retry configuration for the request
|
|
103
181
|
*/
|
|
104
|
-
retry?:
|
|
182
|
+
retry?: CreateRerankRouterRerankRetry | undefined;
|
|
105
183
|
/**
|
|
106
184
|
* Information about the identity making the request. If the identity does not exist, it will be created automatically.
|
|
107
185
|
*/
|
|
@@ -115,11 +193,11 @@ export type CreateRerankOrq = {
|
|
|
115
193
|
/**
|
|
116
194
|
* Array of models with weights for load balancing requests
|
|
117
195
|
*/
|
|
118
|
-
loadBalancer?:
|
|
196
|
+
loadBalancer?: CreateRerankLoadBalancerRouterRerank1 | undefined;
|
|
119
197
|
/**
|
|
120
198
|
* 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.
|
|
121
199
|
*/
|
|
122
|
-
timeout?:
|
|
200
|
+
timeout?: CreateRerankRouterRerankTimeout | undefined;
|
|
123
201
|
};
|
|
124
202
|
|
|
125
203
|
/**
|
|
@@ -146,6 +224,30 @@ export type CreateRerankRequestBody = {
|
|
|
146
224
|
* The filename of the document to rerank
|
|
147
225
|
*/
|
|
148
226
|
filename?: string | null | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* The name to display on the trace. If not specified, the default system name will be used.
|
|
229
|
+
*/
|
|
230
|
+
name?: string | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* Array of fallback models to use if primary model fails
|
|
233
|
+
*/
|
|
234
|
+
fallbacks?: Array<CreateRerankFallbacks> | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* Retry configuration for the request
|
|
237
|
+
*/
|
|
238
|
+
retry?: CreateRerankRetry | undefined;
|
|
239
|
+
/**
|
|
240
|
+
* Cache configuration for the request.
|
|
241
|
+
*/
|
|
242
|
+
cache?: CreateRerankCache | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* Load balancer configuration for the request.
|
|
245
|
+
*/
|
|
246
|
+
loadBalancer?: CreateRerankLoadBalancer1 | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* 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.
|
|
249
|
+
*/
|
|
250
|
+
timeout?: CreateRerankTimeout | undefined;
|
|
149
251
|
orq?: CreateRerankOrq | undefined;
|
|
150
252
|
};
|
|
151
253
|
|
|
@@ -241,6 +343,34 @@ export function createRerankFallbacksToJSON(
|
|
|
241
343
|
);
|
|
242
344
|
}
|
|
243
345
|
|
|
346
|
+
/** @internal */
|
|
347
|
+
export type CreateRerankRetry$Outbound = {
|
|
348
|
+
count: number;
|
|
349
|
+
on_codes?: Array<number> | undefined;
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
/** @internal */
|
|
353
|
+
export const CreateRerankRetry$outboundSchema: z.ZodType<
|
|
354
|
+
CreateRerankRetry$Outbound,
|
|
355
|
+
z.ZodTypeDef,
|
|
356
|
+
CreateRerankRetry
|
|
357
|
+
> = z.object({
|
|
358
|
+
count: z.number().default(3),
|
|
359
|
+
onCodes: z.array(z.number()).optional(),
|
|
360
|
+
}).transform((v) => {
|
|
361
|
+
return remap$(v, {
|
|
362
|
+
onCodes: "on_codes",
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
export function createRerankRetryToJSON(
|
|
367
|
+
createRerankRetry: CreateRerankRetry,
|
|
368
|
+
): string {
|
|
369
|
+
return JSON.stringify(
|
|
370
|
+
CreateRerankRetry$outboundSchema.parse(createRerankRetry),
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
244
374
|
/** @internal */
|
|
245
375
|
export const CreateRerankType$outboundSchema: z.ZodNativeEnum<
|
|
246
376
|
typeof CreateRerankType
|
|
@@ -270,34 +400,6 @@ export function createRerankCacheToJSON(
|
|
|
270
400
|
);
|
|
271
401
|
}
|
|
272
402
|
|
|
273
|
-
/** @internal */
|
|
274
|
-
export type CreateRerankRetry$Outbound = {
|
|
275
|
-
count: number;
|
|
276
|
-
on_codes?: Array<number> | undefined;
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
/** @internal */
|
|
280
|
-
export const CreateRerankRetry$outboundSchema: z.ZodType<
|
|
281
|
-
CreateRerankRetry$Outbound,
|
|
282
|
-
z.ZodTypeDef,
|
|
283
|
-
CreateRerankRetry
|
|
284
|
-
> = z.object({
|
|
285
|
-
count: z.number().default(3),
|
|
286
|
-
onCodes: z.array(z.number()).optional(),
|
|
287
|
-
}).transform((v) => {
|
|
288
|
-
return remap$(v, {
|
|
289
|
-
onCodes: "on_codes",
|
|
290
|
-
});
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
export function createRerankRetryToJSON(
|
|
294
|
-
createRerankRetry: CreateRerankRetry,
|
|
295
|
-
): string {
|
|
296
|
-
return JSON.stringify(
|
|
297
|
-
CreateRerankRetry$outboundSchema.parse(createRerankRetry),
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
403
|
/** @internal */
|
|
302
404
|
export const CreateRerankLoadBalancerType$outboundSchema: z.ZodNativeEnum<
|
|
303
405
|
typeof CreateRerankLoadBalancerType
|
|
@@ -398,16 +500,211 @@ export function createRerankTimeoutToJSON(
|
|
|
398
500
|
);
|
|
399
501
|
}
|
|
400
502
|
|
|
503
|
+
/** @internal */
|
|
504
|
+
export type CreateRerankRouterRerankFallbacks$Outbound = {
|
|
505
|
+
model: string;
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/** @internal */
|
|
509
|
+
export const CreateRerankRouterRerankFallbacks$outboundSchema: z.ZodType<
|
|
510
|
+
CreateRerankRouterRerankFallbacks$Outbound,
|
|
511
|
+
z.ZodTypeDef,
|
|
512
|
+
CreateRerankRouterRerankFallbacks
|
|
513
|
+
> = z.object({
|
|
514
|
+
model: z.string(),
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
export function createRerankRouterRerankFallbacksToJSON(
|
|
518
|
+
createRerankRouterRerankFallbacks: CreateRerankRouterRerankFallbacks,
|
|
519
|
+
): string {
|
|
520
|
+
return JSON.stringify(
|
|
521
|
+
CreateRerankRouterRerankFallbacks$outboundSchema.parse(
|
|
522
|
+
createRerankRouterRerankFallbacks,
|
|
523
|
+
),
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/** @internal */
|
|
528
|
+
export const CreateRerankRouterRerankType$outboundSchema: z.ZodNativeEnum<
|
|
529
|
+
typeof CreateRerankRouterRerankType
|
|
530
|
+
> = z.nativeEnum(CreateRerankRouterRerankType);
|
|
531
|
+
|
|
532
|
+
/** @internal */
|
|
533
|
+
export type CreateRerankRouterRerankCache$Outbound = {
|
|
534
|
+
ttl: number;
|
|
535
|
+
type: string;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
/** @internal */
|
|
539
|
+
export const CreateRerankRouterRerankCache$outboundSchema: z.ZodType<
|
|
540
|
+
CreateRerankRouterRerankCache$Outbound,
|
|
541
|
+
z.ZodTypeDef,
|
|
542
|
+
CreateRerankRouterRerankCache
|
|
543
|
+
> = z.object({
|
|
544
|
+
ttl: z.number().default(1800),
|
|
545
|
+
type: CreateRerankRouterRerankType$outboundSchema,
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
export function createRerankRouterRerankCacheToJSON(
|
|
549
|
+
createRerankRouterRerankCache: CreateRerankRouterRerankCache,
|
|
550
|
+
): string {
|
|
551
|
+
return JSON.stringify(
|
|
552
|
+
CreateRerankRouterRerankCache$outboundSchema.parse(
|
|
553
|
+
createRerankRouterRerankCache,
|
|
554
|
+
),
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/** @internal */
|
|
559
|
+
export type CreateRerankRouterRerankRetry$Outbound = {
|
|
560
|
+
count: number;
|
|
561
|
+
on_codes?: Array<number> | undefined;
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
/** @internal */
|
|
565
|
+
export const CreateRerankRouterRerankRetry$outboundSchema: z.ZodType<
|
|
566
|
+
CreateRerankRouterRerankRetry$Outbound,
|
|
567
|
+
z.ZodTypeDef,
|
|
568
|
+
CreateRerankRouterRerankRetry
|
|
569
|
+
> = z.object({
|
|
570
|
+
count: z.number().default(3),
|
|
571
|
+
onCodes: z.array(z.number()).optional(),
|
|
572
|
+
}).transform((v) => {
|
|
573
|
+
return remap$(v, {
|
|
574
|
+
onCodes: "on_codes",
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
|
|
578
|
+
export function createRerankRouterRerankRetryToJSON(
|
|
579
|
+
createRerankRouterRerankRetry: CreateRerankRouterRerankRetry,
|
|
580
|
+
): string {
|
|
581
|
+
return JSON.stringify(
|
|
582
|
+
CreateRerankRouterRerankRetry$outboundSchema.parse(
|
|
583
|
+
createRerankRouterRerankRetry,
|
|
584
|
+
),
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/** @internal */
|
|
589
|
+
export const CreateRerankLoadBalancerRouterRerankType$outboundSchema:
|
|
590
|
+
z.ZodNativeEnum<typeof CreateRerankLoadBalancerRouterRerankType> = z
|
|
591
|
+
.nativeEnum(CreateRerankLoadBalancerRouterRerankType);
|
|
592
|
+
|
|
593
|
+
/** @internal */
|
|
594
|
+
export type CreateRerankLoadBalancerRouterRerankModels$Outbound = {
|
|
595
|
+
model: string;
|
|
596
|
+
weight: number;
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
/** @internal */
|
|
600
|
+
export const CreateRerankLoadBalancerRouterRerankModels$outboundSchema:
|
|
601
|
+
z.ZodType<
|
|
602
|
+
CreateRerankLoadBalancerRouterRerankModels$Outbound,
|
|
603
|
+
z.ZodTypeDef,
|
|
604
|
+
CreateRerankLoadBalancerRouterRerankModels
|
|
605
|
+
> = z.object({
|
|
606
|
+
model: z.string(),
|
|
607
|
+
weight: z.number().default(0.5),
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
export function createRerankLoadBalancerRouterRerankModelsToJSON(
|
|
611
|
+
createRerankLoadBalancerRouterRerankModels:
|
|
612
|
+
CreateRerankLoadBalancerRouterRerankModels,
|
|
613
|
+
): string {
|
|
614
|
+
return JSON.stringify(
|
|
615
|
+
CreateRerankLoadBalancerRouterRerankModels$outboundSchema.parse(
|
|
616
|
+
createRerankLoadBalancerRouterRerankModels,
|
|
617
|
+
),
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/** @internal */
|
|
622
|
+
export type CreateRerankLoadBalancerRouterRerank1$Outbound = {
|
|
623
|
+
type: string;
|
|
624
|
+
models: Array<CreateRerankLoadBalancerRouterRerankModels$Outbound>;
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
/** @internal */
|
|
628
|
+
export const CreateRerankLoadBalancerRouterRerank1$outboundSchema: z.ZodType<
|
|
629
|
+
CreateRerankLoadBalancerRouterRerank1$Outbound,
|
|
630
|
+
z.ZodTypeDef,
|
|
631
|
+
CreateRerankLoadBalancerRouterRerank1
|
|
632
|
+
> = z.object({
|
|
633
|
+
type: CreateRerankLoadBalancerRouterRerankType$outboundSchema,
|
|
634
|
+
models: z.array(
|
|
635
|
+
z.lazy(() => CreateRerankLoadBalancerRouterRerankModels$outboundSchema),
|
|
636
|
+
),
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
export function createRerankLoadBalancerRouterRerank1ToJSON(
|
|
640
|
+
createRerankLoadBalancerRouterRerank1: CreateRerankLoadBalancerRouterRerank1,
|
|
641
|
+
): string {
|
|
642
|
+
return JSON.stringify(
|
|
643
|
+
CreateRerankLoadBalancerRouterRerank1$outboundSchema.parse(
|
|
644
|
+
createRerankLoadBalancerRouterRerank1,
|
|
645
|
+
),
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/** @internal */
|
|
650
|
+
export type CreateRerankRouterRerankLoadBalancer$Outbound =
|
|
651
|
+
CreateRerankLoadBalancerRouterRerank1$Outbound;
|
|
652
|
+
|
|
653
|
+
/** @internal */
|
|
654
|
+
export const CreateRerankRouterRerankLoadBalancer$outboundSchema: z.ZodType<
|
|
655
|
+
CreateRerankRouterRerankLoadBalancer$Outbound,
|
|
656
|
+
z.ZodTypeDef,
|
|
657
|
+
CreateRerankRouterRerankLoadBalancer
|
|
658
|
+
> = z.lazy(() => CreateRerankLoadBalancerRouterRerank1$outboundSchema);
|
|
659
|
+
|
|
660
|
+
export function createRerankRouterRerankLoadBalancerToJSON(
|
|
661
|
+
createRerankRouterRerankLoadBalancer: CreateRerankRouterRerankLoadBalancer,
|
|
662
|
+
): string {
|
|
663
|
+
return JSON.stringify(
|
|
664
|
+
CreateRerankRouterRerankLoadBalancer$outboundSchema.parse(
|
|
665
|
+
createRerankRouterRerankLoadBalancer,
|
|
666
|
+
),
|
|
667
|
+
);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/** @internal */
|
|
671
|
+
export type CreateRerankRouterRerankTimeout$Outbound = {
|
|
672
|
+
call_timeout: number;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
/** @internal */
|
|
676
|
+
export const CreateRerankRouterRerankTimeout$outboundSchema: z.ZodType<
|
|
677
|
+
CreateRerankRouterRerankTimeout$Outbound,
|
|
678
|
+
z.ZodTypeDef,
|
|
679
|
+
CreateRerankRouterRerankTimeout
|
|
680
|
+
> = z.object({
|
|
681
|
+
callTimeout: z.number(),
|
|
682
|
+
}).transform((v) => {
|
|
683
|
+
return remap$(v, {
|
|
684
|
+
callTimeout: "call_timeout",
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
export function createRerankRouterRerankTimeoutToJSON(
|
|
689
|
+
createRerankRouterRerankTimeout: CreateRerankRouterRerankTimeout,
|
|
690
|
+
): string {
|
|
691
|
+
return JSON.stringify(
|
|
692
|
+
CreateRerankRouterRerankTimeout$outboundSchema.parse(
|
|
693
|
+
createRerankRouterRerankTimeout,
|
|
694
|
+
),
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
|
|
401
698
|
/** @internal */
|
|
402
699
|
export type CreateRerankOrq$Outbound = {
|
|
403
700
|
name?: string | undefined;
|
|
404
|
-
fallbacks?: Array<
|
|
405
|
-
cache?:
|
|
406
|
-
retry?:
|
|
701
|
+
fallbacks?: Array<CreateRerankRouterRerankFallbacks$Outbound> | undefined;
|
|
702
|
+
cache?: CreateRerankRouterRerankCache$Outbound | undefined;
|
|
703
|
+
retry?: CreateRerankRouterRerankRetry$Outbound | undefined;
|
|
407
704
|
identity?: components.PublicIdentity$Outbound | undefined;
|
|
408
705
|
contact?: components.PublicContact$Outbound | undefined;
|
|
409
|
-
load_balancer?:
|
|
410
|
-
timeout?:
|
|
706
|
+
load_balancer?: CreateRerankLoadBalancerRouterRerank1$Outbound | undefined;
|
|
707
|
+
timeout?: CreateRerankRouterRerankTimeout$Outbound | undefined;
|
|
411
708
|
};
|
|
412
709
|
|
|
413
710
|
/** @internal */
|
|
@@ -417,15 +714,18 @@ export const CreateRerankOrq$outboundSchema: z.ZodType<
|
|
|
417
714
|
CreateRerankOrq
|
|
418
715
|
> = z.object({
|
|
419
716
|
name: z.string().optional(),
|
|
420
|
-
fallbacks: z.array(
|
|
421
|
-
.
|
|
422
|
-
|
|
423
|
-
|
|
717
|
+
fallbacks: z.array(
|
|
718
|
+
z.lazy(() => CreateRerankRouterRerankFallbacks$outboundSchema),
|
|
719
|
+
).optional(),
|
|
720
|
+
cache: z.lazy(() => CreateRerankRouterRerankCache$outboundSchema).optional(),
|
|
721
|
+
retry: z.lazy(() => CreateRerankRouterRerankRetry$outboundSchema).optional(),
|
|
424
722
|
identity: components.PublicIdentity$outboundSchema.optional(),
|
|
425
723
|
contact: components.PublicContact$outboundSchema.optional(),
|
|
426
|
-
loadBalancer: z.lazy(() =>
|
|
724
|
+
loadBalancer: z.lazy(() =>
|
|
725
|
+
CreateRerankLoadBalancerRouterRerank1$outboundSchema
|
|
726
|
+
).optional(),
|
|
727
|
+
timeout: z.lazy(() => CreateRerankRouterRerankTimeout$outboundSchema)
|
|
427
728
|
.optional(),
|
|
428
|
-
timeout: z.lazy(() => CreateRerankTimeout$outboundSchema).optional(),
|
|
429
729
|
}).transform((v) => {
|
|
430
730
|
return remap$(v, {
|
|
431
731
|
loadBalancer: "load_balancer",
|
|
@@ -445,6 +745,12 @@ export type CreateRerankRequestBody$Outbound = {
|
|
|
445
745
|
model: string;
|
|
446
746
|
top_n?: number | undefined;
|
|
447
747
|
filename?: string | null | undefined;
|
|
748
|
+
name?: string | undefined;
|
|
749
|
+
fallbacks?: Array<CreateRerankFallbacks$Outbound> | undefined;
|
|
750
|
+
retry?: CreateRerankRetry$Outbound | undefined;
|
|
751
|
+
cache?: CreateRerankCache$Outbound | undefined;
|
|
752
|
+
load_balancer?: CreateRerankLoadBalancer1$Outbound | undefined;
|
|
753
|
+
timeout?: CreateRerankTimeout$Outbound | undefined;
|
|
448
754
|
orq?: CreateRerankOrq$Outbound | undefined;
|
|
449
755
|
};
|
|
450
756
|
|
|
@@ -459,10 +765,19 @@ export const CreateRerankRequestBody$outboundSchema: z.ZodType<
|
|
|
459
765
|
model: z.string(),
|
|
460
766
|
topN: z.number().optional(),
|
|
461
767
|
filename: z.nullable(z.string()).optional(),
|
|
768
|
+
name: z.string().optional(),
|
|
769
|
+
fallbacks: z.array(z.lazy(() => CreateRerankFallbacks$outboundSchema))
|
|
770
|
+
.optional(),
|
|
771
|
+
retry: z.lazy(() => CreateRerankRetry$outboundSchema).optional(),
|
|
772
|
+
cache: z.lazy(() => CreateRerankCache$outboundSchema).optional(),
|
|
773
|
+
loadBalancer: z.lazy(() => CreateRerankLoadBalancer1$outboundSchema)
|
|
774
|
+
.optional(),
|
|
775
|
+
timeout: z.lazy(() => CreateRerankTimeout$outboundSchema).optional(),
|
|
462
776
|
orq: z.lazy(() => CreateRerankOrq$outboundSchema).optional(),
|
|
463
777
|
}).transform((v) => {
|
|
464
778
|
return remap$(v, {
|
|
465
779
|
topN: "top_n",
|
|
780
|
+
loadBalancer: "load_balancer",
|
|
466
781
|
});
|
|
467
782
|
});
|
|
468
783
|
|