orq-ai-sdk 4.2.8__py3-none-any.whl → 4.2.10__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.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/METADATA +1 -1
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/RECORD +73 -73
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/top_level.txt +0 -0
|
@@ -26,6 +26,16 @@ Size = Literal[
|
|
|
26
26
|
r"""The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`."""
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
class CreateImageVariationFallbacksTypedDict(TypedDict):
|
|
30
|
+
model: str
|
|
31
|
+
r"""Fallback model identifier"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class CreateImageVariationFallbacks(BaseModel):
|
|
35
|
+
model: str
|
|
36
|
+
r"""Fallback model identifier"""
|
|
37
|
+
|
|
38
|
+
|
|
29
39
|
class CreateImageVariationRetryTypedDict(TypedDict):
|
|
30
40
|
r"""Retry configuration for the request"""
|
|
31
41
|
|
|
@@ -61,12 +71,150 @@ class CreateImageVariationRetry(BaseModel):
|
|
|
61
71
|
return m
|
|
62
72
|
|
|
63
73
|
|
|
64
|
-
|
|
74
|
+
CreateImageVariationType = Literal["exact_match",]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class CreateImageVariationCacheTypedDict(TypedDict):
|
|
78
|
+
r"""Cache configuration for the request."""
|
|
79
|
+
|
|
80
|
+
type: CreateImageVariationType
|
|
81
|
+
ttl: NotRequired[float]
|
|
82
|
+
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class CreateImageVariationCache(BaseModel):
|
|
86
|
+
r"""Cache configuration for the request."""
|
|
87
|
+
|
|
88
|
+
type: CreateImageVariationType
|
|
89
|
+
|
|
90
|
+
ttl: Optional[float] = 1800
|
|
91
|
+
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
92
|
+
|
|
93
|
+
@model_serializer(mode="wrap")
|
|
94
|
+
def serialize_model(self, handler):
|
|
95
|
+
optional_fields = set(["ttl"])
|
|
96
|
+
serialized = handler(self)
|
|
97
|
+
m = {}
|
|
98
|
+
|
|
99
|
+
for n, f in type(self).model_fields.items():
|
|
100
|
+
k = f.alias or n
|
|
101
|
+
val = serialized.get(k)
|
|
102
|
+
|
|
103
|
+
if val != UNSET_SENTINEL:
|
|
104
|
+
if val is not None or k not in optional_fields:
|
|
105
|
+
m[k] = val
|
|
106
|
+
|
|
107
|
+
return m
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
CreateImageVariationLoadBalancerType = Literal["weight_based",]
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class CreateImageVariationLoadBalancerModelsTypedDict(TypedDict):
|
|
114
|
+
model: str
|
|
115
|
+
r"""Model identifier for load balancing"""
|
|
116
|
+
weight: NotRequired[float]
|
|
117
|
+
r"""Weight assigned to this model for load balancing"""
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class CreateImageVariationLoadBalancerModels(BaseModel):
|
|
121
|
+
model: str
|
|
122
|
+
r"""Model identifier for load balancing"""
|
|
123
|
+
|
|
124
|
+
weight: Optional[float] = 0.5
|
|
125
|
+
r"""Weight assigned to this model for load balancing"""
|
|
126
|
+
|
|
127
|
+
@model_serializer(mode="wrap")
|
|
128
|
+
def serialize_model(self, handler):
|
|
129
|
+
optional_fields = set(["weight"])
|
|
130
|
+
serialized = handler(self)
|
|
131
|
+
m = {}
|
|
132
|
+
|
|
133
|
+
for n, f in type(self).model_fields.items():
|
|
134
|
+
k = f.alias or n
|
|
135
|
+
val = serialized.get(k)
|
|
136
|
+
|
|
137
|
+
if val != UNSET_SENTINEL:
|
|
138
|
+
if val is not None or k not in optional_fields:
|
|
139
|
+
m[k] = val
|
|
140
|
+
|
|
141
|
+
return m
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class CreateImageVariationLoadBalancer1TypedDict(TypedDict):
|
|
145
|
+
type: CreateImageVariationLoadBalancerType
|
|
146
|
+
models: List[CreateImageVariationLoadBalancerModelsTypedDict]
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class CreateImageVariationLoadBalancer1(BaseModel):
|
|
150
|
+
type: CreateImageVariationLoadBalancerType
|
|
151
|
+
|
|
152
|
+
models: List[CreateImageVariationLoadBalancerModels]
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
CreateImageVariationLoadBalancerTypedDict = CreateImageVariationLoadBalancer1TypedDict
|
|
156
|
+
r"""Load balancer configuration for the request."""
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
CreateImageVariationLoadBalancer = CreateImageVariationLoadBalancer1
|
|
160
|
+
r"""Load balancer configuration for the request."""
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class CreateImageVariationTimeoutTypedDict(TypedDict):
|
|
164
|
+
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."""
|
|
165
|
+
|
|
166
|
+
call_timeout: float
|
|
167
|
+
r"""Timeout value in milliseconds"""
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class CreateImageVariationTimeout(BaseModel):
|
|
171
|
+
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."""
|
|
172
|
+
|
|
173
|
+
call_timeout: float
|
|
174
|
+
r"""Timeout value in milliseconds"""
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class CreateImageVariationRouterImagesVariationsRetryTypedDict(TypedDict):
|
|
178
|
+
r"""Retry configuration for the request"""
|
|
179
|
+
|
|
180
|
+
count: NotRequired[float]
|
|
181
|
+
r"""Number of retry attempts (1-5)"""
|
|
182
|
+
on_codes: NotRequired[List[float]]
|
|
183
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class CreateImageVariationRouterImagesVariationsRetry(BaseModel):
|
|
187
|
+
r"""Retry configuration for the request"""
|
|
188
|
+
|
|
189
|
+
count: Optional[float] = 3
|
|
190
|
+
r"""Number of retry attempts (1-5)"""
|
|
191
|
+
|
|
192
|
+
on_codes: Optional[List[float]] = None
|
|
193
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
194
|
+
|
|
195
|
+
@model_serializer(mode="wrap")
|
|
196
|
+
def serialize_model(self, handler):
|
|
197
|
+
optional_fields = set(["count", "on_codes"])
|
|
198
|
+
serialized = handler(self)
|
|
199
|
+
m = {}
|
|
200
|
+
|
|
201
|
+
for n, f in type(self).model_fields.items():
|
|
202
|
+
k = f.alias or n
|
|
203
|
+
val = serialized.get(k)
|
|
204
|
+
|
|
205
|
+
if val != UNSET_SENTINEL:
|
|
206
|
+
if val is not None or k not in optional_fields:
|
|
207
|
+
m[k] = val
|
|
208
|
+
|
|
209
|
+
return m
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class CreateImageVariationRouterImagesVariationsFallbacksTypedDict(TypedDict):
|
|
65
213
|
model: str
|
|
66
214
|
r"""Fallback model identifier"""
|
|
67
215
|
|
|
68
216
|
|
|
69
|
-
class
|
|
217
|
+
class CreateImageVariationRouterImagesVariationsFallbacks(BaseModel):
|
|
70
218
|
model: str
|
|
71
219
|
r"""Fallback model identifier"""
|
|
72
220
|
|
|
@@ -94,21 +242,21 @@ class CreateImageVariationPrompt(BaseModel):
|
|
|
94
242
|
r"""Version of the prompt to use (currently only \"latest\" supported)"""
|
|
95
243
|
|
|
96
244
|
|
|
97
|
-
|
|
245
|
+
CreateImageVariationRouterImagesVariationsType = Literal["exact_match",]
|
|
98
246
|
|
|
99
247
|
|
|
100
|
-
class
|
|
248
|
+
class CreateImageVariationRouterImagesVariationsCacheTypedDict(TypedDict):
|
|
101
249
|
r"""Cache configuration for the request."""
|
|
102
250
|
|
|
103
|
-
type:
|
|
251
|
+
type: CreateImageVariationRouterImagesVariationsType
|
|
104
252
|
ttl: NotRequired[float]
|
|
105
253
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
106
254
|
|
|
107
255
|
|
|
108
|
-
class
|
|
256
|
+
class CreateImageVariationRouterImagesVariationsCache(BaseModel):
|
|
109
257
|
r"""Cache configuration for the request."""
|
|
110
258
|
|
|
111
|
-
type:
|
|
259
|
+
type: CreateImageVariationRouterImagesVariationsType
|
|
112
260
|
|
|
113
261
|
ttl: Optional[float] = 1800
|
|
114
262
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
@@ -130,17 +278,17 @@ class CreateImageVariationCache(BaseModel):
|
|
|
130
278
|
return m
|
|
131
279
|
|
|
132
280
|
|
|
133
|
-
|
|
281
|
+
CreateImageVariationLoadBalancerRouterImagesVariationsType = Literal["weight_based",]
|
|
134
282
|
|
|
135
283
|
|
|
136
|
-
class
|
|
284
|
+
class CreateImageVariationLoadBalancerRouterImagesVariationsModelsTypedDict(TypedDict):
|
|
137
285
|
model: str
|
|
138
286
|
r"""Model identifier for load balancing"""
|
|
139
287
|
weight: NotRequired[float]
|
|
140
288
|
r"""Weight assigned to this model for load balancing"""
|
|
141
289
|
|
|
142
290
|
|
|
143
|
-
class
|
|
291
|
+
class CreateImageVariationLoadBalancerRouterImagesVariationsModels(BaseModel):
|
|
144
292
|
model: str
|
|
145
293
|
r"""Model identifier for load balancing"""
|
|
146
294
|
|
|
@@ -164,33 +312,37 @@ class CreateImageVariationLoadBalancerModels(BaseModel):
|
|
|
164
312
|
return m
|
|
165
313
|
|
|
166
314
|
|
|
167
|
-
class
|
|
168
|
-
type:
|
|
169
|
-
models: List[
|
|
315
|
+
class CreateImageVariationLoadBalancerRouterImagesVariations1TypedDict(TypedDict):
|
|
316
|
+
type: CreateImageVariationLoadBalancerRouterImagesVariationsType
|
|
317
|
+
models: List[CreateImageVariationLoadBalancerRouterImagesVariationsModelsTypedDict]
|
|
170
318
|
|
|
171
319
|
|
|
172
|
-
class
|
|
173
|
-
type:
|
|
320
|
+
class CreateImageVariationLoadBalancerRouterImagesVariations1(BaseModel):
|
|
321
|
+
type: CreateImageVariationLoadBalancerRouterImagesVariationsType
|
|
174
322
|
|
|
175
|
-
models: List[
|
|
323
|
+
models: List[CreateImageVariationLoadBalancerRouterImagesVariationsModels]
|
|
176
324
|
|
|
177
325
|
|
|
178
|
-
|
|
326
|
+
CreateImageVariationRouterImagesVariationsLoadBalancerTypedDict = (
|
|
327
|
+
CreateImageVariationLoadBalancerRouterImagesVariations1TypedDict
|
|
328
|
+
)
|
|
179
329
|
r"""Array of models with weights for load balancing requests"""
|
|
180
330
|
|
|
181
331
|
|
|
182
|
-
|
|
332
|
+
CreateImageVariationRouterImagesVariationsLoadBalancer = (
|
|
333
|
+
CreateImageVariationLoadBalancerRouterImagesVariations1
|
|
334
|
+
)
|
|
183
335
|
r"""Array of models with weights for load balancing requests"""
|
|
184
336
|
|
|
185
337
|
|
|
186
|
-
class
|
|
338
|
+
class CreateImageVariationRouterImagesVariationsTimeoutTypedDict(TypedDict):
|
|
187
339
|
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."""
|
|
188
340
|
|
|
189
341
|
call_timeout: float
|
|
190
342
|
r"""Timeout value in milliseconds"""
|
|
191
343
|
|
|
192
344
|
|
|
193
|
-
class
|
|
345
|
+
class CreateImageVariationRouterImagesVariationsTimeout(BaseModel):
|
|
194
346
|
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."""
|
|
195
347
|
|
|
196
348
|
call_timeout: float
|
|
@@ -200,9 +352,11 @@ class CreateImageVariationTimeout(BaseModel):
|
|
|
200
352
|
class CreateImageVariationOrqTypedDict(TypedDict):
|
|
201
353
|
name: NotRequired[str]
|
|
202
354
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
203
|
-
retry: NotRequired[
|
|
355
|
+
retry: NotRequired[CreateImageVariationRouterImagesVariationsRetryTypedDict]
|
|
204
356
|
r"""Retry configuration for the request"""
|
|
205
|
-
fallbacks: NotRequired[
|
|
357
|
+
fallbacks: NotRequired[
|
|
358
|
+
List[CreateImageVariationRouterImagesVariationsFallbacksTypedDict]
|
|
359
|
+
]
|
|
206
360
|
r"""Array of fallback models to use if primary model fails"""
|
|
207
361
|
prompt: NotRequired[CreateImageVariationPromptTypedDict]
|
|
208
362
|
r"""Prompt configuration for the request"""
|
|
@@ -210,11 +364,13 @@ class CreateImageVariationOrqTypedDict(TypedDict):
|
|
|
210
364
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
211
365
|
contact: NotRequired[PublicContactTypedDict]
|
|
212
366
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
213
|
-
cache: NotRequired[
|
|
367
|
+
cache: NotRequired[CreateImageVariationRouterImagesVariationsCacheTypedDict]
|
|
214
368
|
r"""Cache configuration for the request."""
|
|
215
|
-
load_balancer: NotRequired[
|
|
369
|
+
load_balancer: NotRequired[
|
|
370
|
+
CreateImageVariationRouterImagesVariationsLoadBalancerTypedDict
|
|
371
|
+
]
|
|
216
372
|
r"""Array of models with weights for load balancing requests"""
|
|
217
|
-
timeout: NotRequired[
|
|
373
|
+
timeout: NotRequired[CreateImageVariationRouterImagesVariationsTimeoutTypedDict]
|
|
218
374
|
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."""
|
|
219
375
|
|
|
220
376
|
|
|
@@ -222,10 +378,12 @@ class CreateImageVariationOrq(BaseModel):
|
|
|
222
378
|
name: Optional[str] = None
|
|
223
379
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
224
380
|
|
|
225
|
-
retry: Optional[
|
|
381
|
+
retry: Optional[CreateImageVariationRouterImagesVariationsRetry] = None
|
|
226
382
|
r"""Retry configuration for the request"""
|
|
227
383
|
|
|
228
|
-
fallbacks: Optional[List[
|
|
384
|
+
fallbacks: Optional[List[CreateImageVariationRouterImagesVariationsFallbacks]] = (
|
|
385
|
+
None
|
|
386
|
+
)
|
|
229
387
|
r"""Array of fallback models to use if primary model fails"""
|
|
230
388
|
|
|
231
389
|
prompt: Optional[CreateImageVariationPrompt] = None
|
|
@@ -242,13 +400,15 @@ class CreateImageVariationOrq(BaseModel):
|
|
|
242
400
|
] = None
|
|
243
401
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
244
402
|
|
|
245
|
-
cache: Optional[
|
|
403
|
+
cache: Optional[CreateImageVariationRouterImagesVariationsCache] = None
|
|
246
404
|
r"""Cache configuration for the request."""
|
|
247
405
|
|
|
248
|
-
load_balancer: Optional[
|
|
406
|
+
load_balancer: Optional[CreateImageVariationRouterImagesVariationsLoadBalancer] = (
|
|
407
|
+
None
|
|
408
|
+
)
|
|
249
409
|
r"""Array of models with weights for load balancing requests"""
|
|
250
410
|
|
|
251
|
-
timeout: Optional[
|
|
411
|
+
timeout: Optional[CreateImageVariationRouterImagesVariationsTimeout] = None
|
|
252
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."""
|
|
253
413
|
|
|
254
414
|
@model_serializer(mode="wrap")
|
|
@@ -295,6 +455,18 @@ class CreateImageVariationRequestBodyTypedDict(TypedDict):
|
|
|
295
455
|
r"""The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`."""
|
|
296
456
|
user: NotRequired[str]
|
|
297
457
|
r"""A unique identifier representing your end-user, which can help to monitor and detect abuse."""
|
|
458
|
+
name: NotRequired[str]
|
|
459
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
460
|
+
fallbacks: NotRequired[List[CreateImageVariationFallbacksTypedDict]]
|
|
461
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
462
|
+
retry: NotRequired[CreateImageVariationRetryTypedDict]
|
|
463
|
+
r"""Retry configuration for the request"""
|
|
464
|
+
cache: NotRequired[CreateImageVariationCacheTypedDict]
|
|
465
|
+
r"""Cache configuration for the request."""
|
|
466
|
+
load_balancer: NotRequired[CreateImageVariationLoadBalancerTypedDict]
|
|
467
|
+
r"""Load balancer configuration for the request."""
|
|
468
|
+
timeout: NotRequired[CreateImageVariationTimeoutTypedDict]
|
|
469
|
+
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."""
|
|
298
470
|
orq: NotRequired[CreateImageVariationOrqTypedDict]
|
|
299
471
|
|
|
300
472
|
|
|
@@ -321,6 +493,39 @@ class CreateImageVariationRequestBody(BaseModel):
|
|
|
321
493
|
user: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
322
494
|
r"""A unique identifier representing your end-user, which can help to monitor and detect abuse."""
|
|
323
495
|
|
|
496
|
+
name: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
497
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
498
|
+
|
|
499
|
+
fallbacks: Annotated[
|
|
500
|
+
Optional[List[CreateImageVariationFallbacks]],
|
|
501
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
502
|
+
] = None
|
|
503
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
504
|
+
|
|
505
|
+
retry: Annotated[
|
|
506
|
+
Optional[CreateImageVariationRetry],
|
|
507
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
508
|
+
] = None
|
|
509
|
+
r"""Retry configuration for the request"""
|
|
510
|
+
|
|
511
|
+
cache: Annotated[
|
|
512
|
+
Optional[CreateImageVariationCache],
|
|
513
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
514
|
+
] = None
|
|
515
|
+
r"""Cache configuration for the request."""
|
|
516
|
+
|
|
517
|
+
load_balancer: Annotated[
|
|
518
|
+
Optional[CreateImageVariationLoadBalancer],
|
|
519
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
520
|
+
] = None
|
|
521
|
+
r"""Load balancer configuration for the request."""
|
|
522
|
+
|
|
523
|
+
timeout: Annotated[
|
|
524
|
+
Optional[CreateImageVariationTimeout],
|
|
525
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
526
|
+
] = None
|
|
527
|
+
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."""
|
|
528
|
+
|
|
324
529
|
orq: Annotated[
|
|
325
530
|
Optional[CreateImageVariationOrq],
|
|
326
531
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -328,7 +533,22 @@ class CreateImageVariationRequestBody(BaseModel):
|
|
|
328
533
|
|
|
329
534
|
@model_serializer(mode="wrap")
|
|
330
535
|
def serialize_model(self, handler):
|
|
331
|
-
optional_fields = set(
|
|
536
|
+
optional_fields = set(
|
|
537
|
+
[
|
|
538
|
+
"image",
|
|
539
|
+
"n",
|
|
540
|
+
"response_format",
|
|
541
|
+
"size",
|
|
542
|
+
"user",
|
|
543
|
+
"name",
|
|
544
|
+
"fallbacks",
|
|
545
|
+
"retry",
|
|
546
|
+
"cache",
|
|
547
|
+
"load_balancer",
|
|
548
|
+
"timeout",
|
|
549
|
+
"orq",
|
|
550
|
+
]
|
|
551
|
+
)
|
|
332
552
|
nullable_fields = set(["n"])
|
|
333
553
|
serialized = handler(self)
|
|
334
554
|
m = {}
|
|
@@ -1196,6 +1196,8 @@ class PromptInputTypedDict(TypedDict):
|
|
|
1196
1196
|
r"""Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content."""
|
|
1197
1197
|
model: NotRequired[str]
|
|
1198
1198
|
r"""Model ID used to generate the response, like `openai/gpt-4o` or `anthropic/claude-3-5-sonnet-20241022`. For private models, use format: `{workspaceKey}@{provider}/{model}`. The full list of models can be found at https://docs.orq.ai/docs/ai-gateway-supported-models. Only chat models are supported."""
|
|
1199
|
+
name: NotRequired[str]
|
|
1200
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
1199
1201
|
audio: NotRequired[Nullable[CreatePromptAudioTypedDict]]
|
|
1200
1202
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1201
1203
|
frequency_penalty: NotRequired[Nullable[float]]
|
|
@@ -1271,6 +1273,9 @@ class PromptInput(BaseModel):
|
|
|
1271
1273
|
model: Optional[str] = None
|
|
1272
1274
|
r"""Model ID used to generate the response, like `openai/gpt-4o` or `anthropic/claude-3-5-sonnet-20241022`. For private models, use format: `{workspaceKey}@{provider}/{model}`. The full list of models can be found at https://docs.orq.ai/docs/ai-gateway-supported-models. Only chat models are supported."""
|
|
1273
1275
|
|
|
1276
|
+
name: Optional[str] = None
|
|
1277
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
1278
|
+
|
|
1274
1279
|
audio: OptionalNullable[CreatePromptAudio] = UNSET
|
|
1275
1280
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1276
1281
|
|
|
@@ -1367,6 +1372,7 @@ class PromptInput(BaseModel):
|
|
|
1367
1372
|
optional_fields = set(
|
|
1368
1373
|
[
|
|
1369
1374
|
"model",
|
|
1375
|
+
"name",
|
|
1370
1376
|
"audio",
|
|
1371
1377
|
"frequency_penalty",
|
|
1372
1378
|
"max_tokens",
|
|
@@ -3405,6 +3411,8 @@ CreatePromptPromptsResponseMessages = Annotated[
|
|
|
3405
3411
|
class PromptFieldTypedDict(TypedDict):
|
|
3406
3412
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
3407
3413
|
|
|
3414
|
+
name: NotRequired[str]
|
|
3415
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
3408
3416
|
audio: NotRequired[Nullable[CreatePromptPromptsAudioTypedDict]]
|
|
3409
3417
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
3410
3418
|
frequency_penalty: NotRequired[Nullable[float]]
|
|
@@ -3479,6 +3487,9 @@ class PromptFieldTypedDict(TypedDict):
|
|
|
3479
3487
|
class PromptField(BaseModel):
|
|
3480
3488
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
3481
3489
|
|
|
3490
|
+
name: Optional[str] = None
|
|
3491
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
3492
|
+
|
|
3482
3493
|
audio: OptionalNullable[CreatePromptPromptsAudio] = UNSET
|
|
3483
3494
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
3484
3495
|
|
|
@@ -3582,6 +3593,7 @@ class PromptField(BaseModel):
|
|
|
3582
3593
|
def serialize_model(self, handler):
|
|
3583
3594
|
optional_fields = set(
|
|
3584
3595
|
[
|
|
3596
|
+
"name",
|
|
3585
3597
|
"audio",
|
|
3586
3598
|
"frequency_penalty",
|
|
3587
3599
|
"max_tokens",
|