orq-ai-sdk 4.2.17__py3-none-any.whl → 4.3.0rc0__py3-none-any.whl
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.
- orq_ai_sdk/_hooks/globalhook.py +1 -0
- orq_ai_sdk/_version.py +3 -3
- orq_ai_sdk/agents.py +186 -186
- orq_ai_sdk/completions.py +1 -107
- orq_ai_sdk/edits.py +1 -107
- orq_ai_sdk/embeddings.py +1 -107
- orq_ai_sdk/generations.py +1 -99
- orq_ai_sdk/models/__init__.py +0 -405
- orq_ai_sdk/models/conversationresponse.py +1 -1
- orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
- orq_ai_sdk/models/createagentrequestop.py +0 -24
- orq_ai_sdk/models/createchatcompletionop.py +0 -6
- orq_ai_sdk/models/createcompletionop.py +30 -218
- orq_ai_sdk/models/createcontactop.py +1 -1
- orq_ai_sdk/models/createconversationop.py +1 -1
- orq_ai_sdk/models/createconversationresponseop.py +2 -2
- orq_ai_sdk/models/createdatasetitemop.py +4 -4
- orq_ai_sdk/models/createdatasetop.py +1 -1
- orq_ai_sdk/models/createdatasourceop.py +1 -1
- orq_ai_sdk/models/createembeddingop.py +26 -221
- orq_ai_sdk/models/createevalop.py +14 -14
- orq_ai_sdk/models/createidentityop.py +1 -1
- orq_ai_sdk/models/createimageeditop.py +31 -242
- orq_ai_sdk/models/createimageop.py +22 -210
- orq_ai_sdk/models/createimagevariationop.py +31 -251
- orq_ai_sdk/models/createpromptop.py +0 -12
- orq_ai_sdk/models/creatererankop.py +26 -218
- orq_ai_sdk/models/createspeechop.py +24 -174
- orq_ai_sdk/models/createtoolop.py +6 -6
- orq_ai_sdk/models/createtranscriptionop.py +10 -180
- orq_ai_sdk/models/createtranslationop.py +10 -172
- orq_ai_sdk/models/filegetop.py +1 -1
- orq_ai_sdk/models/filelistop.py +1 -1
- orq_ai_sdk/models/fileuploadop.py +1 -1
- orq_ai_sdk/models/generateconversationnameop.py +1 -1
- orq_ai_sdk/models/getallpromptsop.py +0 -6
- orq_ai_sdk/models/getalltoolsop.py +6 -6
- orq_ai_sdk/models/getevalsop.py +14 -14
- orq_ai_sdk/models/getonepromptop.py +0 -6
- orq_ai_sdk/models/getpromptversionop.py +0 -6
- orq_ai_sdk/models/listagentsop.py +0 -12
- orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
- orq_ai_sdk/models/listdatasetsop.py +1 -1
- orq_ai_sdk/models/listdatasourcesop.py +1 -1
- orq_ai_sdk/models/listidentitiesop.py +1 -1
- orq_ai_sdk/models/listpromptversionsop.py +0 -6
- orq_ai_sdk/models/partdoneevent.py +1 -1
- orq_ai_sdk/models/reasoningpart.py +1 -1
- orq_ai_sdk/models/retrieveagentrequestop.py +0 -12
- orq_ai_sdk/models/retrievedatapointop.py +4 -4
- orq_ai_sdk/models/retrievedatasetop.py +1 -1
- orq_ai_sdk/models/retrievedatasourceop.py +1 -1
- orq_ai_sdk/models/retrieveidentityop.py +1 -1
- orq_ai_sdk/models/retrievetoolop.py +6 -6
- orq_ai_sdk/models/runagentop.py +1 -13
- orq_ai_sdk/models/streamrunagentop.py +1 -13
- orq_ai_sdk/models/updateagentop.py +0 -24
- orq_ai_sdk/models/updateconversationop.py +1 -1
- orq_ai_sdk/models/updatedatapointop.py +4 -4
- orq_ai_sdk/models/updatedatasetop.py +1 -1
- orq_ai_sdk/models/updatedatasourceop.py +1 -1
- orq_ai_sdk/models/updateevalop.py +14 -14
- orq_ai_sdk/models/updateidentityop.py +1 -1
- orq_ai_sdk/models/updatepromptop.py +0 -12
- orq_ai_sdk/models/updatetoolop.py +7 -7
- orq_ai_sdk/orq_completions.py +0 -6
- orq_ai_sdk/rerank.py +0 -98
- orq_ai_sdk/speech.py +1 -83
- orq_ai_sdk/transcriptions.py +0 -90
- orq_ai_sdk/translations.py +1 -87
- orq_ai_sdk/variations.py +1 -111
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/METADATA +202 -202
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/RECORD +75 -75
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/top_level.txt +0 -0
|
@@ -34,16 +34,6 @@ CreateImageEditResponseFormat = Literal[
|
|
|
34
34
|
r"""The format in which the generated images are returned. Some of the models only return the image in base64 format."""
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
class CreateImageEditFallbacksTypedDict(TypedDict):
|
|
38
|
-
model: str
|
|
39
|
-
r"""Fallback model identifier"""
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
class CreateImageEditFallbacks(BaseModel):
|
|
43
|
-
model: str
|
|
44
|
-
r"""Fallback model identifier"""
|
|
45
|
-
|
|
46
|
-
|
|
47
37
|
class CreateImageEditRetryTypedDict(TypedDict):
|
|
48
38
|
r"""Retry configuration for the request"""
|
|
49
39
|
|
|
@@ -79,150 +69,12 @@ class CreateImageEditRetry(BaseModel):
|
|
|
79
69
|
return m
|
|
80
70
|
|
|
81
71
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class CreateImageEditCacheTypedDict(TypedDict):
|
|
86
|
-
r"""Cache configuration for the request."""
|
|
87
|
-
|
|
88
|
-
type: CreateImageEditType
|
|
89
|
-
ttl: NotRequired[float]
|
|
90
|
-
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
class CreateImageEditCache(BaseModel):
|
|
94
|
-
r"""Cache configuration for the request."""
|
|
95
|
-
|
|
96
|
-
type: CreateImageEditType
|
|
97
|
-
|
|
98
|
-
ttl: Optional[float] = 1800
|
|
99
|
-
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
100
|
-
|
|
101
|
-
@model_serializer(mode="wrap")
|
|
102
|
-
def serialize_model(self, handler):
|
|
103
|
-
optional_fields = set(["ttl"])
|
|
104
|
-
serialized = handler(self)
|
|
105
|
-
m = {}
|
|
106
|
-
|
|
107
|
-
for n, f in type(self).model_fields.items():
|
|
108
|
-
k = f.alias or n
|
|
109
|
-
val = serialized.get(k)
|
|
110
|
-
|
|
111
|
-
if val != UNSET_SENTINEL:
|
|
112
|
-
if val is not None or k not in optional_fields:
|
|
113
|
-
m[k] = val
|
|
114
|
-
|
|
115
|
-
return m
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
CreateImageEditLoadBalancerType = Literal["weight_based",]
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
class CreateImageEditLoadBalancerModelsTypedDict(TypedDict):
|
|
122
|
-
model: str
|
|
123
|
-
r"""Model identifier for load balancing"""
|
|
124
|
-
weight: NotRequired[float]
|
|
125
|
-
r"""Weight assigned to this model for load balancing"""
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
class CreateImageEditLoadBalancerModels(BaseModel):
|
|
129
|
-
model: str
|
|
130
|
-
r"""Model identifier for load balancing"""
|
|
131
|
-
|
|
132
|
-
weight: Optional[float] = 0.5
|
|
133
|
-
r"""Weight assigned to this model for load balancing"""
|
|
134
|
-
|
|
135
|
-
@model_serializer(mode="wrap")
|
|
136
|
-
def serialize_model(self, handler):
|
|
137
|
-
optional_fields = set(["weight"])
|
|
138
|
-
serialized = handler(self)
|
|
139
|
-
m = {}
|
|
140
|
-
|
|
141
|
-
for n, f in type(self).model_fields.items():
|
|
142
|
-
k = f.alias or n
|
|
143
|
-
val = serialized.get(k)
|
|
144
|
-
|
|
145
|
-
if val != UNSET_SENTINEL:
|
|
146
|
-
if val is not None or k not in optional_fields:
|
|
147
|
-
m[k] = val
|
|
148
|
-
|
|
149
|
-
return m
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
class CreateImageEditLoadBalancer1TypedDict(TypedDict):
|
|
153
|
-
type: CreateImageEditLoadBalancerType
|
|
154
|
-
models: List[CreateImageEditLoadBalancerModelsTypedDict]
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
class CreateImageEditLoadBalancer1(BaseModel):
|
|
158
|
-
type: CreateImageEditLoadBalancerType
|
|
159
|
-
|
|
160
|
-
models: List[CreateImageEditLoadBalancerModels]
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
CreateImageEditLoadBalancerTypedDict = CreateImageEditLoadBalancer1TypedDict
|
|
164
|
-
r"""Load balancer configuration for the request."""
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
CreateImageEditLoadBalancer = CreateImageEditLoadBalancer1
|
|
168
|
-
r"""Load balancer configuration for the request."""
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
class CreateImageEditTimeoutTypedDict(TypedDict):
|
|
172
|
-
r"""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."""
|
|
173
|
-
|
|
174
|
-
call_timeout: float
|
|
175
|
-
r"""Timeout value in milliseconds"""
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
class CreateImageEditTimeout(BaseModel):
|
|
179
|
-
r"""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."""
|
|
180
|
-
|
|
181
|
-
call_timeout: float
|
|
182
|
-
r"""Timeout value in milliseconds"""
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
class CreateImageEditRouterImagesEditsRetryTypedDict(TypedDict):
|
|
186
|
-
r"""Retry configuration for the request"""
|
|
187
|
-
|
|
188
|
-
count: NotRequired[float]
|
|
189
|
-
r"""Number of retry attempts (1-5)"""
|
|
190
|
-
on_codes: NotRequired[List[float]]
|
|
191
|
-
r"""HTTP status codes that trigger retry logic"""
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
class CreateImageEditRouterImagesEditsRetry(BaseModel):
|
|
195
|
-
r"""Retry configuration for the request"""
|
|
196
|
-
|
|
197
|
-
count: Optional[float] = 3
|
|
198
|
-
r"""Number of retry attempts (1-5)"""
|
|
199
|
-
|
|
200
|
-
on_codes: Optional[List[float]] = None
|
|
201
|
-
r"""HTTP status codes that trigger retry logic"""
|
|
202
|
-
|
|
203
|
-
@model_serializer(mode="wrap")
|
|
204
|
-
def serialize_model(self, handler):
|
|
205
|
-
optional_fields = set(["count", "on_codes"])
|
|
206
|
-
serialized = handler(self)
|
|
207
|
-
m = {}
|
|
208
|
-
|
|
209
|
-
for n, f in type(self).model_fields.items():
|
|
210
|
-
k = f.alias or n
|
|
211
|
-
val = serialized.get(k)
|
|
212
|
-
|
|
213
|
-
if val != UNSET_SENTINEL:
|
|
214
|
-
if val is not None or k not in optional_fields:
|
|
215
|
-
m[k] = val
|
|
216
|
-
|
|
217
|
-
return m
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
class CreateImageEditRouterImagesEditsFallbacksTypedDict(TypedDict):
|
|
72
|
+
class CreateImageEditFallbacksTypedDict(TypedDict):
|
|
221
73
|
model: str
|
|
222
74
|
r"""Fallback model identifier"""
|
|
223
75
|
|
|
224
76
|
|
|
225
|
-
class
|
|
77
|
+
class CreateImageEditFallbacks(BaseModel):
|
|
226
78
|
model: str
|
|
227
79
|
r"""Fallback model identifier"""
|
|
228
80
|
|
|
@@ -250,21 +102,21 @@ class CreateImageEditPrompt(BaseModel):
|
|
|
250
102
|
r"""Version of the prompt to use (currently only \"latest\" supported)"""
|
|
251
103
|
|
|
252
104
|
|
|
253
|
-
|
|
105
|
+
CreateImageEditType = Literal["exact_match",]
|
|
254
106
|
|
|
255
107
|
|
|
256
|
-
class
|
|
108
|
+
class CreateImageEditCacheTypedDict(TypedDict):
|
|
257
109
|
r"""Cache configuration for the request."""
|
|
258
110
|
|
|
259
|
-
type:
|
|
111
|
+
type: CreateImageEditType
|
|
260
112
|
ttl: NotRequired[float]
|
|
261
113
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
262
114
|
|
|
263
115
|
|
|
264
|
-
class
|
|
116
|
+
class CreateImageEditCache(BaseModel):
|
|
265
117
|
r"""Cache configuration for the request."""
|
|
266
118
|
|
|
267
|
-
type:
|
|
119
|
+
type: CreateImageEditType
|
|
268
120
|
|
|
269
121
|
ttl: Optional[float] = 1800
|
|
270
122
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
@@ -286,17 +138,17 @@ class CreateImageEditRouterImagesEditsCache(BaseModel):
|
|
|
286
138
|
return m
|
|
287
139
|
|
|
288
140
|
|
|
289
|
-
|
|
141
|
+
CreateImageEditLoadBalancerType = Literal["weight_based",]
|
|
290
142
|
|
|
291
143
|
|
|
292
|
-
class
|
|
144
|
+
class CreateImageEditLoadBalancerModelsTypedDict(TypedDict):
|
|
293
145
|
model: str
|
|
294
146
|
r"""Model identifier for load balancing"""
|
|
295
147
|
weight: NotRequired[float]
|
|
296
148
|
r"""Weight assigned to this model for load balancing"""
|
|
297
149
|
|
|
298
150
|
|
|
299
|
-
class
|
|
151
|
+
class CreateImageEditLoadBalancerModels(BaseModel):
|
|
300
152
|
model: str
|
|
301
153
|
r"""Model identifier for load balancing"""
|
|
302
154
|
|
|
@@ -320,37 +172,33 @@ class CreateImageEditLoadBalancerRouterImagesEditsModels(BaseModel):
|
|
|
320
172
|
return m
|
|
321
173
|
|
|
322
174
|
|
|
323
|
-
class
|
|
324
|
-
type:
|
|
325
|
-
models: List[
|
|
175
|
+
class CreateImageEditLoadBalancer1TypedDict(TypedDict):
|
|
176
|
+
type: CreateImageEditLoadBalancerType
|
|
177
|
+
models: List[CreateImageEditLoadBalancerModelsTypedDict]
|
|
326
178
|
|
|
327
179
|
|
|
328
|
-
class
|
|
329
|
-
type:
|
|
180
|
+
class CreateImageEditLoadBalancer1(BaseModel):
|
|
181
|
+
type: CreateImageEditLoadBalancerType
|
|
330
182
|
|
|
331
|
-
models: List[
|
|
183
|
+
models: List[CreateImageEditLoadBalancerModels]
|
|
332
184
|
|
|
333
185
|
|
|
334
|
-
|
|
335
|
-
CreateImageEditLoadBalancerRouterImagesEdits1TypedDict
|
|
336
|
-
)
|
|
186
|
+
CreateImageEditLoadBalancerTypedDict = CreateImageEditLoadBalancer1TypedDict
|
|
337
187
|
r"""Array of models with weights for load balancing requests"""
|
|
338
188
|
|
|
339
189
|
|
|
340
|
-
|
|
341
|
-
CreateImageEditLoadBalancerRouterImagesEdits1
|
|
342
|
-
)
|
|
190
|
+
CreateImageEditLoadBalancer = CreateImageEditLoadBalancer1
|
|
343
191
|
r"""Array of models with weights for load balancing requests"""
|
|
344
192
|
|
|
345
193
|
|
|
346
|
-
class
|
|
194
|
+
class CreateImageEditTimeoutTypedDict(TypedDict):
|
|
347
195
|
r"""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."""
|
|
348
196
|
|
|
349
197
|
call_timeout: float
|
|
350
198
|
r"""Timeout value in milliseconds"""
|
|
351
199
|
|
|
352
200
|
|
|
353
|
-
class
|
|
201
|
+
class CreateImageEditTimeout(BaseModel):
|
|
354
202
|
r"""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."""
|
|
355
203
|
|
|
356
204
|
call_timeout: float
|
|
@@ -360,9 +208,9 @@ class CreateImageEditRouterImagesEditsTimeout(BaseModel):
|
|
|
360
208
|
class CreateImageEditOrqTypedDict(TypedDict):
|
|
361
209
|
name: NotRequired[str]
|
|
362
210
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
363
|
-
retry: NotRequired[
|
|
211
|
+
retry: NotRequired[CreateImageEditRetryTypedDict]
|
|
364
212
|
r"""Retry configuration for the request"""
|
|
365
|
-
fallbacks: NotRequired[List[
|
|
213
|
+
fallbacks: NotRequired[List[CreateImageEditFallbacksTypedDict]]
|
|
366
214
|
r"""Array of fallback models to use if primary model fails"""
|
|
367
215
|
prompt: NotRequired[CreateImageEditPromptTypedDict]
|
|
368
216
|
r"""Prompt configuration for the request"""
|
|
@@ -370,11 +218,11 @@ class CreateImageEditOrqTypedDict(TypedDict):
|
|
|
370
218
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
371
219
|
contact: NotRequired[PublicContactTypedDict]
|
|
372
220
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
373
|
-
cache: NotRequired[
|
|
221
|
+
cache: NotRequired[CreateImageEditCacheTypedDict]
|
|
374
222
|
r"""Cache configuration for the request."""
|
|
375
|
-
load_balancer: NotRequired[
|
|
223
|
+
load_balancer: NotRequired[CreateImageEditLoadBalancerTypedDict]
|
|
376
224
|
r"""Array of models with weights for load balancing requests"""
|
|
377
|
-
timeout: NotRequired[
|
|
225
|
+
timeout: NotRequired[CreateImageEditTimeoutTypedDict]
|
|
378
226
|
r"""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."""
|
|
379
227
|
|
|
380
228
|
|
|
@@ -382,10 +230,10 @@ class CreateImageEditOrq(BaseModel):
|
|
|
382
230
|
name: Optional[str] = None
|
|
383
231
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
384
232
|
|
|
385
|
-
retry: Optional[
|
|
233
|
+
retry: Optional[CreateImageEditRetry] = None
|
|
386
234
|
r"""Retry configuration for the request"""
|
|
387
235
|
|
|
388
|
-
fallbacks: Optional[List[
|
|
236
|
+
fallbacks: Optional[List[CreateImageEditFallbacks]] = None
|
|
389
237
|
r"""Array of fallback models to use if primary model fails"""
|
|
390
238
|
|
|
391
239
|
prompt: Optional[CreateImageEditPrompt] = None
|
|
@@ -402,13 +250,13 @@ class CreateImageEditOrq(BaseModel):
|
|
|
402
250
|
] = None
|
|
403
251
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
404
252
|
|
|
405
|
-
cache: Optional[
|
|
253
|
+
cache: Optional[CreateImageEditCache] = None
|
|
406
254
|
r"""Cache configuration for the request."""
|
|
407
255
|
|
|
408
|
-
load_balancer: Optional[
|
|
256
|
+
load_balancer: Optional[CreateImageEditLoadBalancer] = None
|
|
409
257
|
r"""Array of models with weights for load balancing requests"""
|
|
410
258
|
|
|
411
|
-
timeout: Optional[
|
|
259
|
+
timeout: Optional[CreateImageEditTimeout] = None
|
|
412
260
|
r"""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."""
|
|
413
261
|
|
|
414
262
|
@model_serializer(mode="wrap")
|
|
@@ -457,18 +305,6 @@ class CreateImageEditRequestBodyTypedDict(TypedDict):
|
|
|
457
305
|
r"""The format in which the generated images are returned. Some of the models only return the image in base64 format."""
|
|
458
306
|
user: NotRequired[str]
|
|
459
307
|
r"""A unique identifier representing your end-user, which can help to monitor and detect abuse."""
|
|
460
|
-
name: NotRequired[str]
|
|
461
|
-
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
462
|
-
fallbacks: NotRequired[List[CreateImageEditFallbacksTypedDict]]
|
|
463
|
-
r"""Array of fallback models to use if primary model fails"""
|
|
464
|
-
retry: NotRequired[CreateImageEditRetryTypedDict]
|
|
465
|
-
r"""Retry configuration for the request"""
|
|
466
|
-
cache: NotRequired[CreateImageEditCacheTypedDict]
|
|
467
|
-
r"""Cache configuration for the request."""
|
|
468
|
-
load_balancer: NotRequired[CreateImageEditLoadBalancerTypedDict]
|
|
469
|
-
r"""Load balancer configuration for the request."""
|
|
470
|
-
timeout: NotRequired[CreateImageEditTimeoutTypedDict]
|
|
471
|
-
r"""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."""
|
|
472
308
|
orq: NotRequired[CreateImageEditOrqTypedDict]
|
|
473
309
|
|
|
474
310
|
|
|
@@ -501,39 +337,6 @@ class CreateImageEditRequestBody(BaseModel):
|
|
|
501
337
|
user: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
502
338
|
r"""A unique identifier representing your end-user, which can help to monitor and detect abuse."""
|
|
503
339
|
|
|
504
|
-
name: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
505
|
-
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
506
|
-
|
|
507
|
-
fallbacks: Annotated[
|
|
508
|
-
Optional[List[CreateImageEditFallbacks]],
|
|
509
|
-
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
510
|
-
] = None
|
|
511
|
-
r"""Array of fallback models to use if primary model fails"""
|
|
512
|
-
|
|
513
|
-
retry: Annotated[
|
|
514
|
-
Optional[CreateImageEditRetry],
|
|
515
|
-
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
516
|
-
] = None
|
|
517
|
-
r"""Retry configuration for the request"""
|
|
518
|
-
|
|
519
|
-
cache: Annotated[
|
|
520
|
-
Optional[CreateImageEditCache],
|
|
521
|
-
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
522
|
-
] = None
|
|
523
|
-
r"""Cache configuration for the request."""
|
|
524
|
-
|
|
525
|
-
load_balancer: Annotated[
|
|
526
|
-
Optional[CreateImageEditLoadBalancer],
|
|
527
|
-
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
528
|
-
] = None
|
|
529
|
-
r"""Load balancer configuration for the request."""
|
|
530
|
-
|
|
531
|
-
timeout: Annotated[
|
|
532
|
-
Optional[CreateImageEditTimeout],
|
|
533
|
-
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
534
|
-
] = None
|
|
535
|
-
r"""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."""
|
|
536
|
-
|
|
537
340
|
orq: Annotated[
|
|
538
341
|
Optional[CreateImageEditOrq],
|
|
539
342
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -542,21 +345,7 @@ class CreateImageEditRequestBody(BaseModel):
|
|
|
542
345
|
@model_serializer(mode="wrap")
|
|
543
346
|
def serialize_model(self, handler):
|
|
544
347
|
optional_fields = set(
|
|
545
|
-
[
|
|
546
|
-
"image",
|
|
547
|
-
"n",
|
|
548
|
-
"size",
|
|
549
|
-
"quality",
|
|
550
|
-
"response_format",
|
|
551
|
-
"user",
|
|
552
|
-
"name",
|
|
553
|
-
"fallbacks",
|
|
554
|
-
"retry",
|
|
555
|
-
"cache",
|
|
556
|
-
"load_balancer",
|
|
557
|
-
"timeout",
|
|
558
|
-
"orq",
|
|
559
|
-
]
|
|
348
|
+
["image", "n", "size", "quality", "response_format", "user", "orq"]
|
|
560
349
|
)
|
|
561
350
|
nullable_fields = set(["n", "size", "quality"])
|
|
562
351
|
serialized = handler(self)
|