orq-ai-sdk 4.3.0rc0__py3-none-any.whl → 4.3.0rc2__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/_version.py +2 -2
- orq_ai_sdk/completions.py +107 -1
- orq_ai_sdk/edits.py +107 -1
- orq_ai_sdk/embeddings.py +107 -1
- orq_ai_sdk/generations.py +99 -1
- orq_ai_sdk/models/__init__.py +405 -0
- orq_ai_sdk/models/conversationresponse.py +1 -1
- orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
- orq_ai_sdk/models/createagentrequestop.py +24 -0
- orq_ai_sdk/models/createchatcompletionop.py +6 -0
- orq_ai_sdk/models/createcompletionop.py +218 -30
- 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 +221 -26
- orq_ai_sdk/models/createevalop.py +14 -14
- orq_ai_sdk/models/createidentityop.py +1 -1
- orq_ai_sdk/models/createimageeditop.py +242 -31
- orq_ai_sdk/models/createimageop.py +210 -22
- orq_ai_sdk/models/createimagevariationop.py +251 -31
- orq_ai_sdk/models/createpromptop.py +12 -0
- orq_ai_sdk/models/creatererankop.py +218 -26
- orq_ai_sdk/models/createspeechop.py +174 -24
- orq_ai_sdk/models/createtoolop.py +6 -6
- orq_ai_sdk/models/createtranscriptionop.py +180 -10
- orq_ai_sdk/models/createtranslationop.py +172 -10
- 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 +6 -0
- orq_ai_sdk/models/getalltoolsop.py +6 -6
- orq_ai_sdk/models/getevalsop.py +14 -14
- orq_ai_sdk/models/getonepromptop.py +6 -0
- orq_ai_sdk/models/getpromptversionop.py +6 -0
- orq_ai_sdk/models/listagentsop.py +12 -0
- 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 +6 -0
- orq_ai_sdk/models/partdoneevent.py +1 -1
- orq_ai_sdk/models/reasoningpart.py +1 -1
- orq_ai_sdk/models/retrieveagentrequestop.py +12 -0
- 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 +13 -1
- orq_ai_sdk/models/streamrunagentop.py +13 -1
- orq_ai_sdk/models/updateagentop.py +24 -0
- 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 +12 -0
- orq_ai_sdk/models/updatetoolop.py +7 -7
- orq_ai_sdk/orq_completions.py +6 -0
- orq_ai_sdk/rerank.py +98 -0
- orq_ai_sdk/speech.py +83 -1
- orq_ai_sdk/transcriptions.py +90 -0
- orq_ai_sdk/translations.py +87 -1
- orq_ai_sdk/variations.py +111 -1
- {orq_ai_sdk-4.3.0rc0.dist-info → orq_ai_sdk-4.3.0rc2.dist-info}/METADATA +1 -1
- {orq_ai_sdk-4.3.0rc0.dist-info → orq_ai_sdk-4.3.0rc2.dist-info}/RECORD +73 -73
- {orq_ai_sdk-4.3.0rc0.dist-info → orq_ai_sdk-4.3.0rc2.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.3.0rc0.dist-info → orq_ai_sdk-4.3.0rc2.dist-info}/top_level.txt +0 -0
|
@@ -34,6 +34,16 @@ 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
|
+
|
|
37
47
|
class CreateImageEditRetryTypedDict(TypedDict):
|
|
38
48
|
r"""Retry configuration for the request"""
|
|
39
49
|
|
|
@@ -69,12 +79,150 @@ class CreateImageEditRetry(BaseModel):
|
|
|
69
79
|
return m
|
|
70
80
|
|
|
71
81
|
|
|
72
|
-
|
|
82
|
+
CreateImageEditType = Literal["exact_match",]
|
|
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):
|
|
73
221
|
model: str
|
|
74
222
|
r"""Fallback model identifier"""
|
|
75
223
|
|
|
76
224
|
|
|
77
|
-
class
|
|
225
|
+
class CreateImageEditRouterImagesEditsFallbacks(BaseModel):
|
|
78
226
|
model: str
|
|
79
227
|
r"""Fallback model identifier"""
|
|
80
228
|
|
|
@@ -102,21 +250,21 @@ class CreateImageEditPrompt(BaseModel):
|
|
|
102
250
|
r"""Version of the prompt to use (currently only \"latest\" supported)"""
|
|
103
251
|
|
|
104
252
|
|
|
105
|
-
|
|
253
|
+
CreateImageEditRouterImagesEditsType = Literal["exact_match",]
|
|
106
254
|
|
|
107
255
|
|
|
108
|
-
class
|
|
256
|
+
class CreateImageEditRouterImagesEditsCacheTypedDict(TypedDict):
|
|
109
257
|
r"""Cache configuration for the request."""
|
|
110
258
|
|
|
111
|
-
type:
|
|
259
|
+
type: CreateImageEditRouterImagesEditsType
|
|
112
260
|
ttl: NotRequired[float]
|
|
113
261
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
114
262
|
|
|
115
263
|
|
|
116
|
-
class
|
|
264
|
+
class CreateImageEditRouterImagesEditsCache(BaseModel):
|
|
117
265
|
r"""Cache configuration for the request."""
|
|
118
266
|
|
|
119
|
-
type:
|
|
267
|
+
type: CreateImageEditRouterImagesEditsType
|
|
120
268
|
|
|
121
269
|
ttl: Optional[float] = 1800
|
|
122
270
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
@@ -138,17 +286,17 @@ class CreateImageEditCache(BaseModel):
|
|
|
138
286
|
return m
|
|
139
287
|
|
|
140
288
|
|
|
141
|
-
|
|
289
|
+
CreateImageEditLoadBalancerRouterImagesEditsType = Literal["weight_based",]
|
|
142
290
|
|
|
143
291
|
|
|
144
|
-
class
|
|
292
|
+
class CreateImageEditLoadBalancerRouterImagesEditsModelsTypedDict(TypedDict):
|
|
145
293
|
model: str
|
|
146
294
|
r"""Model identifier for load balancing"""
|
|
147
295
|
weight: NotRequired[float]
|
|
148
296
|
r"""Weight assigned to this model for load balancing"""
|
|
149
297
|
|
|
150
298
|
|
|
151
|
-
class
|
|
299
|
+
class CreateImageEditLoadBalancerRouterImagesEditsModels(BaseModel):
|
|
152
300
|
model: str
|
|
153
301
|
r"""Model identifier for load balancing"""
|
|
154
302
|
|
|
@@ -172,33 +320,37 @@ class CreateImageEditLoadBalancerModels(BaseModel):
|
|
|
172
320
|
return m
|
|
173
321
|
|
|
174
322
|
|
|
175
|
-
class
|
|
176
|
-
type:
|
|
177
|
-
models: List[
|
|
323
|
+
class CreateImageEditLoadBalancerRouterImagesEdits1TypedDict(TypedDict):
|
|
324
|
+
type: CreateImageEditLoadBalancerRouterImagesEditsType
|
|
325
|
+
models: List[CreateImageEditLoadBalancerRouterImagesEditsModelsTypedDict]
|
|
178
326
|
|
|
179
327
|
|
|
180
|
-
class
|
|
181
|
-
type:
|
|
328
|
+
class CreateImageEditLoadBalancerRouterImagesEdits1(BaseModel):
|
|
329
|
+
type: CreateImageEditLoadBalancerRouterImagesEditsType
|
|
182
330
|
|
|
183
|
-
models: List[
|
|
331
|
+
models: List[CreateImageEditLoadBalancerRouterImagesEditsModels]
|
|
184
332
|
|
|
185
333
|
|
|
186
|
-
|
|
334
|
+
CreateImageEditRouterImagesEditsLoadBalancerTypedDict = (
|
|
335
|
+
CreateImageEditLoadBalancerRouterImagesEdits1TypedDict
|
|
336
|
+
)
|
|
187
337
|
r"""Array of models with weights for load balancing requests"""
|
|
188
338
|
|
|
189
339
|
|
|
190
|
-
|
|
340
|
+
CreateImageEditRouterImagesEditsLoadBalancer = (
|
|
341
|
+
CreateImageEditLoadBalancerRouterImagesEdits1
|
|
342
|
+
)
|
|
191
343
|
r"""Array of models with weights for load balancing requests"""
|
|
192
344
|
|
|
193
345
|
|
|
194
|
-
class
|
|
346
|
+
class CreateImageEditRouterImagesEditsTimeoutTypedDict(TypedDict):
|
|
195
347
|
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."""
|
|
196
348
|
|
|
197
349
|
call_timeout: float
|
|
198
350
|
r"""Timeout value in milliseconds"""
|
|
199
351
|
|
|
200
352
|
|
|
201
|
-
class
|
|
353
|
+
class CreateImageEditRouterImagesEditsTimeout(BaseModel):
|
|
202
354
|
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."""
|
|
203
355
|
|
|
204
356
|
call_timeout: float
|
|
@@ -208,9 +360,9 @@ class CreateImageEditTimeout(BaseModel):
|
|
|
208
360
|
class CreateImageEditOrqTypedDict(TypedDict):
|
|
209
361
|
name: NotRequired[str]
|
|
210
362
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
211
|
-
retry: NotRequired[
|
|
363
|
+
retry: NotRequired[CreateImageEditRouterImagesEditsRetryTypedDict]
|
|
212
364
|
r"""Retry configuration for the request"""
|
|
213
|
-
fallbacks: NotRequired[List[
|
|
365
|
+
fallbacks: NotRequired[List[CreateImageEditRouterImagesEditsFallbacksTypedDict]]
|
|
214
366
|
r"""Array of fallback models to use if primary model fails"""
|
|
215
367
|
prompt: NotRequired[CreateImageEditPromptTypedDict]
|
|
216
368
|
r"""Prompt configuration for the request"""
|
|
@@ -218,11 +370,11 @@ class CreateImageEditOrqTypedDict(TypedDict):
|
|
|
218
370
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
219
371
|
contact: NotRequired[PublicContactTypedDict]
|
|
220
372
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
221
|
-
cache: NotRequired[
|
|
373
|
+
cache: NotRequired[CreateImageEditRouterImagesEditsCacheTypedDict]
|
|
222
374
|
r"""Cache configuration for the request."""
|
|
223
|
-
load_balancer: NotRequired[
|
|
375
|
+
load_balancer: NotRequired[CreateImageEditRouterImagesEditsLoadBalancerTypedDict]
|
|
224
376
|
r"""Array of models with weights for load balancing requests"""
|
|
225
|
-
timeout: NotRequired[
|
|
377
|
+
timeout: NotRequired[CreateImageEditRouterImagesEditsTimeoutTypedDict]
|
|
226
378
|
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."""
|
|
227
379
|
|
|
228
380
|
|
|
@@ -230,10 +382,10 @@ class CreateImageEditOrq(BaseModel):
|
|
|
230
382
|
name: Optional[str] = None
|
|
231
383
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
232
384
|
|
|
233
|
-
retry: Optional[
|
|
385
|
+
retry: Optional[CreateImageEditRouterImagesEditsRetry] = None
|
|
234
386
|
r"""Retry configuration for the request"""
|
|
235
387
|
|
|
236
|
-
fallbacks: Optional[List[
|
|
388
|
+
fallbacks: Optional[List[CreateImageEditRouterImagesEditsFallbacks]] = None
|
|
237
389
|
r"""Array of fallback models to use if primary model fails"""
|
|
238
390
|
|
|
239
391
|
prompt: Optional[CreateImageEditPrompt] = None
|
|
@@ -250,13 +402,13 @@ class CreateImageEditOrq(BaseModel):
|
|
|
250
402
|
] = None
|
|
251
403
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
252
404
|
|
|
253
|
-
cache: Optional[
|
|
405
|
+
cache: Optional[CreateImageEditRouterImagesEditsCache] = None
|
|
254
406
|
r"""Cache configuration for the request."""
|
|
255
407
|
|
|
256
|
-
load_balancer: Optional[
|
|
408
|
+
load_balancer: Optional[CreateImageEditRouterImagesEditsLoadBalancer] = None
|
|
257
409
|
r"""Array of models with weights for load balancing requests"""
|
|
258
410
|
|
|
259
|
-
timeout: Optional[
|
|
411
|
+
timeout: Optional[CreateImageEditRouterImagesEditsTimeout] = None
|
|
260
412
|
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."""
|
|
261
413
|
|
|
262
414
|
@model_serializer(mode="wrap")
|
|
@@ -305,6 +457,18 @@ class CreateImageEditRequestBodyTypedDict(TypedDict):
|
|
|
305
457
|
r"""The format in which the generated images are returned. Some of the models only return the image in base64 format."""
|
|
306
458
|
user: NotRequired[str]
|
|
307
459
|
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."""
|
|
308
472
|
orq: NotRequired[CreateImageEditOrqTypedDict]
|
|
309
473
|
|
|
310
474
|
|
|
@@ -337,6 +501,39 @@ class CreateImageEditRequestBody(BaseModel):
|
|
|
337
501
|
user: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
338
502
|
r"""A unique identifier representing your end-user, which can help to monitor and detect abuse."""
|
|
339
503
|
|
|
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
|
+
|
|
340
537
|
orq: Annotated[
|
|
341
538
|
Optional[CreateImageEditOrq],
|
|
342
539
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -345,7 +542,21 @@ class CreateImageEditRequestBody(BaseModel):
|
|
|
345
542
|
@model_serializer(mode="wrap")
|
|
346
543
|
def serialize_model(self, handler):
|
|
347
544
|
optional_fields = set(
|
|
348
|
-
[
|
|
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
|
+
]
|
|
349
560
|
)
|
|
350
561
|
nullable_fields = set(["n", "size", "quality"])
|
|
351
562
|
serialized = handler(self)
|