orq-ai-sdk 4.2.17__py3-none-any.whl → 4.3.0rc0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orq_ai_sdk/_hooks/globalhook.py +1 -0
- orq_ai_sdk/_version.py +3 -3
- orq_ai_sdk/agents.py +186 -186
- orq_ai_sdk/completions.py +1 -107
- orq_ai_sdk/edits.py +1 -107
- orq_ai_sdk/embeddings.py +1 -107
- orq_ai_sdk/generations.py +1 -99
- orq_ai_sdk/models/__init__.py +0 -405
- orq_ai_sdk/models/conversationresponse.py +1 -1
- orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
- orq_ai_sdk/models/createagentrequestop.py +0 -24
- orq_ai_sdk/models/createchatcompletionop.py +0 -6
- orq_ai_sdk/models/createcompletionop.py +30 -218
- orq_ai_sdk/models/createcontactop.py +1 -1
- orq_ai_sdk/models/createconversationop.py +1 -1
- orq_ai_sdk/models/createconversationresponseop.py +2 -2
- orq_ai_sdk/models/createdatasetitemop.py +4 -4
- orq_ai_sdk/models/createdatasetop.py +1 -1
- orq_ai_sdk/models/createdatasourceop.py +1 -1
- orq_ai_sdk/models/createembeddingop.py +26 -221
- orq_ai_sdk/models/createevalop.py +14 -14
- orq_ai_sdk/models/createidentityop.py +1 -1
- orq_ai_sdk/models/createimageeditop.py +31 -242
- orq_ai_sdk/models/createimageop.py +22 -210
- orq_ai_sdk/models/createimagevariationop.py +31 -251
- orq_ai_sdk/models/createpromptop.py +0 -12
- orq_ai_sdk/models/creatererankop.py +26 -218
- orq_ai_sdk/models/createspeechop.py +24 -174
- orq_ai_sdk/models/createtoolop.py +6 -6
- orq_ai_sdk/models/createtranscriptionop.py +10 -180
- orq_ai_sdk/models/createtranslationop.py +10 -172
- orq_ai_sdk/models/filegetop.py +1 -1
- orq_ai_sdk/models/filelistop.py +1 -1
- orq_ai_sdk/models/fileuploadop.py +1 -1
- orq_ai_sdk/models/generateconversationnameop.py +1 -1
- orq_ai_sdk/models/getallpromptsop.py +0 -6
- orq_ai_sdk/models/getalltoolsop.py +6 -6
- orq_ai_sdk/models/getevalsop.py +14 -14
- orq_ai_sdk/models/getonepromptop.py +0 -6
- orq_ai_sdk/models/getpromptversionop.py +0 -6
- orq_ai_sdk/models/listagentsop.py +0 -12
- orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
- orq_ai_sdk/models/listdatasetsop.py +1 -1
- orq_ai_sdk/models/listdatasourcesop.py +1 -1
- orq_ai_sdk/models/listidentitiesop.py +1 -1
- orq_ai_sdk/models/listpromptversionsop.py +0 -6
- orq_ai_sdk/models/partdoneevent.py +1 -1
- orq_ai_sdk/models/reasoningpart.py +1 -1
- orq_ai_sdk/models/retrieveagentrequestop.py +0 -12
- orq_ai_sdk/models/retrievedatapointop.py +4 -4
- orq_ai_sdk/models/retrievedatasetop.py +1 -1
- orq_ai_sdk/models/retrievedatasourceop.py +1 -1
- orq_ai_sdk/models/retrieveidentityop.py +1 -1
- orq_ai_sdk/models/retrievetoolop.py +6 -6
- orq_ai_sdk/models/runagentop.py +1 -13
- orq_ai_sdk/models/streamrunagentop.py +1 -13
- orq_ai_sdk/models/updateagentop.py +0 -24
- orq_ai_sdk/models/updateconversationop.py +1 -1
- orq_ai_sdk/models/updatedatapointop.py +4 -4
- orq_ai_sdk/models/updatedatasetop.py +1 -1
- orq_ai_sdk/models/updatedatasourceop.py +1 -1
- orq_ai_sdk/models/updateevalop.py +14 -14
- orq_ai_sdk/models/updateidentityop.py +1 -1
- orq_ai_sdk/models/updatepromptop.py +0 -12
- orq_ai_sdk/models/updatetoolop.py +7 -7
- orq_ai_sdk/orq_completions.py +0 -6
- orq_ai_sdk/rerank.py +0 -98
- orq_ai_sdk/speech.py +1 -83
- orq_ai_sdk/transcriptions.py +0 -90
- orq_ai_sdk/translations.py +1 -87
- orq_ai_sdk/variations.py +1 -111
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/METADATA +202 -202
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/RECORD +75 -75
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.17.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/top_level.txt +0 -0
|
@@ -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_01KFS4380YDJJB8SPVWNXRGZ1T"
|
|
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] = "01KFS4380WSAAS39JZPMCD03ZM"
|
|
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_01KFS4380REZ1YRYEJ7BD66YWZ"
|
|
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_01KFS4380NN7Y8RWZ54YENCDEP"
|
|
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_01KFS4380KQ9V3JZ08VJG4FB87"
|
|
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_01KFS4380HNCK76RSC0YP5YVE9"
|
|
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"""Array of models with weights for load balancing requests"""
|
|
134
134
|
|
|
135
135
|
|
|
136
136
|
CreateTranscriptionLoadBalancer = CreateTranscriptionLoadBalancer1
|
|
137
|
-
r"""
|
|
137
|
+
r"""Array of models with weights for load balancing requests"""
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
class CreateTranscriptionTimeoutTypedDict(TypedDict):
|
|
@@ -151,144 +151,20 @@ 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
|
-
|
|
274
154
|
class CreateTranscriptionOrqTypedDict(TypedDict):
|
|
275
155
|
name: NotRequired[str]
|
|
276
156
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
277
|
-
fallbacks: NotRequired[
|
|
278
|
-
List[CreateTranscriptionRouterAudioTranscriptionsFallbacksTypedDict]
|
|
279
|
-
]
|
|
157
|
+
fallbacks: NotRequired[List[CreateTranscriptionFallbacksTypedDict]]
|
|
280
158
|
r"""Array of fallback models to use if primary model fails"""
|
|
281
|
-
retry: NotRequired[
|
|
159
|
+
retry: NotRequired[CreateTranscriptionRetryTypedDict]
|
|
282
160
|
r"""Retry configuration for the request"""
|
|
283
161
|
identity: NotRequired[PublicIdentityTypedDict]
|
|
284
162
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
285
163
|
contact: NotRequired[PublicContactTypedDict]
|
|
286
164
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
287
|
-
load_balancer: NotRequired[
|
|
288
|
-
CreateTranscriptionRouterAudioTranscriptionsLoadBalancerTypedDict
|
|
289
|
-
]
|
|
165
|
+
load_balancer: NotRequired[CreateTranscriptionLoadBalancerTypedDict]
|
|
290
166
|
r"""Array of models with weights for load balancing requests"""
|
|
291
|
-
timeout: NotRequired[
|
|
167
|
+
timeout: NotRequired[CreateTranscriptionTimeoutTypedDict]
|
|
292
168
|
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."""
|
|
293
169
|
|
|
294
170
|
|
|
@@ -296,12 +172,10 @@ class CreateTranscriptionOrq(BaseModel):
|
|
|
296
172
|
name: Optional[str] = None
|
|
297
173
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
298
174
|
|
|
299
|
-
fallbacks: Optional[List[
|
|
300
|
-
None
|
|
301
|
-
)
|
|
175
|
+
fallbacks: Optional[List[CreateTranscriptionFallbacks]] = None
|
|
302
176
|
r"""Array of fallback models to use if primary model fails"""
|
|
303
177
|
|
|
304
|
-
retry: Optional[
|
|
178
|
+
retry: Optional[CreateTranscriptionRetry] = None
|
|
305
179
|
r"""Retry configuration for the request"""
|
|
306
180
|
|
|
307
181
|
identity: Optional[PublicIdentity] = None
|
|
@@ -315,12 +189,10 @@ class CreateTranscriptionOrq(BaseModel):
|
|
|
315
189
|
] = None
|
|
316
190
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
317
191
|
|
|
318
|
-
load_balancer: Optional[
|
|
319
|
-
CreateTranscriptionRouterAudioTranscriptionsLoadBalancer
|
|
320
|
-
] = None
|
|
192
|
+
load_balancer: Optional[CreateTranscriptionLoadBalancer] = None
|
|
321
193
|
r"""Array of models with weights for load balancing requests"""
|
|
322
194
|
|
|
323
|
-
timeout: Optional[
|
|
195
|
+
timeout: Optional[CreateTranscriptionTimeout] = None
|
|
324
196
|
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."""
|
|
325
197
|
|
|
326
198
|
@model_serializer(mode="wrap")
|
|
@@ -415,16 +287,6 @@ class CreateTranscriptionRequestBodyTypedDict(TypedDict):
|
|
|
415
287
|
r"""The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency."""
|
|
416
288
|
timestamp_granularities: NotRequired[List[TimestampGranularities]]
|
|
417
289
|
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."""
|
|
428
290
|
orq: NotRequired[CreateTranscriptionOrqTypedDict]
|
|
429
291
|
file: NotRequired[CreateTranscriptionFileTypedDict]
|
|
430
292
|
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."""
|
|
@@ -472,33 +334,6 @@ class CreateTranscriptionRequestBody(BaseModel):
|
|
|
472
334
|
] = None
|
|
473
335
|
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."""
|
|
474
336
|
|
|
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
|
-
|
|
502
337
|
orq: Annotated[
|
|
503
338
|
Optional[CreateTranscriptionOrq],
|
|
504
339
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -524,11 +359,6 @@ class CreateTranscriptionRequestBody(BaseModel):
|
|
|
524
359
|
"temperature",
|
|
525
360
|
"language",
|
|
526
361
|
"timestamp_granularities",
|
|
527
|
-
"name",
|
|
528
|
-
"fallbacks",
|
|
529
|
-
"retry",
|
|
530
|
-
"load_balancer",
|
|
531
|
-
"timeout",
|
|
532
362
|
"orq",
|
|
533
363
|
"file",
|
|
534
364
|
]
|
|
@@ -124,11 +124,11 @@ class CreateTranslationLoadBalancer1(BaseModel):
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
CreateTranslationLoadBalancerTypedDict = CreateTranslationLoadBalancer1TypedDict
|
|
127
|
-
r"""
|
|
127
|
+
r"""Array of models with weights for load balancing requests"""
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
CreateTranslationLoadBalancer = CreateTranslationLoadBalancer1
|
|
131
|
-
r"""
|
|
131
|
+
r"""Array of models with weights for load balancing requests"""
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
class CreateTranslationTimeoutTypedDict(TypedDict):
|
|
@@ -145,140 +145,20 @@ 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
|
-
|
|
264
148
|
class CreateTranslationOrqTypedDict(TypedDict):
|
|
265
149
|
name: NotRequired[str]
|
|
266
150
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
267
|
-
fallbacks: NotRequired[
|
|
268
|
-
List[CreateTranslationRouterAudioTranslationsFallbacksTypedDict]
|
|
269
|
-
]
|
|
151
|
+
fallbacks: NotRequired[List[CreateTranslationFallbacksTypedDict]]
|
|
270
152
|
r"""Array of fallback models to use if primary model fails"""
|
|
271
|
-
retry: NotRequired[
|
|
153
|
+
retry: NotRequired[CreateTranslationRetryTypedDict]
|
|
272
154
|
r"""Retry configuration for the request"""
|
|
273
155
|
identity: NotRequired[PublicIdentityTypedDict]
|
|
274
156
|
r"""Information about the identity making the request. If the identity does not exist, it will be created automatically."""
|
|
275
157
|
contact: NotRequired[PublicContactTypedDict]
|
|
276
158
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
277
|
-
load_balancer: NotRequired[
|
|
278
|
-
CreateTranslationRouterAudioTranslationsLoadBalancerTypedDict
|
|
279
|
-
]
|
|
159
|
+
load_balancer: NotRequired[CreateTranslationLoadBalancerTypedDict]
|
|
280
160
|
r"""Array of models with weights for load balancing requests"""
|
|
281
|
-
timeout: NotRequired[
|
|
161
|
+
timeout: NotRequired[CreateTranslationTimeoutTypedDict]
|
|
282
162
|
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."""
|
|
283
163
|
|
|
284
164
|
|
|
@@ -286,10 +166,10 @@ class CreateTranslationOrq(BaseModel):
|
|
|
286
166
|
name: Optional[str] = None
|
|
287
167
|
r"""The name to display on the trace. If not specified, the default system name will be used."""
|
|
288
168
|
|
|
289
|
-
fallbacks: Optional[List[
|
|
169
|
+
fallbacks: Optional[List[CreateTranslationFallbacks]] = None
|
|
290
170
|
r"""Array of fallback models to use if primary model fails"""
|
|
291
171
|
|
|
292
|
-
retry: Optional[
|
|
172
|
+
retry: Optional[CreateTranslationRetry] = None
|
|
293
173
|
r"""Retry configuration for the request"""
|
|
294
174
|
|
|
295
175
|
identity: Optional[PublicIdentity] = None
|
|
@@ -303,10 +183,10 @@ class CreateTranslationOrq(BaseModel):
|
|
|
303
183
|
] = None
|
|
304
184
|
r"""@deprecated Use identity instead. Information about the contact making the request."""
|
|
305
185
|
|
|
306
|
-
load_balancer: Optional[
|
|
186
|
+
load_balancer: Optional[CreateTranslationLoadBalancer] = None
|
|
307
187
|
r"""Array of models with weights for load balancing requests"""
|
|
308
188
|
|
|
309
|
-
timeout: Optional[
|
|
189
|
+
timeout: Optional[CreateTranslationTimeout] = None
|
|
310
190
|
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."""
|
|
311
191
|
|
|
312
192
|
@model_serializer(mode="wrap")
|
|
@@ -397,16 +277,6 @@ class CreateTranslationRequestBodyTypedDict(TypedDict):
|
|
|
397
277
|
r"""The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word."""
|
|
398
278
|
temperature: NotRequired[float]
|
|
399
279
|
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."""
|
|
410
280
|
orq: NotRequired[CreateTranslationOrqTypedDict]
|
|
411
281
|
file: NotRequired[CreateTranslationFileTypedDict]
|
|
412
282
|
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."""
|
|
@@ -446,33 +316,6 @@ class CreateTranslationRequestBody(BaseModel):
|
|
|
446
316
|
temperature: Annotated[Optional[float], FieldMetadata(multipart=True)] = None
|
|
447
317
|
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."""
|
|
448
318
|
|
|
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
|
-
|
|
476
319
|
orq: Annotated[
|
|
477
320
|
Optional[CreateTranslationOrq],
|
|
478
321
|
FieldMetadata(multipart=MultipartFormMetadata(json=True)),
|
|
@@ -496,11 +339,6 @@ class CreateTranslationRequestBody(BaseModel):
|
|
|
496
339
|
"num_speakers",
|
|
497
340
|
"timestamps_granularity",
|
|
498
341
|
"temperature",
|
|
499
|
-
"name",
|
|
500
|
-
"fallbacks",
|
|
501
|
-
"retry",
|
|
502
|
-
"load_balancer",
|
|
503
|
-
"timeout",
|
|
504
342
|
"orq",
|
|
505
343
|
"file",
|
|
506
344
|
]
|
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-24T23:05:35.297Z")
|
|
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-24T23:05:35.297Z")
|
|
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-24T23:05:35.297Z")
|
|
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_01kfs437myc66mw5yq6gsyv3jp"
|
|
190
190
|
)
|
|
191
191
|
r"""Unique conversation identifier with `conv_` prefix."""
|
|
192
192
|
|
|
@@ -1959,8 +1959,6 @@ 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."""
|
|
1964
1962
|
audio: NotRequired[Nullable[GetAllPromptsAudioTypedDict]]
|
|
1965
1963
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
1966
1964
|
frequency_penalty: NotRequired[Nullable[float]]
|
|
@@ -2035,9 +2033,6 @@ class GetAllPromptsPromptFieldTypedDict(TypedDict):
|
|
|
2035
2033
|
class GetAllPromptsPromptField(BaseModel):
|
|
2036
2034
|
r"""Prompt configuration with model and messages. Use this instead of prompt_config."""
|
|
2037
2035
|
|
|
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
|
-
|
|
2041
2036
|
audio: OptionalNullable[GetAllPromptsAudio] = UNSET
|
|
2042
2037
|
r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
|
|
2043
2038
|
|
|
@@ -2141,7 +2136,6 @@ class GetAllPromptsPromptField(BaseModel):
|
|
|
2141
2136
|
def serialize_model(self, handler):
|
|
2142
2137
|
optional_fields = set(
|
|
2143
2138
|
[
|
|
2144
|
-
"name",
|
|
2145
2139
|
"audio",
|
|
2146
2140
|
"frequency_penalty",
|
|
2147
2141
|
"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_01KFS437ZZTNEE384Z90983PXP"
|
|
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] = "01KFS437ZY2ARY6XMGQ7KQE07G"
|
|
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_01KFS437ZXV8Y2776M7Y4JEM1E"
|
|
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_01KFS437ZV6B6PE7CPFTTWR99Y"
|
|
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_01KFS437ZT3B1NHZHEACD2ZKBA"
|
|
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_01KFS437ZSMYAAVZSSAYCZ31XC"
|
|
1163
1163
|
)
|
|
1164
1164
|
|
|
1165
1165
|
display_name: Optional[str] = None
|