orq-ai-sdk 4.2.16__py3-none-any.whl → 4.3.0rc0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orq_ai_sdk/_hooks/globalhook.py +1 -0
- orq_ai_sdk/_version.py +3 -3
- orq_ai_sdk/agents.py +186 -186
- orq_ai_sdk/completions.py +1 -107
- orq_ai_sdk/edits.py +1 -107
- orq_ai_sdk/embeddings.py +1 -107
- orq_ai_sdk/generations.py +1 -99
- orq_ai_sdk/models/__init__.py +0 -405
- orq_ai_sdk/models/conversationresponse.py +1 -1
- orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
- orq_ai_sdk/models/createagentrequestop.py +0 -24
- orq_ai_sdk/models/createchatcompletionop.py +0 -6
- orq_ai_sdk/models/createcompletionop.py +30 -218
- orq_ai_sdk/models/createcontactop.py +1 -1
- orq_ai_sdk/models/createconversationop.py +1 -1
- orq_ai_sdk/models/createconversationresponseop.py +2 -2
- orq_ai_sdk/models/createdatasetitemop.py +4 -4
- orq_ai_sdk/models/createdatasetop.py +1 -1
- orq_ai_sdk/models/createdatasourceop.py +1 -1
- orq_ai_sdk/models/createembeddingop.py +26 -221
- orq_ai_sdk/models/createevalop.py +14 -14
- orq_ai_sdk/models/createidentityop.py +1 -1
- orq_ai_sdk/models/createimageeditop.py +31 -242
- orq_ai_sdk/models/createimageop.py +22 -210
- orq_ai_sdk/models/createimagevariationop.py +31 -251
- orq_ai_sdk/models/createpromptop.py +0 -12
- orq_ai_sdk/models/creatererankop.py +26 -218
- orq_ai_sdk/models/createspeechop.py +24 -174
- orq_ai_sdk/models/createtoolop.py +6 -6
- orq_ai_sdk/models/createtranscriptionop.py +10 -180
- orq_ai_sdk/models/createtranslationop.py +10 -172
- orq_ai_sdk/models/filegetop.py +1 -1
- orq_ai_sdk/models/filelistop.py +1 -1
- orq_ai_sdk/models/fileuploadop.py +1 -1
- orq_ai_sdk/models/generateconversationnameop.py +1 -1
- orq_ai_sdk/models/getallpromptsop.py +0 -6
- orq_ai_sdk/models/getalltoolsop.py +6 -6
- orq_ai_sdk/models/getevalsop.py +14 -14
- orq_ai_sdk/models/getonepromptop.py +0 -6
- orq_ai_sdk/models/getpromptversionop.py +0 -6
- orq_ai_sdk/models/listagentsop.py +0 -12
- orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
- orq_ai_sdk/models/listdatasetsop.py +1 -1
- orq_ai_sdk/models/listdatasourcesop.py +1 -1
- orq_ai_sdk/models/listidentitiesop.py +1 -1
- orq_ai_sdk/models/listpromptversionsop.py +0 -6
- orq_ai_sdk/models/partdoneevent.py +1 -1
- orq_ai_sdk/models/reasoningpart.py +1 -1
- orq_ai_sdk/models/retrieveagentrequestop.py +0 -12
- orq_ai_sdk/models/retrievedatapointop.py +4 -4
- orq_ai_sdk/models/retrievedatasetop.py +1 -1
- orq_ai_sdk/models/retrievedatasourceop.py +1 -1
- orq_ai_sdk/models/retrieveidentityop.py +1 -1
- orq_ai_sdk/models/retrievetoolop.py +6 -6
- orq_ai_sdk/models/runagentop.py +1 -13
- orq_ai_sdk/models/streamrunagentop.py +1 -13
- orq_ai_sdk/models/updateagentop.py +0 -24
- orq_ai_sdk/models/updateconversationop.py +1 -1
- orq_ai_sdk/models/updatedatapointop.py +4 -4
- orq_ai_sdk/models/updatedatasetop.py +1 -1
- orq_ai_sdk/models/updatedatasourceop.py +1 -1
- orq_ai_sdk/models/updateevalop.py +14 -14
- orq_ai_sdk/models/updateidentityop.py +1 -1
- orq_ai_sdk/models/updatepromptop.py +0 -12
- orq_ai_sdk/models/updatetoolop.py +7 -7
- orq_ai_sdk/orq_completions.py +0 -6
- orq_ai_sdk/rerank.py +0 -98
- orq_ai_sdk/speech.py +1 -83
- orq_ai_sdk/transcriptions.py +0 -90
- orq_ai_sdk/translations.py +1 -87
- orq_ai_sdk/variations.py +1 -111
- {orq_ai_sdk-4.2.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/METADATA +202 -202
- {orq_ai_sdk-4.2.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/RECORD +75 -75
- {orq_ai_sdk-4.2.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.16.dist-info → orq_ai_sdk-4.3.0rc0.dist-info}/top_level.txt +0 -0
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
|
|
9
|
+
from typing import Mapping, Optional, Union
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class Speech(BaseSDK):
|
|
@@ -20,31 +20,6 @@ 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,
|
|
48
23
|
orq: Optional[
|
|
49
24
|
Union[
|
|
50
25
|
models_createspeechop.CreateSpeechOrq,
|
|
@@ -73,11 +48,6 @@ class Speech(BaseSDK):
|
|
|
73
48
|
`aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
|
|
74
49
|
: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.
|
|
75
50
|
: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.
|
|
81
51
|
:param orq:
|
|
82
52
|
:param retries: Override the default retry configuration for this method
|
|
83
53
|
:param server_url: Override the default server URL for this method
|
|
@@ -103,17 +73,6 @@ class Speech(BaseSDK):
|
|
|
103
73
|
voice=voice,
|
|
104
74
|
response_format=response_format,
|
|
105
75
|
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
|
-
),
|
|
117
76
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateSpeechOrq]),
|
|
118
77
|
)
|
|
119
78
|
|
|
@@ -181,31 +140,6 @@ class Speech(BaseSDK):
|
|
|
181
140
|
models_createspeechop.CreateSpeechResponseFormat
|
|
182
141
|
] = "mp3",
|
|
183
142
|
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,
|
|
209
143
|
orq: Optional[
|
|
210
144
|
Union[
|
|
211
145
|
models_createspeechop.CreateSpeechOrq,
|
|
@@ -234,11 +168,6 @@ class Speech(BaseSDK):
|
|
|
234
168
|
`aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
|
|
235
169
|
: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.
|
|
236
170
|
: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.
|
|
242
171
|
:param orq:
|
|
243
172
|
:param retries: Override the default retry configuration for this method
|
|
244
173
|
:param server_url: Override the default server URL for this method
|
|
@@ -264,17 +193,6 @@ class Speech(BaseSDK):
|
|
|
264
193
|
voice=voice,
|
|
265
194
|
response_format=response_format,
|
|
266
195
|
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
|
-
),
|
|
278
196
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateSpeechOrq]),
|
|
279
197
|
)
|
|
280
198
|
|
orq_ai_sdk/transcriptions.py
CHANGED
|
@@ -31,33 +31,6 @@ 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,
|
|
61
34
|
orq: Optional[
|
|
62
35
|
Union[
|
|
63
36
|
models_createtranscriptionop.CreateTranscriptionOrq,
|
|
@@ -88,11 +61,6 @@ class Transcriptions(BaseSDK):
|
|
|
88
61
|
: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.
|
|
89
62
|
:param language: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
|
|
90
63
|
: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.
|
|
96
64
|
:param orq:
|
|
97
65
|
: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.
|
|
98
66
|
:param retries: Override the default retry configuration for this method
|
|
@@ -125,19 +93,6 @@ class Transcriptions(BaseSDK):
|
|
|
125
93
|
temperature=temperature,
|
|
126
94
|
language=language,
|
|
127
95
|
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
|
-
),
|
|
141
96
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranscriptionOrq]),
|
|
142
97
|
file=utils.get_pydantic_model(
|
|
143
98
|
file, Optional[models.CreateTranscriptionFile]
|
|
@@ -233,33 +188,6 @@ class Transcriptions(BaseSDK):
|
|
|
233
188
|
timestamp_granularities: Optional[
|
|
234
189
|
List[models_createtranscriptionop.TimestampGranularities]
|
|
235
190
|
] = 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,
|
|
263
191
|
orq: Optional[
|
|
264
192
|
Union[
|
|
265
193
|
models_createtranscriptionop.CreateTranscriptionOrq,
|
|
@@ -290,11 +218,6 @@ class Transcriptions(BaseSDK):
|
|
|
290
218
|
: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.
|
|
291
219
|
:param language: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
|
|
292
220
|
: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.
|
|
298
221
|
:param orq:
|
|
299
222
|
: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.
|
|
300
223
|
:param retries: Override the default retry configuration for this method
|
|
@@ -327,19 +250,6 @@ class Transcriptions(BaseSDK):
|
|
|
327
250
|
temperature=temperature,
|
|
328
251
|
language=language,
|
|
329
252
|
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
|
-
),
|
|
343
253
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranscriptionOrq]),
|
|
344
254
|
file=utils.get_pydantic_model(
|
|
345
255
|
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,
|
|
10
|
+
from typing import Any, Mapping, Optional, Union
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Translations(BaseSDK):
|
|
@@ -27,31 +27,6 @@ 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,
|
|
55
30
|
orq: Optional[
|
|
56
31
|
Union[
|
|
57
32
|
models_createtranslationop.CreateTranslationOrq,
|
|
@@ -80,11 +55,6 @@ class Translations(BaseSDK):
|
|
|
80
55
|
:param num_speakers: The maximum amount of speakers talking in the uploaded file. Helps with predicting who speaks when, the maximum is 32.
|
|
81
56
|
:param timestamps_granularity: The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.
|
|
82
57
|
: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.
|
|
88
58
|
:param orq:
|
|
89
59
|
: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.
|
|
90
60
|
:param retries: Override the default retry configuration for this method
|
|
@@ -115,19 +85,6 @@ class Translations(BaseSDK):
|
|
|
115
85
|
num_speakers=num_speakers,
|
|
116
86
|
timestamps_granularity=timestamps_granularity,
|
|
117
87
|
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
|
-
),
|
|
131
88
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranslationOrq]),
|
|
132
89
|
file=utils.get_pydantic_model(file, Optional[models.CreateTranslationFile]),
|
|
133
90
|
)
|
|
@@ -213,31 +170,6 @@ class Translations(BaseSDK):
|
|
|
213
170
|
models_createtranslationop.CreateTranslationTimestampsGranularity
|
|
214
171
|
] = "word",
|
|
215
172
|
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,
|
|
241
173
|
orq: Optional[
|
|
242
174
|
Union[
|
|
243
175
|
models_createtranslationop.CreateTranslationOrq,
|
|
@@ -266,11 +198,6 @@ class Translations(BaseSDK):
|
|
|
266
198
|
:param num_speakers: The maximum amount of speakers talking in the uploaded file. Helps with predicting who speaks when, the maximum is 32.
|
|
267
199
|
:param timestamps_granularity: The granularity of the timestamps in the transcription. Word provides word-level timestamps and character provides character-level timestamps per word.
|
|
268
200
|
: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.
|
|
274
201
|
:param orq:
|
|
275
202
|
: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.
|
|
276
203
|
:param retries: Override the default retry configuration for this method
|
|
@@ -301,19 +228,6 @@ class Translations(BaseSDK):
|
|
|
301
228
|
num_speakers=num_speakers,
|
|
302
229
|
timestamps_granularity=timestamps_granularity,
|
|
303
230
|
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
|
-
),
|
|
317
231
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateTranslationOrq]),
|
|
318
232
|
file=utils.get_pydantic_model(file, Optional[models.CreateTranslationFile]),
|
|
319
233
|
)
|
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,
|
|
10
|
+
from typing import Any, Mapping, Optional, Union
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Variations(BaseSDK):
|
|
@@ -22,39 +22,6 @@ 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,
|
|
58
25
|
orq: Optional[
|
|
59
26
|
Union[
|
|
60
27
|
models_createimagevariationop.CreateImageVariationOrq,
|
|
@@ -76,12 +43,6 @@ class Variations(BaseSDK):
|
|
|
76
43
|
: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.
|
|
77
44
|
:param size: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
78
45
|
: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.
|
|
85
46
|
:param orq:
|
|
86
47
|
:param retries: Override the default retry configuration for this method
|
|
87
48
|
:param server_url: Override the default server URL for this method
|
|
@@ -108,22 +69,6 @@ class Variations(BaseSDK):
|
|
|
108
69
|
response_format=response_format,
|
|
109
70
|
size=size,
|
|
110
71
|
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
|
-
),
|
|
127
72
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageVariationOrq]),
|
|
128
73
|
)
|
|
129
74
|
|
|
@@ -198,39 +143,6 @@ class Variations(BaseSDK):
|
|
|
198
143
|
] = "url",
|
|
199
144
|
size: Optional[models_createimagevariationop.Size] = "1024x1024",
|
|
200
145
|
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,
|
|
234
146
|
orq: Optional[
|
|
235
147
|
Union[
|
|
236
148
|
models_createimagevariationop.CreateImageVariationOrq,
|
|
@@ -252,12 +164,6 @@ class Variations(BaseSDK):
|
|
|
252
164
|
: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.
|
|
253
165
|
:param size: The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
|
254
166
|
: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.
|
|
261
167
|
:param orq:
|
|
262
168
|
:param retries: Override the default retry configuration for this method
|
|
263
169
|
:param server_url: Override the default server URL for this method
|
|
@@ -284,22 +190,6 @@ class Variations(BaseSDK):
|
|
|
284
190
|
response_format=response_format,
|
|
285
191
|
size=size,
|
|
286
192
|
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
|
-
),
|
|
303
193
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageVariationOrq]),
|
|
304
194
|
)
|
|
305
195
|
|