orq-ai-sdk 4.2.16__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.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/METADATA +202 -202
- {orq_ai_sdk-4.2.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/RECORD +75 -75
- {orq_ai_sdk-4.2.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/top_level.txt +0 -0
|
@@ -26,16 +26,6 @@ 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
|
-
|
|
39
29
|
class CreateImageVariationRetryTypedDict(TypedDict):
|
|
40
30
|
r"""Retry configuration for the request"""
|
|
41
31
|
|
|
@@ -71,150 +61,12 @@ class CreateImageVariationRetry(BaseModel):
|
|
|
71
61
|
return m
|
|
72
62
|
|
|
73
63
|
|
|
74
|
-
|
|
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):
|
|
64
|
+
class CreateImageVariationFallbacksTypedDict(TypedDict):
|
|
213
65
|
model: str
|
|
214
66
|
r"""Fallback model identifier"""
|
|
215
67
|
|
|
216
68
|
|
|
217
|
-
class
|
|
69
|
+
class CreateImageVariationFallbacks(BaseModel):
|
|
218
70
|
model: str
|
|
219
71
|
r"""Fallback model identifier"""
|
|
220
72
|
|
|
@@ -242,21 +94,21 @@ class CreateImageVariationPrompt(BaseModel):
|
|
|
242
94
|
r"""Version of the prompt to use (currently only \"latest\" supported)"""
|
|
243
95
|
|
|
244
96
|
|
|
245
|
-
|
|
97
|
+
CreateImageVariationType = Literal["exact_match",]
|
|
246
98
|
|
|
247
99
|
|
|
248
|
-
class
|
|
100
|
+
class CreateImageVariationCacheTypedDict(TypedDict):
|
|
249
101
|
r"""Cache configuration for the request."""
|
|
250
102
|
|
|
251
|
-
type:
|
|
103
|
+
type: CreateImageVariationType
|
|
252
104
|
ttl: NotRequired[float]
|
|
253
105
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
254
106
|
|
|
255
107
|
|
|
256
|
-
class
|
|
108
|
+
class CreateImageVariationCache(BaseModel):
|
|
257
109
|
r"""Cache configuration for the request."""
|
|
258
110
|
|
|
259
|
-
type:
|
|
111
|
+
type: CreateImageVariationType
|
|
260
112
|
|
|
261
113
|
ttl: Optional[float] = 1800
|
|
262
114
|
r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
|
|
@@ -278,17 +130,17 @@ class CreateImageVariationRouterImagesVariationsCache(BaseModel):
|
|
|
278
130
|
return m
|
|
279
131
|
|
|
280
132
|
|
|
281
|
-
|
|
133
|
+
CreateImageVariationLoadBalancerType = Literal["weight_based",]
|
|
282
134
|
|
|
283
135
|
|
|
284
|
-
class
|
|
136
|
+
class CreateImageVariationLoadBalancerModelsTypedDict(TypedDict):
|
|
285
137
|
model: str
|
|
286
138
|
r"""Model identifier for load balancing"""
|
|
287
139
|
weight: NotRequired[float]
|
|
288
140
|
r"""Weight assigned to this model for load balancing"""
|
|
289
141
|
|
|
290
142
|
|
|
291
|
-
class
|
|
143
|
+
class CreateImageVariationLoadBalancerModels(BaseModel):
|
|
292
144
|
model: str
|
|
293
145
|
r"""Model identifier for load balancing"""
|
|
294
146
|
|
|
@@ -312,37 +164,33 @@ class CreateImageVariationLoadBalancerRouterImagesVariationsModels(BaseModel):
|
|
|
312
164
|
return m
|
|
313
165
|
|
|
314
166
|
|
|
315
|
-
class
|
|
316
|
-
type:
|
|
317
|
-
models: List[
|
|
167
|
+
class CreateImageVariationLoadBalancer1TypedDict(TypedDict):
|
|
168
|
+
type: CreateImageVariationLoadBalancerType
|
|
169
|
+
models: List[CreateImageVariationLoadBalancerModelsTypedDict]
|
|
318
170
|
|
|
319
171
|
|
|
320
|
-
class
|
|
321
|
-
type:
|
|
172
|
+
class CreateImageVariationLoadBalancer1(BaseModel):
|
|
173
|
+
type: CreateImageVariationLoadBalancerType
|
|
322
174
|
|
|
323
|
-
models: List[
|
|
175
|
+
models: List[CreateImageVariationLoadBalancerModels]
|
|
324
176
|
|
|
325
177
|
|
|
326
|
-
|
|
327
|
-
CreateImageVariationLoadBalancerRouterImagesVariations1TypedDict
|
|
328
|
-
)
|
|
178
|
+
CreateImageVariationLoadBalancerTypedDict = CreateImageVariationLoadBalancer1TypedDict
|
|
329
179
|
r"""Array of models with weights for load balancing requests"""
|
|
330
180
|
|
|
331
181
|
|
|
332
|
-
|
|
333
|
-
CreateImageVariationLoadBalancerRouterImagesVariations1
|
|
334
|
-
)
|
|
182
|
+
CreateImageVariationLoadBalancer = CreateImageVariationLoadBalancer1
|
|
335
183
|
r"""Array of models with weights for load balancing requests"""
|
|
336
184
|
|
|
337
185
|
|
|
338
|
-
class
|
|
186
|
+
class CreateImageVariationTimeoutTypedDict(TypedDict):
|
|
339
187
|
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."""
|
|
340
188
|
|
|
341
189
|
call_timeout: float
|
|
342
190
|
r"""Timeout value in milliseconds"""
|
|
343
191
|
|
|
344
192
|
|
|
345
|
-
class
|
|
193
|
+
class CreateImageVariationTimeout(BaseModel):
|
|
346
194
|
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."""
|
|
347
195
|
|
|
348
196
|
call_timeout: float
|
|
@@ -352,11 +200,9 @@ class CreateImageVariationRouterImagesVariationsTimeout(BaseModel):
|
|
|
352
200
|
class CreateImageVariationOrqTypedDict(TypedDict):
|
|
353
201
|
name: NotRequired[str]
|
|
354
202
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
355
|
-
retry: NotRequired[
|
|
203
|
+
retry: NotRequired[CreateImageVariationRetryTypedDict]
|
|
356
204
|
r"""Retry configuration for the request"""
|
|
357
|
-
fallbacks: NotRequired[
|
|
358
|
-
List[CreateImageVariationRouterImagesVariationsFallbacksTypedDict]
|
|
359
|
-
]
|
|
205
|
+
fallbacks: NotRequired[List[CreateImageVariationFallbacksTypedDict]]
|
|
360
206
|
r"""Array of fallback models to use if primary model fails"""
|
|
361
207
|
prompt: NotRequired[CreateImageVariationPromptTypedDict]
|
|
362
208
|
r"""Prompt configuration for the request"""
|
|
@@ -364,13 +210,11 @@ class CreateImageVariationOrqTypedDict(TypedDict):
|
|
|
364
210
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
365
211
|
contact: NotRequired[PublicContactTypedDict]
|
|
366
212
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
367
|
-
cache: NotRequired[
|
|
213
|
+
cache: NotRequired[CreateImageVariationCacheTypedDict]
|
|
368
214
|
r"""Cache configuration for the request."""
|
|
369
|
-
load_balancer: NotRequired[
|
|
370
|
-
CreateImageVariationRouterImagesVariationsLoadBalancerTypedDict
|
|
371
|
-
]
|
|
215
|
+
load_balancer: NotRequired[CreateImageVariationLoadBalancerTypedDict]
|
|
372
216
|
r"""Array of models with weights for load balancing requests"""
|
|
373
|
-
timeout: NotRequired[
|
|
217
|
+
timeout: NotRequired[CreateImageVariationTimeoutTypedDict]
|
|
374
218
|
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."""
|
|
375
219
|
|
|
376
220
|
|
|
@@ -378,12 +222,10 @@ class CreateImageVariationOrq(BaseModel):
|
|
|
378
222
|
name: Optional[str] = None
|
|
379
223
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
380
224
|
|
|
381
|
-
retry: Optional[
|
|
225
|
+
retry: Optional[CreateImageVariationRetry] = None
|
|
382
226
|
r"""Retry configuration for the request"""
|
|
383
227
|
|
|
384
|
-
fallbacks: Optional[List[
|
|
385
|
-
None
|
|
386
|
-
)
|
|
228
|
+
fallbacks: Optional[List[CreateImageVariationFallbacks]] = None
|
|
387
229
|
r"""Array of fallback models to use if primary model fails"""
|
|
388
230
|
|
|
389
231
|
prompt: Optional[CreateImageVariationPrompt] = None
|
|
@@ -400,15 +242,13 @@ class CreateImageVariationOrq(BaseModel):
|
|
|
400
242
|
] = None
|
|
401
243
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
402
244
|
|
|
403
|
-
cache: Optional[
|
|
245
|
+
cache: Optional[CreateImageVariationCache] = None
|
|
404
246
|
r"""Cache configuration for the request."""
|
|
405
247
|
|
|
406
|
-
load_balancer: Optional[
|
|
407
|
-
None
|
|
408
|
-
)
|
|
248
|
+
load_balancer: Optional[CreateImageVariationLoadBalancer] = None
|
|
409
249
|
r"""Array of models with weights for load balancing requests"""
|
|
410
250
|
|
|
411
|
-
timeout: Optional[
|
|
251
|
+
timeout: Optional[CreateImageVariationTimeout] = None
|
|
412
252
|
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
253
|
|
|
414
254
|
@model_serializer(mode="wrap")
|
|
@@ -455,18 +295,6 @@ class CreateImageVariationRequestBodyTypedDict(TypedDict):
|
|
|
455
295
|
r"""The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`."""
|
|
456
296
|
user: NotRequired[str]
|
|
457
297
|
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."""
|
|
470
298
|
orq: NotRequired[CreateImageVariationOrqTypedDict]
|
|
471
299
|
|
|
472
300
|
|
|
@@ -493,39 +321,6 @@ class CreateImageVariationRequestBody(BaseModel):
|
|
|
493
321
|
user: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
494
322
|
r"""A unique identifier representing your end-user, which can help to monitor and detect abuse."""
|
|
495
323
|
|
|
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
|
-
|
|
529
324
|
orq: Annotated[
|
|
530
325
|
Optional[CreateImageVariationOrq],
|
|
531
326
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -533,22 +328,7 @@ class CreateImageVariationRequestBody(BaseModel):
|
|
|
533
328
|
|
|
534
329
|
@model_serializer(mode="wrap")
|
|
535
330
|
def serialize_model(self, handler):
|
|
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
|
-
)
|
|
331
|
+
optional_fields = set(["image", "n", "response_format", "size", "user", "orq"])
|
|
552
332
|
nullable_fields = set(["n"])
|
|
553
333
|
serialized = handler(self)
|
|
554
334
|
m = {}
|
|
@@ -1196,8 +1196,6 @@ 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."""
|
|
1201
1199
|
audio: NotRequired[Nullable[CreatePromptAudioTypedDict]]
|
|
1202
1200
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1203
1201
|
frequency_penalty: NotRequired[Nullable[float]]
|
|
@@ -1273,9 +1271,6 @@ class PromptInput(BaseModel):
|
|
|
1273
1271
|
model: Optional[str] = None
|
|
1274
1272
|
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."""
|
|
1275
1273
|
|
|
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
|
-
|
|
1279
1274
|
audio: OptionalNullable[CreatePromptAudio] = UNSET
|
|
1280
1275
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1281
1276
|
|
|
@@ -1372,7 +1367,6 @@ class PromptInput(BaseModel):
|
|
|
1372
1367
|
optional_fields = set(
|
|
1373
1368
|
[
|
|
1374
1369
|
"model",
|
|
1375
|
-
"name",
|
|
1376
1370
|
"audio",
|
|
1377
1371
|
"frequency_penalty",
|
|
1378
1372
|
"max_tokens",
|
|
@@ -3411,8 +3405,6 @@ CreatePromptPromptsResponseMessages = Annotated[
|
|
|
3411
3405
|
class PromptFieldTypedDict(TypedDict):
|
|
3412
3406
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
3413
3407
|
|
|
3414
|
-
name: NotRequired[str]
|
|
3415
|
-
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
3416
3408
|
audio: NotRequired[Nullable[CreatePromptPromptsAudioTypedDict]]
|
|
3417
3409
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
3418
3410
|
frequency_penalty: NotRequired[Nullable[float]]
|
|
@@ -3487,9 +3479,6 @@ class PromptFieldTypedDict(TypedDict):
|
|
|
3487
3479
|
class PromptField(BaseModel):
|
|
3488
3480
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
3489
3481
|
|
|
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
|
-
|
|
3493
3482
|
audio: OptionalNullable[CreatePromptPromptsAudio] = UNSET
|
|
3494
3483
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
3495
3484
|
|
|
@@ -3593,7 +3582,6 @@ class PromptField(BaseModel):
|
|
|
3593
3582
|
def serialize_model(self, handler):
|
|
3594
3583
|
optional_fields = set(
|
|
3595
3584
|
[
|
|
3596
|
-
"name",
|
|
3597
3585
|
"audio",
|
|
3598
3586
|
"frequency_penalty",
|
|
3599
3587
|
"max_tokens",
|