orq-ai-sdk 4.2.8__py3-none-any.whl → 4.2.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orq_ai_sdk/_version.py +2 -2
- orq_ai_sdk/completions.py +107 -1
- orq_ai_sdk/edits.py +107 -1
- orq_ai_sdk/embeddings.py +107 -1
- orq_ai_sdk/generations.py +99 -1
- orq_ai_sdk/models/__init__.py +405 -0
- orq_ai_sdk/models/conversationresponse.py +1 -1
- orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
- orq_ai_sdk/models/createagentrequestop.py +24 -0
- orq_ai_sdk/models/createchatcompletionop.py +6 -0
- orq_ai_sdk/models/createcompletionop.py +218 -30
- orq_ai_sdk/models/createcontactop.py +1 -1
- orq_ai_sdk/models/createconversationop.py +1 -1
- orq_ai_sdk/models/createconversationresponseop.py +2 -2
- orq_ai_sdk/models/createdatasetitemop.py +4 -4
- orq_ai_sdk/models/createdatasetop.py +1 -1
- orq_ai_sdk/models/createdatasourceop.py +1 -1
- orq_ai_sdk/models/createembeddingop.py +221 -26
- orq_ai_sdk/models/createevalop.py +14 -14
- orq_ai_sdk/models/createidentityop.py +1 -1
- orq_ai_sdk/models/createimageeditop.py +242 -31
- orq_ai_sdk/models/createimageop.py +210 -22
- orq_ai_sdk/models/createimagevariationop.py +251 -31
- orq_ai_sdk/models/createpromptop.py +12 -0
- orq_ai_sdk/models/creatererankop.py +218 -26
- orq_ai_sdk/models/createspeechop.py +174 -24
- orq_ai_sdk/models/createtoolop.py +6 -6
- orq_ai_sdk/models/createtranscriptionop.py +180 -10
- orq_ai_sdk/models/createtranslationop.py +172 -10
- orq_ai_sdk/models/filegetop.py +1 -1
- orq_ai_sdk/models/filelistop.py +1 -1
- orq_ai_sdk/models/fileuploadop.py +1 -1
- orq_ai_sdk/models/generateconversationnameop.py +1 -1
- orq_ai_sdk/models/getallpromptsop.py +6 -0
- orq_ai_sdk/models/getalltoolsop.py +6 -6
- orq_ai_sdk/models/getevalsop.py +14 -14
- orq_ai_sdk/models/getonepromptop.py +6 -0
- orq_ai_sdk/models/getpromptversionop.py +6 -0
- orq_ai_sdk/models/listagentsop.py +12 -0
- orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
- orq_ai_sdk/models/listdatasetsop.py +1 -1
- orq_ai_sdk/models/listdatasourcesop.py +1 -1
- orq_ai_sdk/models/listidentitiesop.py +1 -1
- orq_ai_sdk/models/listpromptversionsop.py +6 -0
- orq_ai_sdk/models/partdoneevent.py +1 -1
- orq_ai_sdk/models/reasoningpart.py +1 -1
- orq_ai_sdk/models/retrieveagentrequestop.py +12 -0
- orq_ai_sdk/models/retrievedatapointop.py +4 -4
- orq_ai_sdk/models/retrievedatasetop.py +1 -1
- orq_ai_sdk/models/retrievedatasourceop.py +1 -1
- orq_ai_sdk/models/retrieveidentityop.py +1 -1
- orq_ai_sdk/models/retrievetoolop.py +6 -6
- orq_ai_sdk/models/runagentop.py +13 -1
- orq_ai_sdk/models/streamrunagentop.py +13 -1
- orq_ai_sdk/models/updateagentop.py +24 -0
- orq_ai_sdk/models/updateconversationop.py +1 -1
- orq_ai_sdk/models/updatedatapointop.py +4 -4
- orq_ai_sdk/models/updatedatasetop.py +1 -1
- orq_ai_sdk/models/updatedatasourceop.py +1 -1
- orq_ai_sdk/models/updateevalop.py +14 -14
- orq_ai_sdk/models/updateidentityop.py +1 -1
- orq_ai_sdk/models/updatepromptop.py +12 -0
- orq_ai_sdk/models/updatetoolop.py +7 -7
- orq_ai_sdk/orq_completions.py +6 -0
- orq_ai_sdk/rerank.py +98 -0
- orq_ai_sdk/speech.py +83 -1
- orq_ai_sdk/transcriptions.py +90 -0
- orq_ai_sdk/translations.py +87 -1
- orq_ai_sdk/variations.py +111 -1
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/METADATA +1 -1
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/RECORD +73 -73
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/top_level.txt +0 -0
orq_ai_sdk/speech.py
CHANGED
|
@@ -6,7 +6,7 @@ from orq_ai_sdk._hooks import HookContext
|
|
|
6
6
|
from orq_ai_sdk.models import createspeechop as models_createspeechop
|
|
7
7
|
from orq_ai_sdk.types import OptionalNullable, UNSET
|
|
8
8
|
from orq_ai_sdk.utils import get_security_from_env
|
|
9
|
-
from typing import Mapping, Optional, Union
|
|
9
|
+
from typing import List, Mapping, Optional, Union
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class Speech(BaseSDK):
|
|
@@ -20,6 +20,31 @@ class Speech(BaseSDK):
|
|
|
20
20
|
models_createspeechop.CreateSpeechResponseFormat
|
|
21
21
|
] = "mp3",
|
|
22
22
|
speed: Optional[float] = 1,
|
|
23
|
+
name: Optional[str] = None,
|
|
24
|
+
fallbacks: Optional[
|
|
25
|
+
Union[
|
|
26
|
+
List[models_createspeechop.CreateSpeechFallbacks],
|
|
27
|
+
List[models_createspeechop.CreateSpeechFallbacksTypedDict],
|
|
28
|
+
]
|
|
29
|
+
] = None,
|
|
30
|
+
retry: Optional[
|
|
31
|
+
Union[
|
|
32
|
+
models_createspeechop.CreateSpeechRetry,
|
|
33
|
+
models_createspeechop.CreateSpeechRetryTypedDict,
|
|
34
|
+
]
|
|
35
|
+
] = None,
|
|
36
|
+
load_balancer: Optional[
|
|
37
|
+
Union[
|
|
38
|
+
models_createspeechop.CreateSpeechLoadBalancer,
|
|
39
|
+
models_createspeechop.CreateSpeechLoadBalancerTypedDict,
|
|
40
|
+
]
|
|
41
|
+
] = None,
|
|
42
|
+
timeout: Optional[
|
|
43
|
+
Union[
|
|
44
|
+
models_createspeechop.CreateSpeechTimeout,
|
|
45
|
+
models_createspeechop.CreateSpeechTimeoutTypedDict,
|
|
46
|
+
]
|
|
47
|
+
] = None,
|
|
23
48
|
orq: Optional[
|
|
24
49
|
Union[
|
|
25
50
|
models_createspeechop.CreateSpeechOrq,
|
|
@@ -48,6 +73,11 @@ class Speech(BaseSDK):
|
|
|
48
73
|
`aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
|
|
49
74
|
:param response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format.
|
|
50
75
|
:param speed: The speed of the generated audio.
|
|
76
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
77
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
78
|
+
:param retry: Retry configuration for the request
|
|
79
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
80
|
+
:param timeout: 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.
|
|
51
81
|
:param orq:
|
|
52
82
|
:param retries: Override the default retry configuration for this method
|
|
53
83
|
:param server_url: Override the default server URL for this method
|
|
@@ -73,6 +103,17 @@ class Speech(BaseSDK):
|
|
|
73
103
|
voice=voice,
|
|
74
104
|
response_format=response_format,
|
|
75
105
|
speed=speed,
|
|
106
|
+
name=name,
|
|
107
|
+
fallbacks=utils.get_pydantic_model(
|
|
108
|
+
fallbacks, Optional[List[models.CreateSpeechFallbacks]]
|
|
109
|
+
),
|
|
110
|
+
retry=utils.get_pydantic_model(retry, Optional[models.CreateSpeechRetry]),
|
|
111
|
+
load_balancer=utils.get_pydantic_model(
|
|
112
|
+
load_balancer, Optional[models.CreateSpeechLoadBalancer]
|
|
113
|
+
),
|
|
114
|
+
timeout=utils.get_pydantic_model(
|
|
115
|
+
timeout, Optional[models.CreateSpeechTimeout]
|
|
116
|
+
),
|
|
76
117
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateSpeechOrq]),
|
|
77
118
|
)
|
|
78
119
|
|
|
@@ -140,6 +181,31 @@ class Speech(BaseSDK):
|
|
|
140
181
|
models_createspeechop.CreateSpeechResponseFormat
|
|
141
182
|
] = "mp3",
|
|
142
183
|
speed: Optional[float] = 1,
|
|
184
|
+
name: Optional[str] = None,
|
|
185
|
+
fallbacks: Optional[
|
|
186
|
+
Union[
|
|
187
|
+
List[models_createspeechop.CreateSpeechFallbacks],
|
|
188
|
+
List[models_createspeechop.CreateSpeechFallbacksTypedDict],
|
|
189
|
+
]
|
|
190
|
+
] = None,
|
|
191
|
+
retry: Optional[
|
|
192
|
+
Union[
|
|
193
|
+
models_createspeechop.CreateSpeechRetry,
|
|
194
|
+
models_createspeechop.CreateSpeechRetryTypedDict,
|
|
195
|
+
]
|
|
196
|
+
] = None,
|
|
197
|
+
load_balancer: Optional[
|
|
198
|
+
Union[
|
|
199
|
+
models_createspeechop.CreateSpeechLoadBalancer,
|
|
200
|
+
models_createspeechop.CreateSpeechLoadBalancerTypedDict,
|
|
201
|
+
]
|
|
202
|
+
] = None,
|
|
203
|
+
timeout: Optional[
|
|
204
|
+
Union[
|
|
205
|
+
models_createspeechop.CreateSpeechTimeout,
|
|
206
|
+
models_createspeechop.CreateSpeechTimeoutTypedDict,
|
|
207
|
+
]
|
|
208
|
+
] = None,
|
|
143
209
|
orq: Optional[
|
|
144
210
|
Union[
|
|
145
211
|
models_createspeechop.CreateSpeechOrq,
|
|
@@ -168,6 +234,11 @@ class Speech(BaseSDK):
|
|
|
168
234
|
`aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
|
|
169
235
|
:param response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format.
|
|
170
236
|
:param speed: The speed of the generated audio.
|
|
237
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
238
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
239
|
+
:param retry: Retry configuration for the request
|
|
240
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
241
|
+
:param timeout: 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.
|
|
171
242
|
:param orq:
|
|
172
243
|
:param retries: Override the default retry configuration for this method
|
|
173
244
|
:param server_url: Override the default server URL for this method
|
|
@@ -193,6 +264,17 @@ class Speech(BaseSDK):
|
|
|
193
264
|
voice=voice,
|
|
194
265
|
response_format=response_format,
|
|
195
266
|
speed=speed,
|
|
267
|
+
name=name,
|
|
268
|
+
fallbacks=utils.get_pydantic_model(
|
|
269
|
+
fallbacks, Optional[List[models.CreateSpeechFallbacks]]
|
|
270
|
+
),
|
|
271
|
+
retry=utils.get_pydantic_model(retry, Optional[models.CreateSpeechRetry]),
|
|
272
|
+
load_balancer=utils.get_pydantic_model(
|
|
273
|
+
load_balancer, Optional[models.CreateSpeechLoadBalancer]
|
|
274
|
+
),
|
|
275
|
+
timeout=utils.get_pydantic_model(
|
|
276
|
+
timeout, Optional[models.CreateSpeechTimeout]
|
|
277
|
+
),
|
|
196
278
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateSpeechOrq]),
|
|
197
279
|
)
|
|
198
280
|
|
orq_ai_sdk/transcriptions.py
CHANGED
|
@@ -31,6 +31,33 @@ class Transcriptions(BaseSDK):
|
|
|
31
31
|
timestamp_granularities: Optional[
|
|
32
32
|
List[models_createtranscriptionop.TimestampGranularities]
|
|
33
33
|
] = None,
|
|
34
|
+
name: Optional[str] = None,
|
|
35
|
+
fallbacks: Optional[
|
|
36
|
+
Union[
|
|
37
|
+
List[models_createtranscriptionop.CreateTranscriptionFallbacks],
|
|
38
|
+
List[
|
|
39
|
+
models_createtranscriptionop.CreateTranscriptionFallbacksTypedDict
|
|
40
|
+
],
|
|
41
|
+
]
|
|
42
|
+
] = None,
|
|
43
|
+
retry: Optional[
|
|
44
|
+
Union[
|
|
45
|
+
models_createtranscriptionop.CreateTranscriptionRetry,
|
|
46
|
+
models_createtranscriptionop.CreateTranscriptionRetryTypedDict,
|
|
47
|
+
]
|
|
48
|
+
] = None,
|
|
49
|
+
load_balancer: Optional[
|
|
50
|
+
Union[
|
|
51
|
+
models_createtranscriptionop.CreateTranscriptionLoadBalancer,
|
|
52
|
+
models_createtranscriptionop.CreateTranscriptionLoadBalancerTypedDict,
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
timeout: Optional[
|
|
56
|
+
Union[
|
|
57
|
+
models_createtranscriptionop.CreateTranscriptionTimeout,
|
|
58
|
+
models_createtranscriptionop.CreateTranscriptionTimeoutTypedDict,
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
34
61
|
orq: Optional[
|
|
35
62
|
Union[
|
|
36
63
|
models_createtranscriptionop.CreateTranscriptionOrq,
|
|
@@ -61,6 +88,11 @@ class Transcriptions(BaseSDK):
|
|
|
61
88
|
:param temperature: 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.
|
|
62
89
|
:param language: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
|
|
63
90
|
:param timestamp_granularities: 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.
|
|
91
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
92
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
93
|
+
:param retry: Retry configuration for the request
|
|
94
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
95
|
+
:param timeout: 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.
|
|
64
96
|
:param orq:
|
|
65
97
|
:param file: The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
66
98
|
:param retries: Override the default retry configuration for this method
|
|
@@ -93,6 +125,19 @@ class Transcriptions(BaseSDK):
|
|
|
93
125
|
temperature=temperature,
|
|
94
126
|
language=language,
|
|
95
127
|
timestamp_granularities=timestamp_granularities,
|
|
128
|
+
name=name,
|
|
129
|
+
fallbacks=utils.get_pydantic_model(
|
|
130
|
+
fallbacks, Optional[List[models.CreateTranscriptionFallbacks]]
|
|
131
|
+
),
|
|
132
|
+
retry=utils.get_pydantic_model(
|
|
133
|
+
retry, Optional[models.CreateTranscriptionRetry]
|
|
134
|
+
),
|
|
135
|
+
load_balancer=utils.get_pydantic_model(
|
|
136
|
+
load_balancer, Optional[models.CreateTranscriptionLoadBalancer]
|
|
137
|
+
),
|
|
138
|
+
timeout=utils.get_pydantic_model(
|
|
139
|
+
timeout, Optional[models.CreateTranscriptionTimeout]
|
|
140
|
+
),
|
|
96
141
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranscriptionOrq]),
|
|
97
142
|
file=utils.get_pydantic_model(
|
|
98
143
|
file, Optional[models.CreateTranscriptionFile]
|
|
@@ -188,6 +233,33 @@ class Transcriptions(BaseSDK):
|
|
|
188
233
|
timestamp_granularities: Optional[
|
|
189
234
|
List[models_createtranscriptionop.TimestampGranularities]
|
|
190
235
|
] = None,
|
|
236
|
+
name: Optional[str] = None,
|
|
237
|
+
fallbacks: Optional[
|
|
238
|
+
Union[
|
|
239
|
+
List[models_createtranscriptionop.CreateTranscriptionFallbacks],
|
|
240
|
+
List[
|
|
241
|
+
models_createtranscriptionop.CreateTranscriptionFallbacksTypedDict
|
|
242
|
+
],
|
|
243
|
+
]
|
|
244
|
+
] = None,
|
|
245
|
+
retry: Optional[
|
|
246
|
+
Union[
|
|
247
|
+
models_createtranscriptionop.CreateTranscriptionRetry,
|
|
248
|
+
models_createtranscriptionop.CreateTranscriptionRetryTypedDict,
|
|
249
|
+
]
|
|
250
|
+
] = None,
|
|
251
|
+
load_balancer: Optional[
|
|
252
|
+
Union[
|
|
253
|
+
models_createtranscriptionop.CreateTranscriptionLoadBalancer,
|
|
254
|
+
models_createtranscriptionop.CreateTranscriptionLoadBalancerTypedDict,
|
|
255
|
+
]
|
|
256
|
+
] = None,
|
|
257
|
+
timeout: Optional[
|
|
258
|
+
Union[
|
|
259
|
+
models_createtranscriptionop.CreateTranscriptionTimeout,
|
|
260
|
+
models_createtranscriptionop.CreateTranscriptionTimeoutTypedDict,
|
|
261
|
+
]
|
|
262
|
+
] = None,
|
|
191
263
|
orq: Optional[
|
|
192
264
|
Union[
|
|
193
265
|
models_createtranscriptionop.CreateTranscriptionOrq,
|
|
@@ -218,6 +290,11 @@ class Transcriptions(BaseSDK):
|
|
|
218
290
|
:param temperature: 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.
|
|
219
291
|
:param language: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
|
|
220
292
|
:param timestamp_granularities: 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.
|
|
293
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
294
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
295
|
+
:param retry: Retry configuration for the request
|
|
296
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
297
|
+
:param timeout: 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.
|
|
221
298
|
:param orq:
|
|
222
299
|
:param file: The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
223
300
|
:param retries: Override the default retry configuration for this method
|
|
@@ -250,6 +327,19 @@ class Transcriptions(BaseSDK):
|
|
|
250
327
|
temperature=temperature,
|
|
251
328
|
language=language,
|
|
252
329
|
timestamp_granularities=timestamp_granularities,
|
|
330
|
+
name=name,
|
|
331
|
+
fallbacks=utils.get_pydantic_model(
|
|
332
|
+
fallbacks, Optional[List[models.CreateTranscriptionFallbacks]]
|
|
333
|
+
),
|
|
334
|
+
retry=utils.get_pydantic_model(
|
|
335
|
+
retry, Optional[models.CreateTranscriptionRetry]
|
|
336
|
+
),
|
|
337
|
+
load_balancer=utils.get_pydantic_model(
|
|
338
|
+
load_balancer, Optional[models.CreateTranscriptionLoadBalancer]
|
|
339
|
+
),
|
|
340
|
+
timeout=utils.get_pydantic_model(
|
|
341
|
+
timeout, Optional[models.CreateTranscriptionTimeout]
|
|
342
|
+
),
|
|
253
343
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranscriptionOrq]),
|
|
254
344
|
file=utils.get_pydantic_model(
|
|
255
345
|
file, Optional[models.CreateTranscriptionFile]
|
orq_ai_sdk/translations.py
CHANGED
|
@@ -7,7 +7,7 @@ from orq_ai_sdk.models import createtranslationop as models_createtranslationop
|
|
|
7
7
|
from orq_ai_sdk.types import OptionalNullable, UNSET
|
|
8
8
|
from orq_ai_sdk.utils import get_security_from_env
|
|
9
9
|
from orq_ai_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
10
|
-
from typing import Any, Mapping, Optional, Union
|
|
10
|
+
from typing import Any, List, Mapping, Optional, Union
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Translations(BaseSDK):
|
|
@@ -27,6 +27,31 @@ class Translations(BaseSDK):
|
|
|
27
27
|
models_createtranslationop.CreateTranslationTimestampsGranularity
|
|
28
28
|
] = "word",
|
|
29
29
|
temperature: Optional[float] = None,
|
|
30
|
+
name: Optional[str] = None,
|
|
31
|
+
fallbacks: Optional[
|
|
32
|
+
Union[
|
|
33
|
+
List[models_createtranslationop.CreateTranslationFallbacks],
|
|
34
|
+
List[models_createtranslationop.CreateTranslationFallbacksTypedDict],
|
|
35
|
+
]
|
|
36
|
+
] = None,
|
|
37
|
+
retry: Optional[
|
|
38
|
+
Union[
|
|
39
|
+
models_createtranslationop.CreateTranslationRetry,
|
|
40
|
+
models_createtranslationop.CreateTranslationRetryTypedDict,
|
|
41
|
+
]
|
|
42
|
+
] = None,
|
|
43
|
+
load_balancer: Optional[
|
|
44
|
+
Union[
|
|
45
|
+
models_createtranslationop.CreateTranslationLoadBalancer,
|
|
46
|
+
models_createtranslationop.CreateTranslationLoadBalancerTypedDict,
|
|
47
|
+
]
|
|
48
|
+
] = None,
|
|
49
|
+
timeout: Optional[
|
|
50
|
+
Union[
|
|
51
|
+
models_createtranslationop.CreateTranslationTimeout,
|
|
52
|
+
models_createtranslationop.CreateTranslationTimeoutTypedDict,
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
30
55
|
orq: Optional[
|
|
31
56
|
Union[
|
|
32
57
|
models_createtranslationop.CreateTranslationOrq,
|
|
@@ -55,6 +80,11 @@ class Translations(BaseSDK):
|
|
|
55
80
|
:param num_speakers: The maximum amount of speakers talking in the uploaded file. Helps with predicting who speaks when, the maximum is 32.
|
|
56
81
|
:param timestamps_granularity: The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.
|
|
57
82
|
:param temperature: 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.
|
|
83
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
84
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
85
|
+
:param retry: Retry configuration for the request
|
|
86
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
87
|
+
:param timeout: 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.
|
|
58
88
|
:param orq:
|
|
59
89
|
:param file: The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
60
90
|
:param retries: Override the default retry configuration for this method
|
|
@@ -85,6 +115,19 @@ class Translations(BaseSDK):
|
|
|
85
115
|
num_speakers=num_speakers,
|
|
86
116
|
timestamps_granularity=timestamps_granularity,
|
|
87
117
|
temperature=temperature,
|
|
118
|
+
name=name,
|
|
119
|
+
fallbacks=utils.get_pydantic_model(
|
|
120
|
+
fallbacks, Optional[List[models.CreateTranslationFallbacks]]
|
|
121
|
+
),
|
|
122
|
+
retry=utils.get_pydantic_model(
|
|
123
|
+
retry, Optional[models.CreateTranslationRetry]
|
|
124
|
+
),
|
|
125
|
+
load_balancer=utils.get_pydantic_model(
|
|
126
|
+
load_balancer, Optional[models.CreateTranslationLoadBalancer]
|
|
127
|
+
),
|
|
128
|
+
timeout=utils.get_pydantic_model(
|
|
129
|
+
timeout, Optional[models.CreateTranslationTimeout]
|
|
130
|
+
),
|
|
88
131
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranslationOrq]),
|
|
89
132
|
file=utils.get_pydantic_model(file, Optional[models.CreateTranslationFile]),
|
|
90
133
|
)
|
|
@@ -170,6 +213,31 @@ class Translations(BaseSDK):
|
|
|
170
213
|
models_createtranslationop.CreateTranslationTimestampsGranularity
|
|
171
214
|
] = "word",
|
|
172
215
|
temperature: Optional[float] = None,
|
|
216
|
+
name: Optional[str] = None,
|
|
217
|
+
fallbacks: Optional[
|
|
218
|
+
Union[
|
|
219
|
+
List[models_createtranslationop.CreateTranslationFallbacks],
|
|
220
|
+
List[models_createtranslationop.CreateTranslationFallbacksTypedDict],
|
|
221
|
+
]
|
|
222
|
+
] = None,
|
|
223
|
+
retry: Optional[
|
|
224
|
+
Union[
|
|
225
|
+
models_createtranslationop.CreateTranslationRetry,
|
|
226
|
+
models_createtranslationop.CreateTranslationRetryTypedDict,
|
|
227
|
+
]
|
|
228
|
+
] = None,
|
|
229
|
+
load_balancer: Optional[
|
|
230
|
+
Union[
|
|
231
|
+
models_createtranslationop.CreateTranslationLoadBalancer,
|
|
232
|
+
models_createtranslationop.CreateTranslationLoadBalancerTypedDict,
|
|
233
|
+
]
|
|
234
|
+
] = None,
|
|
235
|
+
timeout: Optional[
|
|
236
|
+
Union[
|
|
237
|
+
models_createtranslationop.CreateTranslationTimeout,
|
|
238
|
+
models_createtranslationop.CreateTranslationTimeoutTypedDict,
|
|
239
|
+
]
|
|
240
|
+
] = None,
|
|
173
241
|
orq: Optional[
|
|
174
242
|
Union[
|
|
175
243
|
models_createtranslationop.CreateTranslationOrq,
|
|
@@ -198,6 +266,11 @@ class Translations(BaseSDK):
|
|
|
198
266
|
:param num_speakers: The maximum amount of speakers talking in the uploaded file. Helps with predicting who speaks when, the maximum is 32.
|
|
199
267
|
:param timestamps_granularity: The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.
|
|
200
268
|
:param temperature: 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.
|
|
269
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
270
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
271
|
+
:param retry: Retry configuration for the request
|
|
272
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
273
|
+
:param timeout: 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.
|
|
201
274
|
:param orq:
|
|
202
275
|
:param file: The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
203
276
|
:param retries: Override the default retry configuration for this method
|
|
@@ -228,6 +301,19 @@ class Translations(BaseSDK):
|
|
|
228
301
|
num_speakers=num_speakers,
|
|
229
302
|
timestamps_granularity=timestamps_granularity,
|
|
230
303
|
temperature=temperature,
|
|
304
|
+
name=name,
|
|
305
|
+
fallbacks=utils.get_pydantic_model(
|
|
306
|
+
fallbacks, Optional[List[models.CreateTranslationFallbacks]]
|
|
307
|
+
),
|
|
308
|
+
retry=utils.get_pydantic_model(
|
|
309
|
+
retry, Optional[models.CreateTranslationRetry]
|
|
310
|
+
),
|
|
311
|
+
load_balancer=utils.get_pydantic_model(
|
|
312
|
+
load_balancer, Optional[models.CreateTranslationLoadBalancer]
|
|
313
|
+
),
|
|
314
|
+
timeout=utils.get_pydantic_model(
|
|
315
|
+
timeout, Optional[models.CreateTranslationTimeout]
|
|
316
|
+
),
|
|
231
317
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranslationOrq]),
|
|
232
318
|
file=utils.get_pydantic_model(file, Optional[models.CreateTranslationFile]),
|
|
233
319
|
)
|
orq_ai_sdk/variations.py
CHANGED
|
@@ -7,7 +7,7 @@ from orq_ai_sdk.models import createimagevariationop as models_createimagevariat
|
|
|
7
7
|
from orq_ai_sdk.types import OptionalNullable, UNSET
|
|
8
8
|
from orq_ai_sdk.utils import get_security_from_env
|
|
9
9
|
from orq_ai_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
10
|
-
from typing import Any, Mapping, Optional, Union
|
|
10
|
+
from typing import Any, List, Mapping, Optional, Union
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Variations(BaseSDK):
|
|
@@ -22,6 +22,39 @@ class Variations(BaseSDK):
|
|
|
22
22
|
] = "url",
|
|
23
23
|
size: Optional[models_createimagevariationop.Size] = "1024x1024",
|
|
24
24
|
user: Optional[str] = None,
|
|
25
|
+
name: Optional[str] = None,
|
|
26
|
+
fallbacks: Optional[
|
|
27
|
+
Union[
|
|
28
|
+
List[models_createimagevariationop.CreateImageVariationFallbacks],
|
|
29
|
+
List[
|
|
30
|
+
models_createimagevariationop.CreateImageVariationFallbacksTypedDict
|
|
31
|
+
],
|
|
32
|
+
]
|
|
33
|
+
] = None,
|
|
34
|
+
retry: Optional[
|
|
35
|
+
Union[
|
|
36
|
+
models_createimagevariationop.CreateImageVariationRetry,
|
|
37
|
+
models_createimagevariationop.CreateImageVariationRetryTypedDict,
|
|
38
|
+
]
|
|
39
|
+
] = None,
|
|
40
|
+
cache: Optional[
|
|
41
|
+
Union[
|
|
42
|
+
models_createimagevariationop.CreateImageVariationCache,
|
|
43
|
+
models_createimagevariationop.CreateImageVariationCacheTypedDict,
|
|
44
|
+
]
|
|
45
|
+
] = None,
|
|
46
|
+
load_balancer: Optional[
|
|
47
|
+
Union[
|
|
48
|
+
models_createimagevariationop.CreateImageVariationLoadBalancer,
|
|
49
|
+
models_createimagevariationop.CreateImageVariationLoadBalancerTypedDict,
|
|
50
|
+
]
|
|
51
|
+
] = None,
|
|
52
|
+
timeout: Optional[
|
|
53
|
+
Union[
|
|
54
|
+
models_createimagevariationop.CreateImageVariationTimeout,
|
|
55
|
+
models_createimagevariationop.CreateImageVariationTimeoutTypedDict,
|
|
56
|
+
]
|
|
57
|
+
] = None,
|
|
25
58
|
orq: Optional[
|
|
26
59
|
Union[
|
|
27
60
|
models_createimagevariationop.CreateImageVariationOrq,
|
|
@@ -43,6 +76,12 @@ class Variations(BaseSDK):
|
|
|
43
76
|
:param response_format: The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.
|
|
44
77
|
:param size: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
45
78
|
:param user: A unique identifier representing your end-user, which can help to monitor and detect abuse.
|
|
79
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
80
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
81
|
+
:param retry: Retry configuration for the request
|
|
82
|
+
:param cache: Cache configuration for the request.
|
|
83
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
84
|
+
:param timeout: 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.
|
|
46
85
|
:param orq:
|
|
47
86
|
:param retries: Override the default retry configuration for this method
|
|
48
87
|
:param server_url: Override the default server URL for this method
|
|
@@ -69,6 +108,22 @@ class Variations(BaseSDK):
|
|
|
69
108
|
response_format=response_format,
|
|
70
109
|
size=size,
|
|
71
110
|
user=user,
|
|
111
|
+
name=name,
|
|
112
|
+
fallbacks=utils.get_pydantic_model(
|
|
113
|
+
fallbacks, Optional[List[models.CreateImageVariationFallbacks]]
|
|
114
|
+
),
|
|
115
|
+
retry=utils.get_pydantic_model(
|
|
116
|
+
retry, Optional[models.CreateImageVariationRetry]
|
|
117
|
+
),
|
|
118
|
+
cache=utils.get_pydantic_model(
|
|
119
|
+
cache, Optional[models.CreateImageVariationCache]
|
|
120
|
+
),
|
|
121
|
+
load_balancer=utils.get_pydantic_model(
|
|
122
|
+
load_balancer, Optional[models.CreateImageVariationLoadBalancer]
|
|
123
|
+
),
|
|
124
|
+
timeout=utils.get_pydantic_model(
|
|
125
|
+
timeout, Optional[models.CreateImageVariationTimeout]
|
|
126
|
+
),
|
|
72
127
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageVariationOrq]),
|
|
73
128
|
)
|
|
74
129
|
|
|
@@ -143,6 +198,39 @@ class Variations(BaseSDK):
|
|
|
143
198
|
] = "url",
|
|
144
199
|
size: Optional[models_createimagevariationop.Size] = "1024x1024",
|
|
145
200
|
user: Optional[str] = None,
|
|
201
|
+
name: Optional[str] = None,
|
|
202
|
+
fallbacks: Optional[
|
|
203
|
+
Union[
|
|
204
|
+
List[models_createimagevariationop.CreateImageVariationFallbacks],
|
|
205
|
+
List[
|
|
206
|
+
models_createimagevariationop.CreateImageVariationFallbacksTypedDict
|
|
207
|
+
],
|
|
208
|
+
]
|
|
209
|
+
] = None,
|
|
210
|
+
retry: Optional[
|
|
211
|
+
Union[
|
|
212
|
+
models_createimagevariationop.CreateImageVariationRetry,
|
|
213
|
+
models_createimagevariationop.CreateImageVariationRetryTypedDict,
|
|
214
|
+
]
|
|
215
|
+
] = None,
|
|
216
|
+
cache: Optional[
|
|
217
|
+
Union[
|
|
218
|
+
models_createimagevariationop.CreateImageVariationCache,
|
|
219
|
+
models_createimagevariationop.CreateImageVariationCacheTypedDict,
|
|
220
|
+
]
|
|
221
|
+
] = None,
|
|
222
|
+
load_balancer: Optional[
|
|
223
|
+
Union[
|
|
224
|
+
models_createimagevariationop.CreateImageVariationLoadBalancer,
|
|
225
|
+
models_createimagevariationop.CreateImageVariationLoadBalancerTypedDict,
|
|
226
|
+
]
|
|
227
|
+
] = None,
|
|
228
|
+
timeout: Optional[
|
|
229
|
+
Union[
|
|
230
|
+
models_createimagevariationop.CreateImageVariationTimeout,
|
|
231
|
+
models_createimagevariationop.CreateImageVariationTimeoutTypedDict,
|
|
232
|
+
]
|
|
233
|
+
] = None,
|
|
146
234
|
orq: Optional[
|
|
147
235
|
Union[
|
|
148
236
|
models_createimagevariationop.CreateImageVariationOrq,
|
|
@@ -164,6 +252,12 @@ class Variations(BaseSDK):
|
|
|
164
252
|
:param response_format: The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.
|
|
165
253
|
:param size: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
166
254
|
:param user: A unique identifier representing your end-user, which can help to monitor and detect abuse.
|
|
255
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
256
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
257
|
+
:param retry: Retry configuration for the request
|
|
258
|
+
:param cache: Cache configuration for the request.
|
|
259
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
260
|
+
:param timeout: 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.
|
|
167
261
|
:param orq:
|
|
168
262
|
:param retries: Override the default retry configuration for this method
|
|
169
263
|
:param server_url: Override the default server URL for this method
|
|
@@ -190,6 +284,22 @@ class Variations(BaseSDK):
|
|
|
190
284
|
response_format=response_format,
|
|
191
285
|
size=size,
|
|
192
286
|
user=user,
|
|
287
|
+
name=name,
|
|
288
|
+
fallbacks=utils.get_pydantic_model(
|
|
289
|
+
fallbacks, Optional[List[models.CreateImageVariationFallbacks]]
|
|
290
|
+
),
|
|
291
|
+
retry=utils.get_pydantic_model(
|
|
292
|
+
retry, Optional[models.CreateImageVariationRetry]
|
|
293
|
+
),
|
|
294
|
+
cache=utils.get_pydantic_model(
|
|
295
|
+
cache, Optional[models.CreateImageVariationCache]
|
|
296
|
+
),
|
|
297
|
+
load_balancer=utils.get_pydantic_model(
|
|
298
|
+
load_balancer, Optional[models.CreateImageVariationLoadBalancer]
|
|
299
|
+
),
|
|
300
|
+
timeout=utils.get_pydantic_model(
|
|
301
|
+
timeout, Optional[models.CreateImageVariationTimeout]
|
|
302
|
+
),
|
|
193
303
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageVariationOrq]),
|
|
194
304
|
)
|
|
195
305
|
|