orq-ai-sdk 4.2.8__py3-none-any.whl → 4.2.9__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.9.dist-info}/METADATA +1 -1
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.9.dist-info}/RECORD +73 -73
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.9.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.9.dist-info}/top_level.txt +0 -0
|
@@ -1068,7 +1068,7 @@ class ResponseBodyCodeExecutionTool(BaseModel):
|
|
|
1068
1068
|
code_tool: ResponseBodyCodeTool
|
|
1069
1069
|
|
|
1070
1070
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1071
|
-
"
|
|
1071
|
+
"tool_01KFVN6EBGKCWGTAY1KTCC5MZE"
|
|
1072
1072
|
)
|
|
1073
1073
|
|
|
1074
1074
|
display_name: Optional[str] = None
|
|
@@ -1195,7 +1195,7 @@ class ResponseBodyTools(BaseModel):
|
|
|
1195
1195
|
|
|
1196
1196
|
schema_: Annotated[CreateToolResponseBodySchema, pydantic.Field(alias="schema")]
|
|
1197
1197
|
|
|
1198
|
-
id: Optional[str] = "
|
|
1198
|
+
id: Optional[str] = "01KFVN6EBFK92TAQJ5YPM3E515"
|
|
1199
1199
|
|
|
1200
1200
|
description: Optional[str] = None
|
|
1201
1201
|
|
|
@@ -1326,7 +1326,7 @@ class ResponseBodyMCPTool(BaseModel):
|
|
|
1326
1326
|
mcp: ResponseBodyMcp
|
|
1327
1327
|
|
|
1328
1328
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1329
|
-
"
|
|
1329
|
+
"tool_01KFVN6EBB3Q7BHSPVDVJEMPPX"
|
|
1330
1330
|
)
|
|
1331
1331
|
|
|
1332
1332
|
display_name: Optional[str] = None
|
|
@@ -1627,7 +1627,7 @@ class ResponseBodyHTTPTool(BaseModel):
|
|
|
1627
1627
|
http: CreateToolResponseBodyHTTP
|
|
1628
1628
|
|
|
1629
1629
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1630
|
-
"
|
|
1630
|
+
"tool_01KFVN6EB855HTD2DVEF62NY6J"
|
|
1631
1631
|
)
|
|
1632
1632
|
|
|
1633
1633
|
display_name: Optional[str] = None
|
|
@@ -1822,7 +1822,7 @@ class ResponseBodyJSONSchemaTool(BaseModel):
|
|
|
1822
1822
|
json_schema: ResponseBodyJSONSchema
|
|
1823
1823
|
|
|
1824
1824
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1825
|
-
"
|
|
1825
|
+
"tool_01KFVN6EB6NH66N7AJ85662CTE"
|
|
1826
1826
|
)
|
|
1827
1827
|
|
|
1828
1828
|
display_name: Optional[str] = None
|
|
@@ -2021,7 +2021,7 @@ class ResponseBodyFunctionTool(BaseModel):
|
|
|
2021
2021
|
function: CreateToolResponseBodyFunction
|
|
2022
2022
|
|
|
2023
2023
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
2024
|
-
"
|
|
2024
|
+
"tool_01KFVN6EB4YXFZWVTV33YRYQ7H"
|
|
2025
2025
|
)
|
|
2026
2026
|
|
|
2027
2027
|
display_name: Optional[str] = None
|
|
@@ -130,11 +130,11 @@ class CreateTranscriptionLoadBalancer1(BaseModel):
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
CreateTranscriptionLoadBalancerTypedDict = CreateTranscriptionLoadBalancer1TypedDict
|
|
133
|
-
r"""
|
|
133
|
+
r"""Load balancer configuration for the request."""
|
|
134
134
|
|
|
135
135
|
|
|
136
136
|
CreateTranscriptionLoadBalancer = CreateTranscriptionLoadBalancer1
|
|
137
|
-
r"""
|
|
137
|
+
r"""Load balancer configuration for the request."""
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
class CreateTranscriptionTimeoutTypedDict(TypedDict):
|
|
@@ -151,20 +151,144 @@ class CreateTranscriptionTimeout(BaseModel):
|
|
|
151
151
|
r"""Timeout value in milliseconds"""
|
|
152
152
|
|
|
153
153
|
|
|
154
|
+
class CreateTranscriptionRouterAudioTranscriptionsFallbacksTypedDict(TypedDict):
|
|
155
|
+
model: str
|
|
156
|
+
r"""Fallback model identifier"""
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class CreateTranscriptionRouterAudioTranscriptionsFallbacks(BaseModel):
|
|
160
|
+
model: str
|
|
161
|
+
r"""Fallback model identifier"""
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class CreateTranscriptionRouterAudioTranscriptionsRetryTypedDict(TypedDict):
|
|
165
|
+
r"""Retry configuration for the request"""
|
|
166
|
+
|
|
167
|
+
count: NotRequired[float]
|
|
168
|
+
r"""Number of retry attempts (1-5)"""
|
|
169
|
+
on_codes: NotRequired[List[float]]
|
|
170
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class CreateTranscriptionRouterAudioTranscriptionsRetry(BaseModel):
|
|
174
|
+
r"""Retry configuration for the request"""
|
|
175
|
+
|
|
176
|
+
count: Optional[float] = 3
|
|
177
|
+
r"""Number of retry attempts (1-5)"""
|
|
178
|
+
|
|
179
|
+
on_codes: Optional[List[float]] = None
|
|
180
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
181
|
+
|
|
182
|
+
@model_serializer(mode="wrap")
|
|
183
|
+
def serialize_model(self, handler):
|
|
184
|
+
optional_fields = set(["count", "on_codes"])
|
|
185
|
+
serialized = handler(self)
|
|
186
|
+
m = {}
|
|
187
|
+
|
|
188
|
+
for n, f in type(self).model_fields.items():
|
|
189
|
+
k = f.alias or n
|
|
190
|
+
val = serialized.get(k)
|
|
191
|
+
|
|
192
|
+
if val != UNSET_SENTINEL:
|
|
193
|
+
if val is not None or k not in optional_fields:
|
|
194
|
+
m[k] = val
|
|
195
|
+
|
|
196
|
+
return m
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
CreateTranscriptionLoadBalancerRouterAudioTranscriptionsType = Literal["weight_based",]
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class CreateTranscriptionLoadBalancerRouterAudioTranscriptionsModelsTypedDict(
|
|
203
|
+
TypedDict
|
|
204
|
+
):
|
|
205
|
+
model: str
|
|
206
|
+
r"""Model identifier for load balancing"""
|
|
207
|
+
weight: NotRequired[float]
|
|
208
|
+
r"""Weight assigned to this model for load balancing"""
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class CreateTranscriptionLoadBalancerRouterAudioTranscriptionsModels(BaseModel):
|
|
212
|
+
model: str
|
|
213
|
+
r"""Model identifier for load balancing"""
|
|
214
|
+
|
|
215
|
+
weight: Optional[float] = 0.5
|
|
216
|
+
r"""Weight assigned to this model for load balancing"""
|
|
217
|
+
|
|
218
|
+
@model_serializer(mode="wrap")
|
|
219
|
+
def serialize_model(self, handler):
|
|
220
|
+
optional_fields = set(["weight"])
|
|
221
|
+
serialized = handler(self)
|
|
222
|
+
m = {}
|
|
223
|
+
|
|
224
|
+
for n, f in type(self).model_fields.items():
|
|
225
|
+
k = f.alias or n
|
|
226
|
+
val = serialized.get(k)
|
|
227
|
+
|
|
228
|
+
if val != UNSET_SENTINEL:
|
|
229
|
+
if val is not None or k not in optional_fields:
|
|
230
|
+
m[k] = val
|
|
231
|
+
|
|
232
|
+
return m
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
class CreateTranscriptionLoadBalancerRouterAudioTranscriptions1TypedDict(TypedDict):
|
|
236
|
+
type: CreateTranscriptionLoadBalancerRouterAudioTranscriptionsType
|
|
237
|
+
models: List[
|
|
238
|
+
CreateTranscriptionLoadBalancerRouterAudioTranscriptionsModelsTypedDict
|
|
239
|
+
]
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class CreateTranscriptionLoadBalancerRouterAudioTranscriptions1(BaseModel):
|
|
243
|
+
type: CreateTranscriptionLoadBalancerRouterAudioTranscriptionsType
|
|
244
|
+
|
|
245
|
+
models: List[CreateTranscriptionLoadBalancerRouterAudioTranscriptionsModels]
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
CreateTranscriptionRouterAudioTranscriptionsLoadBalancerTypedDict = (
|
|
249
|
+
CreateTranscriptionLoadBalancerRouterAudioTranscriptions1TypedDict
|
|
250
|
+
)
|
|
251
|
+
r"""Array of models with weights for load balancing requests"""
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
CreateTranscriptionRouterAudioTranscriptionsLoadBalancer = (
|
|
255
|
+
CreateTranscriptionLoadBalancerRouterAudioTranscriptions1
|
|
256
|
+
)
|
|
257
|
+
r"""Array of models with weights for load balancing requests"""
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
class CreateTranscriptionRouterAudioTranscriptionsTimeoutTypedDict(TypedDict):
|
|
261
|
+
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."""
|
|
262
|
+
|
|
263
|
+
call_timeout: float
|
|
264
|
+
r"""Timeout value in milliseconds"""
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
class CreateTranscriptionRouterAudioTranscriptionsTimeout(BaseModel):
|
|
268
|
+
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."""
|
|
269
|
+
|
|
270
|
+
call_timeout: float
|
|
271
|
+
r"""Timeout value in milliseconds"""
|
|
272
|
+
|
|
273
|
+
|
|
154
274
|
class CreateTranscriptionOrqTypedDict(TypedDict):
|
|
155
275
|
name: NotRequired[str]
|
|
156
276
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
157
|
-
fallbacks: NotRequired[
|
|
277
|
+
fallbacks: NotRequired[
|
|
278
|
+
List[CreateTranscriptionRouterAudioTranscriptionsFallbacksTypedDict]
|
|
279
|
+
]
|
|
158
280
|
r"""Array of fallback models to use if primary model fails"""
|
|
159
|
-
retry: NotRequired[
|
|
281
|
+
retry: NotRequired[CreateTranscriptionRouterAudioTranscriptionsRetryTypedDict]
|
|
160
282
|
r"""Retry configuration for the request"""
|
|
161
283
|
identity: NotRequired[PublicIdentityTypedDict]
|
|
162
284
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
163
285
|
contact: NotRequired[PublicContactTypedDict]
|
|
164
286
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
165
|
-
load_balancer: NotRequired[
|
|
287
|
+
load_balancer: NotRequired[
|
|
288
|
+
CreateTranscriptionRouterAudioTranscriptionsLoadBalancerTypedDict
|
|
289
|
+
]
|
|
166
290
|
r"""Array of models with weights for load balancing requests"""
|
|
167
|
-
timeout: NotRequired[
|
|
291
|
+
timeout: NotRequired[CreateTranscriptionRouterAudioTranscriptionsTimeoutTypedDict]
|
|
168
292
|
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."""
|
|
169
293
|
|
|
170
294
|
|
|
@@ -172,10 +296,12 @@ class CreateTranscriptionOrq(BaseModel):
|
|
|
172
296
|
name: Optional[str] = None
|
|
173
297
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
174
298
|
|
|
175
|
-
fallbacks: Optional[List[
|
|
299
|
+
fallbacks: Optional[List[CreateTranscriptionRouterAudioTranscriptionsFallbacks]] = (
|
|
300
|
+
None
|
|
301
|
+
)
|
|
176
302
|
r"""Array of fallback models to use if primary model fails"""
|
|
177
303
|
|
|
178
|
-
retry: Optional[
|
|
304
|
+
retry: Optional[CreateTranscriptionRouterAudioTranscriptionsRetry] = None
|
|
179
305
|
r"""Retry configuration for the request"""
|
|
180
306
|
|
|
181
307
|
identity: Optional[PublicIdentity] = None
|
|
@@ -189,10 +315,12 @@ class CreateTranscriptionOrq(BaseModel):
|
|
|
189
315
|
] = None
|
|
190
316
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
191
317
|
|
|
192
|
-
load_balancer: Optional[
|
|
318
|
+
load_balancer: Optional[
|
|
319
|
+
CreateTranscriptionRouterAudioTranscriptionsLoadBalancer
|
|
320
|
+
] = None
|
|
193
321
|
r"""Array of models with weights for load balancing requests"""
|
|
194
322
|
|
|
195
|
-
timeout: Optional[
|
|
323
|
+
timeout: Optional[CreateTranscriptionRouterAudioTranscriptionsTimeout] = None
|
|
196
324
|
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."""
|
|
197
325
|
|
|
198
326
|
@model_serializer(mode="wrap")
|
|
@@ -287,6 +415,16 @@ class CreateTranscriptionRequestBodyTypedDict(TypedDict):
|
|
|
287
415
|
r"""The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency."""
|
|
288
416
|
timestamp_granularities: NotRequired[List[TimestampGranularities]]
|
|
289
417
|
r"""The timestamp granularities to populate for this transcription. response_format must be set to verbose_json to use timestamp granularities. Either or both of these options are supported: \"word\" or \"segment\". Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency."""
|
|
418
|
+
name: NotRequired[str]
|
|
419
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
420
|
+
fallbacks: NotRequired[List[CreateTranscriptionFallbacksTypedDict]]
|
|
421
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
422
|
+
retry: NotRequired[CreateTranscriptionRetryTypedDict]
|
|
423
|
+
r"""Retry configuration for the request"""
|
|
424
|
+
load_balancer: NotRequired[CreateTranscriptionLoadBalancerTypedDict]
|
|
425
|
+
r"""Load balancer configuration for the request."""
|
|
426
|
+
timeout: NotRequired[CreateTranscriptionTimeoutTypedDict]
|
|
427
|
+
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."""
|
|
290
428
|
orq: NotRequired[CreateTranscriptionOrqTypedDict]
|
|
291
429
|
file: NotRequired[CreateTranscriptionFileTypedDict]
|
|
292
430
|
r"""The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm."""
|
|
@@ -334,6 +472,33 @@ class CreateTranscriptionRequestBody(BaseModel):
|
|
|
334
472
|
] = None
|
|
335
473
|
r"""The timestamp granularities to populate for this transcription. response_format must be set to verbose_json to use timestamp granularities. Either or both of these options are supported: \"word\" or \"segment\". Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency."""
|
|
336
474
|
|
|
475
|
+
name: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
476
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
477
|
+
|
|
478
|
+
fallbacks: Annotated[
|
|
479
|
+
Optional[List[CreateTranscriptionFallbacks]],
|
|
480
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
481
|
+
] = None
|
|
482
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
483
|
+
|
|
484
|
+
retry: Annotated[
|
|
485
|
+
Optional[CreateTranscriptionRetry],
|
|
486
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
487
|
+
] = None
|
|
488
|
+
r"""Retry configuration for the request"""
|
|
489
|
+
|
|
490
|
+
load_balancer: Annotated[
|
|
491
|
+
Optional[CreateTranscriptionLoadBalancer],
|
|
492
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
493
|
+
] = None
|
|
494
|
+
r"""Load balancer configuration for the request."""
|
|
495
|
+
|
|
496
|
+
timeout: Annotated[
|
|
497
|
+
Optional[CreateTranscriptionTimeout],
|
|
498
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
499
|
+
] = None
|
|
500
|
+
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."""
|
|
501
|
+
|
|
337
502
|
orq: Annotated[
|
|
338
503
|
Optional[CreateTranscriptionOrq],
|
|
339
504
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -359,6 +524,11 @@ class CreateTranscriptionRequestBody(BaseModel):
|
|
|
359
524
|
"temperature",
|
|
360
525
|
"language",
|
|
361
526
|
"timestamp_granularities",
|
|
527
|
+
"name",
|
|
528
|
+
"fallbacks",
|
|
529
|
+
"retry",
|
|
530
|
+
"load_balancer",
|
|
531
|
+
"timeout",
|
|
362
532
|
"orq",
|
|
363
533
|
"file",
|
|
364
534
|
]
|
|
@@ -124,11 +124,11 @@ class CreateTranslationLoadBalancer1(BaseModel):
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
CreateTranslationLoadBalancerTypedDict = CreateTranslationLoadBalancer1TypedDict
|
|
127
|
-
r"""
|
|
127
|
+
r"""Load balancer configuration for the request."""
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
CreateTranslationLoadBalancer = CreateTranslationLoadBalancer1
|
|
131
|
-
r"""
|
|
131
|
+
r"""Load balancer configuration for the request."""
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
class CreateTranslationTimeoutTypedDict(TypedDict):
|
|
@@ -145,20 +145,140 @@ class CreateTranslationTimeout(BaseModel):
|
|
|
145
145
|
r"""Timeout value in milliseconds"""
|
|
146
146
|
|
|
147
147
|
|
|
148
|
+
class CreateTranslationRouterAudioTranslationsFallbacksTypedDict(TypedDict):
|
|
149
|
+
model: str
|
|
150
|
+
r"""Fallback model identifier"""
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class CreateTranslationRouterAudioTranslationsFallbacks(BaseModel):
|
|
154
|
+
model: str
|
|
155
|
+
r"""Fallback model identifier"""
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class CreateTranslationRouterAudioTranslationsRetryTypedDict(TypedDict):
|
|
159
|
+
r"""Retry configuration for the request"""
|
|
160
|
+
|
|
161
|
+
count: NotRequired[float]
|
|
162
|
+
r"""Number of retry attempts (1-5)"""
|
|
163
|
+
on_codes: NotRequired[List[float]]
|
|
164
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class CreateTranslationRouterAudioTranslationsRetry(BaseModel):
|
|
168
|
+
r"""Retry configuration for the request"""
|
|
169
|
+
|
|
170
|
+
count: Optional[float] = 3
|
|
171
|
+
r"""Number of retry attempts (1-5)"""
|
|
172
|
+
|
|
173
|
+
on_codes: Optional[List[float]] = None
|
|
174
|
+
r"""HTTP status codes that trigger retry logic"""
|
|
175
|
+
|
|
176
|
+
@model_serializer(mode="wrap")
|
|
177
|
+
def serialize_model(self, handler):
|
|
178
|
+
optional_fields = set(["count", "on_codes"])
|
|
179
|
+
serialized = handler(self)
|
|
180
|
+
m = {}
|
|
181
|
+
|
|
182
|
+
for n, f in type(self).model_fields.items():
|
|
183
|
+
k = f.alias or n
|
|
184
|
+
val = serialized.get(k)
|
|
185
|
+
|
|
186
|
+
if val != UNSET_SENTINEL:
|
|
187
|
+
if val is not None or k not in optional_fields:
|
|
188
|
+
m[k] = val
|
|
189
|
+
|
|
190
|
+
return m
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
CreateTranslationLoadBalancerRouterAudioTranslationsType = Literal["weight_based",]
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class CreateTranslationLoadBalancerRouterAudioTranslationsModelsTypedDict(TypedDict):
|
|
197
|
+
model: str
|
|
198
|
+
r"""Model identifier for load balancing"""
|
|
199
|
+
weight: NotRequired[float]
|
|
200
|
+
r"""Weight assigned to this model for load balancing"""
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class CreateTranslationLoadBalancerRouterAudioTranslationsModels(BaseModel):
|
|
204
|
+
model: str
|
|
205
|
+
r"""Model identifier for load balancing"""
|
|
206
|
+
|
|
207
|
+
weight: Optional[float] = 0.5
|
|
208
|
+
r"""Weight assigned to this model for load balancing"""
|
|
209
|
+
|
|
210
|
+
@model_serializer(mode="wrap")
|
|
211
|
+
def serialize_model(self, handler):
|
|
212
|
+
optional_fields = set(["weight"])
|
|
213
|
+
serialized = handler(self)
|
|
214
|
+
m = {}
|
|
215
|
+
|
|
216
|
+
for n, f in type(self).model_fields.items():
|
|
217
|
+
k = f.alias or n
|
|
218
|
+
val = serialized.get(k)
|
|
219
|
+
|
|
220
|
+
if val != UNSET_SENTINEL:
|
|
221
|
+
if val is not None or k not in optional_fields:
|
|
222
|
+
m[k] = val
|
|
223
|
+
|
|
224
|
+
return m
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class CreateTranslationLoadBalancerRouterAudioTranslations1TypedDict(TypedDict):
|
|
228
|
+
type: CreateTranslationLoadBalancerRouterAudioTranslationsType
|
|
229
|
+
models: List[CreateTranslationLoadBalancerRouterAudioTranslationsModelsTypedDict]
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class CreateTranslationLoadBalancerRouterAudioTranslations1(BaseModel):
|
|
233
|
+
type: CreateTranslationLoadBalancerRouterAudioTranslationsType
|
|
234
|
+
|
|
235
|
+
models: List[CreateTranslationLoadBalancerRouterAudioTranslationsModels]
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
CreateTranslationRouterAudioTranslationsLoadBalancerTypedDict = (
|
|
239
|
+
CreateTranslationLoadBalancerRouterAudioTranslations1TypedDict
|
|
240
|
+
)
|
|
241
|
+
r"""Array of models with weights for load balancing requests"""
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
CreateTranslationRouterAudioTranslationsLoadBalancer = (
|
|
245
|
+
CreateTranslationLoadBalancerRouterAudioTranslations1
|
|
246
|
+
)
|
|
247
|
+
r"""Array of models with weights for load balancing requests"""
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class CreateTranslationRouterAudioTranslationsTimeoutTypedDict(TypedDict):
|
|
251
|
+
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."""
|
|
252
|
+
|
|
253
|
+
call_timeout: float
|
|
254
|
+
r"""Timeout value in milliseconds"""
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class CreateTranslationRouterAudioTranslationsTimeout(BaseModel):
|
|
258
|
+
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."""
|
|
259
|
+
|
|
260
|
+
call_timeout: float
|
|
261
|
+
r"""Timeout value in milliseconds"""
|
|
262
|
+
|
|
263
|
+
|
|
148
264
|
class CreateTranslationOrqTypedDict(TypedDict):
|
|
149
265
|
name: NotRequired[str]
|
|
150
266
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
151
|
-
fallbacks: NotRequired[
|
|
267
|
+
fallbacks: NotRequired[
|
|
268
|
+
List[CreateTranslationRouterAudioTranslationsFallbacksTypedDict]
|
|
269
|
+
]
|
|
152
270
|
r"""Array of fallback models to use if primary model fails"""
|
|
153
|
-
retry: NotRequired[
|
|
271
|
+
retry: NotRequired[CreateTranslationRouterAudioTranslationsRetryTypedDict]
|
|
154
272
|
r"""Retry configuration for the request"""
|
|
155
273
|
identity: NotRequired[PublicIdentityTypedDict]
|
|
156
274
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
157
275
|
contact: NotRequired[PublicContactTypedDict]
|
|
158
276
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
159
|
-
load_balancer: NotRequired[
|
|
277
|
+
load_balancer: NotRequired[
|
|
278
|
+
CreateTranslationRouterAudioTranslationsLoadBalancerTypedDict
|
|
279
|
+
]
|
|
160
280
|
r"""Array of models with weights for load balancing requests"""
|
|
161
|
-
timeout: NotRequired[
|
|
281
|
+
timeout: NotRequired[CreateTranslationRouterAudioTranslationsTimeoutTypedDict]
|
|
162
282
|
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."""
|
|
163
283
|
|
|
164
284
|
|
|
@@ -166,10 +286,10 @@ class CreateTranslationOrq(BaseModel):
|
|
|
166
286
|
name: Optional[str] = None
|
|
167
287
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
168
288
|
|
|
169
|
-
fallbacks: Optional[List[
|
|
289
|
+
fallbacks: Optional[List[CreateTranslationRouterAudioTranslationsFallbacks]] = None
|
|
170
290
|
r"""Array of fallback models to use if primary model fails"""
|
|
171
291
|
|
|
172
|
-
retry: Optional[
|
|
292
|
+
retry: Optional[CreateTranslationRouterAudioTranslationsRetry] = None
|
|
173
293
|
r"""Retry configuration for the request"""
|
|
174
294
|
|
|
175
295
|
identity: Optional[PublicIdentity] = None
|
|
@@ -183,10 +303,10 @@ class CreateTranslationOrq(BaseModel):
|
|
|
183
303
|
] = None
|
|
184
304
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
185
305
|
|
|
186
|
-
load_balancer: Optional[
|
|
306
|
+
load_balancer: Optional[CreateTranslationRouterAudioTranslationsLoadBalancer] = None
|
|
187
307
|
r"""Array of models with weights for load balancing requests"""
|
|
188
308
|
|
|
189
|
-
timeout: Optional[
|
|
309
|
+
timeout: Optional[CreateTranslationRouterAudioTranslationsTimeout] = None
|
|
190
310
|
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."""
|
|
191
311
|
|
|
192
312
|
@model_serializer(mode="wrap")
|
|
@@ -277,6 +397,16 @@ class CreateTranslationRequestBodyTypedDict(TypedDict):
|
|
|
277
397
|
r"""The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word."""
|
|
278
398
|
temperature: NotRequired[float]
|
|
279
399
|
r"""The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit."""
|
|
400
|
+
name: NotRequired[str]
|
|
401
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
402
|
+
fallbacks: NotRequired[List[CreateTranslationFallbacksTypedDict]]
|
|
403
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
404
|
+
retry: NotRequired[CreateTranslationRetryTypedDict]
|
|
405
|
+
r"""Retry configuration for the request"""
|
|
406
|
+
load_balancer: NotRequired[CreateTranslationLoadBalancerTypedDict]
|
|
407
|
+
r"""Load balancer configuration for the request."""
|
|
408
|
+
timeout: NotRequired[CreateTranslationTimeoutTypedDict]
|
|
409
|
+
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."""
|
|
280
410
|
orq: NotRequired[CreateTranslationOrqTypedDict]
|
|
281
411
|
file: NotRequired[CreateTranslationFileTypedDict]
|
|
282
412
|
r"""The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm."""
|
|
@@ -316,6 +446,33 @@ class CreateTranslationRequestBody(BaseModel):
|
|
|
316
446
|
temperature: Annotated[Optional[float], FieldMetadata(multipart=True)] = None
|
|
317
447
|
r"""The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit."""
|
|
318
448
|
|
|
449
|
+
name: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
|
|
450
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
451
|
+
|
|
452
|
+
fallbacks: Annotated[
|
|
453
|
+
Optional[List[CreateTranslationFallbacks]],
|
|
454
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
455
|
+
] = None
|
|
456
|
+
r"""Array of fallback models to use if primary model fails"""
|
|
457
|
+
|
|
458
|
+
retry: Annotated[
|
|
459
|
+
Optional[CreateTranslationRetry],
|
|
460
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
461
|
+
] = None
|
|
462
|
+
r"""Retry configuration for the request"""
|
|
463
|
+
|
|
464
|
+
load_balancer: Annotated[
|
|
465
|
+
Optional[CreateTranslationLoadBalancer],
|
|
466
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
467
|
+
] = None
|
|
468
|
+
r"""Load balancer configuration for the request."""
|
|
469
|
+
|
|
470
|
+
timeout: Annotated[
|
|
471
|
+
Optional[CreateTranslationTimeout],
|
|
472
|
+
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
473
|
+
] = None
|
|
474
|
+
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."""
|
|
475
|
+
|
|
319
476
|
orq: Annotated[
|
|
320
477
|
Optional[CreateTranslationOrq],
|
|
321
478
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -339,6 +496,11 @@ class CreateTranslationRequestBody(BaseModel):
|
|
|
339
496
|
"num_speakers",
|
|
340
497
|
"timestamps_granularity",
|
|
341
498
|
"temperature",
|
|
499
|
+
"name",
|
|
500
|
+
"fallbacks",
|
|
501
|
+
"retry",
|
|
502
|
+
"load_balancer",
|
|
503
|
+
"timeout",
|
|
342
504
|
"orq",
|
|
343
505
|
"file",
|
|
344
506
|
]
|
orq_ai_sdk/models/filegetop.py
CHANGED
|
@@ -64,7 +64,7 @@ class FileGetResponseBody(BaseModel):
|
|
|
64
64
|
workspace_id: str
|
|
65
65
|
r"""The id of the resource"""
|
|
66
66
|
|
|
67
|
-
created: Optional[datetime] = parse_datetime("2026-01-
|
|
67
|
+
created: Optional[datetime] = parse_datetime("2026-01-25T22:42:54.997Z")
|
|
68
68
|
r"""The date and time the resource was created"""
|
|
69
69
|
|
|
70
70
|
@model_serializer(mode="wrap")
|
orq_ai_sdk/models/filelistop.py
CHANGED
|
@@ -96,7 +96,7 @@ class FileListData(BaseModel):
|
|
|
96
96
|
workspace_id: str
|
|
97
97
|
r"""The id of the resource"""
|
|
98
98
|
|
|
99
|
-
created: Optional[datetime] = parse_datetime("2026-01-
|
|
99
|
+
created: Optional[datetime] = parse_datetime("2026-01-25T22:42:54.997Z")
|
|
100
100
|
r"""The date and time the resource was created"""
|
|
101
101
|
|
|
102
102
|
@model_serializer(mode="wrap")
|
|
@@ -134,7 +134,7 @@ class FileUploadResponseBody(BaseModel):
|
|
|
134
134
|
workspace_id: str
|
|
135
135
|
r"""The id of the resource"""
|
|
136
136
|
|
|
137
|
-
created: Optional[datetime] = parse_datetime("2026-01-
|
|
137
|
+
created: Optional[datetime] = parse_datetime("2026-01-25T22:42:54.997Z")
|
|
138
138
|
r"""The date and time the resource was created"""
|
|
139
139
|
|
|
140
140
|
@model_serializer(mode="wrap")
|
|
@@ -186,7 +186,7 @@ class GenerateConversationNameResponseBody(BaseModel):
|
|
|
186
186
|
r"""Unix timestamp in milliseconds when the conversation was last modified."""
|
|
187
187
|
|
|
188
188
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
189
|
-
"
|
|
189
|
+
"conv_01kfvn6dzsggfs1e7necjy89a6"
|
|
190
190
|
)
|
|
191
191
|
r"""Unique conversation identifier with `conv_` prefix."""
|
|
192
192
|
|
|
@@ -1959,6 +1959,8 @@ GetAllPromptsPromptsMessages = Annotated[
|
|
|
1959
1959
|
class GetAllPromptsPromptFieldTypedDict(TypedDict):
|
|
1960
1960
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
1961
1961
|
|
|
1962
|
+
name: NotRequired[str]
|
|
1963
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
1962
1964
|
audio: NotRequired[Nullable[GetAllPromptsAudioTypedDict]]
|
|
1963
1965
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1964
1966
|
frequency_penalty: NotRequired[Nullable[float]]
|
|
@@ -2033,6 +2035,9 @@ class GetAllPromptsPromptFieldTypedDict(TypedDict):
|
|
|
2033
2035
|
class GetAllPromptsPromptField(BaseModel):
|
|
2034
2036
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
2035
2037
|
|
|
2038
|
+
name: Optional[str] = None
|
|
2039
|
+
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
2040
|
+
|
|
2036
2041
|
audio: OptionalNullable[GetAllPromptsAudio] = UNSET
|
|
2037
2042
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
2038
2043
|
|
|
@@ -2136,6 +2141,7 @@ class GetAllPromptsPromptField(BaseModel):
|
|
|
2136
2141
|
def serialize_model(self, handler):
|
|
2137
2142
|
optional_fields = set(
|
|
2138
2143
|
[
|
|
2144
|
+
"name",
|
|
2139
2145
|
"audio",
|
|
2140
2146
|
"frequency_penalty",
|
|
2141
2147
|
"max_tokens",
|
|
@@ -209,7 +209,7 @@ class DataCodeExecutionTool(BaseModel):
|
|
|
209
209
|
code_tool: DataCodeTool
|
|
210
210
|
|
|
211
211
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
212
|
-
"
|
|
212
|
+
"tool_01KFVN6EASWAKCK3HNKVR2N8HM"
|
|
213
213
|
)
|
|
214
214
|
|
|
215
215
|
display_name: Optional[str] = None
|
|
@@ -336,7 +336,7 @@ class DataTools(BaseModel):
|
|
|
336
336
|
|
|
337
337
|
schema_: Annotated[GetAllToolsDataSchema, pydantic.Field(alias="schema")]
|
|
338
338
|
|
|
339
|
-
id: Optional[str] = "
|
|
339
|
+
id: Optional[str] = "01KFVN6EAR86KRYZWRB71CV74T"
|
|
340
340
|
|
|
341
341
|
description: Optional[str] = None
|
|
342
342
|
|
|
@@ -467,7 +467,7 @@ class DataMCPTool(BaseModel):
|
|
|
467
467
|
mcp: DataMcp
|
|
468
468
|
|
|
469
469
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
470
|
-
"
|
|
470
|
+
"tool_01KFVN6EAQJM9TRBJK1N7T1WYZ"
|
|
471
471
|
)
|
|
472
472
|
|
|
473
473
|
display_name: Optional[str] = None
|
|
@@ -765,7 +765,7 @@ class DataHTTPTool(BaseModel):
|
|
|
765
765
|
http: GetAllToolsDataHTTP
|
|
766
766
|
|
|
767
767
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
768
|
-
"
|
|
768
|
+
"tool_01KFVN6EANG2JYESJ4JR79C0KT"
|
|
769
769
|
)
|
|
770
770
|
|
|
771
771
|
display_name: Optional[str] = None
|
|
@@ -960,7 +960,7 @@ class DataJSONSchemaTool(BaseModel):
|
|
|
960
960
|
json_schema: DataJSONSchema
|
|
961
961
|
|
|
962
962
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
963
|
-
"
|
|
963
|
+
"tool_01KFVN6EAMT2634AKV61FAVBGM"
|
|
964
964
|
)
|
|
965
965
|
|
|
966
966
|
display_name: Optional[str] = None
|
|
@@ -1159,7 +1159,7 @@ class DataFunctionTool(BaseModel):
|
|
|
1159
1159
|
function: GetAllToolsDataFunction
|
|
1160
1160
|
|
|
1161
1161
|
id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
|
|
1162
|
-
"
|
|
1162
|
+
"tool_01KFVN6EAJSGQNX4VS10RZRM6M"
|
|
1163
1163
|
)
|
|
1164
1164
|
|
|
1165
1165
|
display_name: Optional[str] = None
|