orq-ai-sdk 4.2.6__py3-none-any.whl → 4.3.0rc9__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 +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.6.dist-info → orq_ai_sdk-4.3.0rc9.dist-info}/METADATA +202 -202
- {orq_ai_sdk-4.2.6.dist-info → orq_ai_sdk-4.3.0rc9.dist-info}/RECORD +75 -75
- {orq_ai_sdk-4.2.6.dist-info → orq_ai_sdk-4.3.0rc9.dist-info}/WHEEL +1 -1
- {orq_ai_sdk-4.2.6.dist-info → orq_ai_sdk-4.3.0rc9.dist-info}/top_level.txt +0 -0
orq_ai_sdk/edits.py
CHANGED
|
@@ -7,7 +7,7 @@ from orq_ai_sdk.models import createimageeditop as models_createimageeditop
|
|
|
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 Edits(BaseSDK):
|
|
@@ -26,6 +26,37 @@ class Edits(BaseSDK):
|
|
|
26
26
|
models_createimageeditop.CreateImageEditResponseFormat
|
|
27
27
|
] = None,
|
|
28
28
|
user: Optional[str] = None,
|
|
29
|
+
name: Optional[str] = None,
|
|
30
|
+
fallbacks: Optional[
|
|
31
|
+
Union[
|
|
32
|
+
List[models_createimageeditop.CreateImageEditFallbacks],
|
|
33
|
+
List[models_createimageeditop.CreateImageEditFallbacksTypedDict],
|
|
34
|
+
]
|
|
35
|
+
] = None,
|
|
36
|
+
retry: Optional[
|
|
37
|
+
Union[
|
|
38
|
+
models_createimageeditop.CreateImageEditRetry,
|
|
39
|
+
models_createimageeditop.CreateImageEditRetryTypedDict,
|
|
40
|
+
]
|
|
41
|
+
] = None,
|
|
42
|
+
cache: Optional[
|
|
43
|
+
Union[
|
|
44
|
+
models_createimageeditop.CreateImageEditCache,
|
|
45
|
+
models_createimageeditop.CreateImageEditCacheTypedDict,
|
|
46
|
+
]
|
|
47
|
+
] = None,
|
|
48
|
+
load_balancer: Optional[
|
|
49
|
+
Union[
|
|
50
|
+
models_createimageeditop.CreateImageEditLoadBalancer,
|
|
51
|
+
models_createimageeditop.CreateImageEditLoadBalancerTypedDict,
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
timeout: Optional[
|
|
55
|
+
Union[
|
|
56
|
+
models_createimageeditop.CreateImageEditTimeout,
|
|
57
|
+
models_createimageeditop.CreateImageEditTimeoutTypedDict,
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
29
60
|
orq: Optional[
|
|
30
61
|
Union[
|
|
31
62
|
models_createimageeditop.CreateImageEditOrq,
|
|
@@ -49,6 +80,12 @@ class Edits(BaseSDK):
|
|
|
49
80
|
:param quality: The quality of the image that will be generated. Auto will automatically select the best quality for the given model.
|
|
50
81
|
:param response_format: The format in which the generated images are returned. Some of the models only return the image in base64 format.
|
|
51
82
|
:param user: A unique identifier representing your end-user, which can help to monitor and detect abuse.
|
|
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 cache: Cache configuration for the request.
|
|
87
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
88
|
+
: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.
|
|
52
89
|
:param orq:
|
|
53
90
|
:param retries: Override the default retry configuration for this method
|
|
54
91
|
:param server_url: Override the default server URL for this method
|
|
@@ -77,6 +114,22 @@ class Edits(BaseSDK):
|
|
|
77
114
|
quality=quality,
|
|
78
115
|
response_format=response_format,
|
|
79
116
|
user=user,
|
|
117
|
+
name=name,
|
|
118
|
+
fallbacks=utils.get_pydantic_model(
|
|
119
|
+
fallbacks, Optional[List[models.CreateImageEditFallbacks]]
|
|
120
|
+
),
|
|
121
|
+
retry=utils.get_pydantic_model(
|
|
122
|
+
retry, Optional[models.CreateImageEditRetry]
|
|
123
|
+
),
|
|
124
|
+
cache=utils.get_pydantic_model(
|
|
125
|
+
cache, Optional[models.CreateImageEditCache]
|
|
126
|
+
),
|
|
127
|
+
load_balancer=utils.get_pydantic_model(
|
|
128
|
+
load_balancer, Optional[models.CreateImageEditLoadBalancer]
|
|
129
|
+
),
|
|
130
|
+
timeout=utils.get_pydantic_model(
|
|
131
|
+
timeout, Optional[models.CreateImageEditTimeout]
|
|
132
|
+
),
|
|
80
133
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageEditOrq]),
|
|
81
134
|
)
|
|
82
135
|
|
|
@@ -149,6 +202,37 @@ class Edits(BaseSDK):
|
|
|
149
202
|
models_createimageeditop.CreateImageEditResponseFormat
|
|
150
203
|
] = None,
|
|
151
204
|
user: Optional[str] = None,
|
|
205
|
+
name: Optional[str] = None,
|
|
206
|
+
fallbacks: Optional[
|
|
207
|
+
Union[
|
|
208
|
+
List[models_createimageeditop.CreateImageEditFallbacks],
|
|
209
|
+
List[models_createimageeditop.CreateImageEditFallbacksTypedDict],
|
|
210
|
+
]
|
|
211
|
+
] = None,
|
|
212
|
+
retry: Optional[
|
|
213
|
+
Union[
|
|
214
|
+
models_createimageeditop.CreateImageEditRetry,
|
|
215
|
+
models_createimageeditop.CreateImageEditRetryTypedDict,
|
|
216
|
+
]
|
|
217
|
+
] = None,
|
|
218
|
+
cache: Optional[
|
|
219
|
+
Union[
|
|
220
|
+
models_createimageeditop.CreateImageEditCache,
|
|
221
|
+
models_createimageeditop.CreateImageEditCacheTypedDict,
|
|
222
|
+
]
|
|
223
|
+
] = None,
|
|
224
|
+
load_balancer: Optional[
|
|
225
|
+
Union[
|
|
226
|
+
models_createimageeditop.CreateImageEditLoadBalancer,
|
|
227
|
+
models_createimageeditop.CreateImageEditLoadBalancerTypedDict,
|
|
228
|
+
]
|
|
229
|
+
] = None,
|
|
230
|
+
timeout: Optional[
|
|
231
|
+
Union[
|
|
232
|
+
models_createimageeditop.CreateImageEditTimeout,
|
|
233
|
+
models_createimageeditop.CreateImageEditTimeoutTypedDict,
|
|
234
|
+
]
|
|
235
|
+
] = None,
|
|
152
236
|
orq: Optional[
|
|
153
237
|
Union[
|
|
154
238
|
models_createimageeditop.CreateImageEditOrq,
|
|
@@ -172,6 +256,12 @@ class Edits(BaseSDK):
|
|
|
172
256
|
:param quality: The quality of the image that will be generated. Auto will automatically select the best quality for the given model.
|
|
173
257
|
:param response_format: The format in which the generated images are returned. Some of the models only return the image in base64 format.
|
|
174
258
|
:param user: A unique identifier representing your end-user, which can help to monitor and detect abuse.
|
|
259
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
260
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
261
|
+
:param retry: Retry configuration for the request
|
|
262
|
+
:param cache: Cache configuration for the request.
|
|
263
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
264
|
+
: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.
|
|
175
265
|
:param orq:
|
|
176
266
|
:param retries: Override the default retry configuration for this method
|
|
177
267
|
:param server_url: Override the default server URL for this method
|
|
@@ -200,6 +290,22 @@ class Edits(BaseSDK):
|
|
|
200
290
|
quality=quality,
|
|
201
291
|
response_format=response_format,
|
|
202
292
|
user=user,
|
|
293
|
+
name=name,
|
|
294
|
+
fallbacks=utils.get_pydantic_model(
|
|
295
|
+
fallbacks, Optional[List[models.CreateImageEditFallbacks]]
|
|
296
|
+
),
|
|
297
|
+
retry=utils.get_pydantic_model(
|
|
298
|
+
retry, Optional[models.CreateImageEditRetry]
|
|
299
|
+
),
|
|
300
|
+
cache=utils.get_pydantic_model(
|
|
301
|
+
cache, Optional[models.CreateImageEditCache]
|
|
302
|
+
),
|
|
303
|
+
load_balancer=utils.get_pydantic_model(
|
|
304
|
+
load_balancer, Optional[models.CreateImageEditLoadBalancer]
|
|
305
|
+
),
|
|
306
|
+
timeout=utils.get_pydantic_model(
|
|
307
|
+
timeout, Optional[models.CreateImageEditTimeout]
|
|
308
|
+
),
|
|
203
309
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageEditOrq]),
|
|
204
310
|
)
|
|
205
311
|
|
orq_ai_sdk/embeddings.py
CHANGED
|
@@ -7,7 +7,7 @@ from orq_ai_sdk.models import createembeddingop as models_createembeddingop
|
|
|
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 Mapping, Optional, Union
|
|
10
|
+
from typing import List, Mapping, Optional, Union
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Embeddings(BaseSDK):
|
|
@@ -22,6 +22,37 @@ class Embeddings(BaseSDK):
|
|
|
22
22
|
encoding_format: Optional[models_createembeddingop.EncodingFormat] = "float",
|
|
23
23
|
dimensions: Optional[float] = None,
|
|
24
24
|
user: Optional[str] = None,
|
|
25
|
+
name: Optional[str] = None,
|
|
26
|
+
fallbacks: Optional[
|
|
27
|
+
Union[
|
|
28
|
+
List[models_createembeddingop.CreateEmbeddingFallbacks],
|
|
29
|
+
List[models_createembeddingop.CreateEmbeddingFallbacksTypedDict],
|
|
30
|
+
]
|
|
31
|
+
] = None,
|
|
32
|
+
retry: Optional[
|
|
33
|
+
Union[
|
|
34
|
+
models_createembeddingop.CreateEmbeddingRetry,
|
|
35
|
+
models_createembeddingop.CreateEmbeddingRetryTypedDict,
|
|
36
|
+
]
|
|
37
|
+
] = None,
|
|
38
|
+
cache: Optional[
|
|
39
|
+
Union[
|
|
40
|
+
models_createembeddingop.CreateEmbeddingCache,
|
|
41
|
+
models_createembeddingop.CreateEmbeddingCacheTypedDict,
|
|
42
|
+
]
|
|
43
|
+
] = None,
|
|
44
|
+
load_balancer: Optional[
|
|
45
|
+
Union[
|
|
46
|
+
models_createembeddingop.CreateEmbeddingLoadBalancer,
|
|
47
|
+
models_createembeddingop.CreateEmbeddingLoadBalancerTypedDict,
|
|
48
|
+
]
|
|
49
|
+
] = None,
|
|
50
|
+
timeout: Optional[
|
|
51
|
+
Union[
|
|
52
|
+
models_createembeddingop.CreateEmbeddingTimeout,
|
|
53
|
+
models_createembeddingop.CreateEmbeddingTimeoutTypedDict,
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
25
56
|
orq: Optional[
|
|
26
57
|
Union[
|
|
27
58
|
models_createembeddingop.CreateEmbeddingOrq,
|
|
@@ -42,6 +73,12 @@ class Embeddings(BaseSDK):
|
|
|
42
73
|
:param encoding_format: Type of the document element
|
|
43
74
|
:param dimensions: The number of dimensions the resulting output embeddings should have.
|
|
44
75
|
:param user: A unique identifier representing your end-user
|
|
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 cache: Cache configuration for the request.
|
|
80
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
81
|
+
: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.
|
|
45
82
|
:param orq:
|
|
46
83
|
:param retries: Override the default retry configuration for this method
|
|
47
84
|
:param server_url: Override the default server URL for this method
|
|
@@ -67,6 +104,22 @@ class Embeddings(BaseSDK):
|
|
|
67
104
|
encoding_format=encoding_format,
|
|
68
105
|
dimensions=dimensions,
|
|
69
106
|
user=user,
|
|
107
|
+
name=name,
|
|
108
|
+
fallbacks=utils.get_pydantic_model(
|
|
109
|
+
fallbacks, Optional[List[models.CreateEmbeddingFallbacks]]
|
|
110
|
+
),
|
|
111
|
+
retry=utils.get_pydantic_model(
|
|
112
|
+
retry, Optional[models.CreateEmbeddingRetry]
|
|
113
|
+
),
|
|
114
|
+
cache=utils.get_pydantic_model(
|
|
115
|
+
cache, Optional[models.CreateEmbeddingCache]
|
|
116
|
+
),
|
|
117
|
+
load_balancer=utils.get_pydantic_model(
|
|
118
|
+
load_balancer, Optional[models.CreateEmbeddingLoadBalancer]
|
|
119
|
+
),
|
|
120
|
+
timeout=utils.get_pydantic_model(
|
|
121
|
+
timeout, Optional[models.CreateEmbeddingTimeout]
|
|
122
|
+
),
|
|
70
123
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateEmbeddingOrq]),
|
|
71
124
|
)
|
|
72
125
|
|
|
@@ -135,6 +188,37 @@ class Embeddings(BaseSDK):
|
|
|
135
188
|
encoding_format: Optional[models_createembeddingop.EncodingFormat] = "float",
|
|
136
189
|
dimensions: Optional[float] = None,
|
|
137
190
|
user: Optional[str] = None,
|
|
191
|
+
name: Optional[str] = None,
|
|
192
|
+
fallbacks: Optional[
|
|
193
|
+
Union[
|
|
194
|
+
List[models_createembeddingop.CreateEmbeddingFallbacks],
|
|
195
|
+
List[models_createembeddingop.CreateEmbeddingFallbacksTypedDict],
|
|
196
|
+
]
|
|
197
|
+
] = None,
|
|
198
|
+
retry: Optional[
|
|
199
|
+
Union[
|
|
200
|
+
models_createembeddingop.CreateEmbeddingRetry,
|
|
201
|
+
models_createembeddingop.CreateEmbeddingRetryTypedDict,
|
|
202
|
+
]
|
|
203
|
+
] = None,
|
|
204
|
+
cache: Optional[
|
|
205
|
+
Union[
|
|
206
|
+
models_createembeddingop.CreateEmbeddingCache,
|
|
207
|
+
models_createembeddingop.CreateEmbeddingCacheTypedDict,
|
|
208
|
+
]
|
|
209
|
+
] = None,
|
|
210
|
+
load_balancer: Optional[
|
|
211
|
+
Union[
|
|
212
|
+
models_createembeddingop.CreateEmbeddingLoadBalancer,
|
|
213
|
+
models_createembeddingop.CreateEmbeddingLoadBalancerTypedDict,
|
|
214
|
+
]
|
|
215
|
+
] = None,
|
|
216
|
+
timeout: Optional[
|
|
217
|
+
Union[
|
|
218
|
+
models_createembeddingop.CreateEmbeddingTimeout,
|
|
219
|
+
models_createembeddingop.CreateEmbeddingTimeoutTypedDict,
|
|
220
|
+
]
|
|
221
|
+
] = None,
|
|
138
222
|
orq: Optional[
|
|
139
223
|
Union[
|
|
140
224
|
models_createembeddingop.CreateEmbeddingOrq,
|
|
@@ -155,6 +239,12 @@ class Embeddings(BaseSDK):
|
|
|
155
239
|
:param encoding_format: Type of the document element
|
|
156
240
|
:param dimensions: The number of dimensions the resulting output embeddings should have.
|
|
157
241
|
:param user: A unique identifier representing your end-user
|
|
242
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
243
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
244
|
+
:param retry: Retry configuration for the request
|
|
245
|
+
:param cache: Cache configuration for the request.
|
|
246
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
247
|
+
: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.
|
|
158
248
|
:param orq:
|
|
159
249
|
:param retries: Override the default retry configuration for this method
|
|
160
250
|
:param server_url: Override the default server URL for this method
|
|
@@ -180,6 +270,22 @@ class Embeddings(BaseSDK):
|
|
|
180
270
|
encoding_format=encoding_format,
|
|
181
271
|
dimensions=dimensions,
|
|
182
272
|
user=user,
|
|
273
|
+
name=name,
|
|
274
|
+
fallbacks=utils.get_pydantic_model(
|
|
275
|
+
fallbacks, Optional[List[models.CreateEmbeddingFallbacks]]
|
|
276
|
+
),
|
|
277
|
+
retry=utils.get_pydantic_model(
|
|
278
|
+
retry, Optional[models.CreateEmbeddingRetry]
|
|
279
|
+
),
|
|
280
|
+
cache=utils.get_pydantic_model(
|
|
281
|
+
cache, Optional[models.CreateEmbeddingCache]
|
|
282
|
+
),
|
|
283
|
+
load_balancer=utils.get_pydantic_model(
|
|
284
|
+
load_balancer, Optional[models.CreateEmbeddingLoadBalancer]
|
|
285
|
+
),
|
|
286
|
+
timeout=utils.get_pydantic_model(
|
|
287
|
+
timeout, Optional[models.CreateEmbeddingTimeout]
|
|
288
|
+
),
|
|
183
289
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateEmbeddingOrq]),
|
|
184
290
|
)
|
|
185
291
|
|
orq_ai_sdk/generations.py
CHANGED
|
@@ -7,7 +7,7 @@ from orq_ai_sdk.models import createimageop as models_createimageop
|
|
|
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 Mapping, Optional, Union
|
|
10
|
+
from typing import List, Mapping, Optional, Union
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Generations(BaseSDK):
|
|
@@ -27,6 +27,37 @@ class Generations(BaseSDK):
|
|
|
27
27
|
] = UNSET,
|
|
28
28
|
size: OptionalNullable[str] = UNSET,
|
|
29
29
|
style: OptionalNullable[models_createimageop.Style] = UNSET,
|
|
30
|
+
name: Optional[str] = None,
|
|
31
|
+
fallbacks: Optional[
|
|
32
|
+
Union[
|
|
33
|
+
List[models_createimageop.CreateImageFallbacks],
|
|
34
|
+
List[models_createimageop.CreateImageFallbacksTypedDict],
|
|
35
|
+
]
|
|
36
|
+
] = None,
|
|
37
|
+
retry: Optional[
|
|
38
|
+
Union[
|
|
39
|
+
models_createimageop.CreateImageRetry,
|
|
40
|
+
models_createimageop.CreateImageRetryTypedDict,
|
|
41
|
+
]
|
|
42
|
+
] = None,
|
|
43
|
+
cache: Optional[
|
|
44
|
+
Union[
|
|
45
|
+
models_createimageop.CreateImageCache,
|
|
46
|
+
models_createimageop.CreateImageCacheTypedDict,
|
|
47
|
+
]
|
|
48
|
+
] = None,
|
|
49
|
+
load_balancer: Optional[
|
|
50
|
+
Union[
|
|
51
|
+
models_createimageop.CreateImageLoadBalancer,
|
|
52
|
+
models_createimageop.CreateImageLoadBalancerTypedDict,
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
timeout: Optional[
|
|
56
|
+
Union[
|
|
57
|
+
models_createimageop.CreateImageTimeout,
|
|
58
|
+
models_createimageop.CreateImageTimeoutTypedDict,
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
30
61
|
orq: Optional[
|
|
31
62
|
Union[
|
|
32
63
|
models_createimageop.CreateImageOrq,
|
|
@@ -53,6 +84,12 @@ class Generations(BaseSDK):
|
|
|
53
84
|
:param response_format: The format in which generated images are returned. Must be one of `url` or `b64_json`. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
|
|
54
85
|
:param size: The size of the generated images. Must be one of the specified sizes for each model.
|
|
55
86
|
:param style: The style of the generated images. This parameter is only supported for `openai/dall-e-3`. Must be one of `vivid` or `natural`.
|
|
87
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
88
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
89
|
+
:param retry: Retry configuration for the request
|
|
90
|
+
:param cache: Cache configuration for the request.
|
|
91
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
92
|
+
: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.
|
|
56
93
|
:param orq:
|
|
57
94
|
:param retries: Override the default retry configuration for this method
|
|
58
95
|
:param server_url: Override the default server URL for this method
|
|
@@ -84,6 +121,18 @@ class Generations(BaseSDK):
|
|
|
84
121
|
response_format=response_format,
|
|
85
122
|
size=size,
|
|
86
123
|
style=style,
|
|
124
|
+
name=name,
|
|
125
|
+
fallbacks=utils.get_pydantic_model(
|
|
126
|
+
fallbacks, Optional[List[models.CreateImageFallbacks]]
|
|
127
|
+
),
|
|
128
|
+
retry=utils.get_pydantic_model(retry, Optional[models.CreateImageRetry]),
|
|
129
|
+
cache=utils.get_pydantic_model(cache, Optional[models.CreateImageCache]),
|
|
130
|
+
load_balancer=utils.get_pydantic_model(
|
|
131
|
+
load_balancer, Optional[models.CreateImageLoadBalancer]
|
|
132
|
+
),
|
|
133
|
+
timeout=utils.get_pydantic_model(
|
|
134
|
+
timeout, Optional[models.CreateImageTimeout]
|
|
135
|
+
),
|
|
87
136
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageOrq]),
|
|
88
137
|
)
|
|
89
138
|
|
|
@@ -157,6 +206,37 @@ class Generations(BaseSDK):
|
|
|
157
206
|
] = UNSET,
|
|
158
207
|
size: OptionalNullable[str] = UNSET,
|
|
159
208
|
style: OptionalNullable[models_createimageop.Style] = UNSET,
|
|
209
|
+
name: Optional[str] = None,
|
|
210
|
+
fallbacks: Optional[
|
|
211
|
+
Union[
|
|
212
|
+
List[models_createimageop.CreateImageFallbacks],
|
|
213
|
+
List[models_createimageop.CreateImageFallbacksTypedDict],
|
|
214
|
+
]
|
|
215
|
+
] = None,
|
|
216
|
+
retry: Optional[
|
|
217
|
+
Union[
|
|
218
|
+
models_createimageop.CreateImageRetry,
|
|
219
|
+
models_createimageop.CreateImageRetryTypedDict,
|
|
220
|
+
]
|
|
221
|
+
] = None,
|
|
222
|
+
cache: Optional[
|
|
223
|
+
Union[
|
|
224
|
+
models_createimageop.CreateImageCache,
|
|
225
|
+
models_createimageop.CreateImageCacheTypedDict,
|
|
226
|
+
]
|
|
227
|
+
] = None,
|
|
228
|
+
load_balancer: Optional[
|
|
229
|
+
Union[
|
|
230
|
+
models_createimageop.CreateImageLoadBalancer,
|
|
231
|
+
models_createimageop.CreateImageLoadBalancerTypedDict,
|
|
232
|
+
]
|
|
233
|
+
] = None,
|
|
234
|
+
timeout: Optional[
|
|
235
|
+
Union[
|
|
236
|
+
models_createimageop.CreateImageTimeout,
|
|
237
|
+
models_createimageop.CreateImageTimeoutTypedDict,
|
|
238
|
+
]
|
|
239
|
+
] = None,
|
|
160
240
|
orq: Optional[
|
|
161
241
|
Union[
|
|
162
242
|
models_createimageop.CreateImageOrq,
|
|
@@ -183,6 +263,12 @@ class Generations(BaseSDK):
|
|
|
183
263
|
:param response_format: The format in which generated images are returned. Must be one of `url` or `b64_json`. This parameter isn't supported for `gpt-image-1` which will always return base64-encoded images.
|
|
184
264
|
:param size: The size of the generated images. Must be one of the specified sizes for each model.
|
|
185
265
|
:param style: The style of the generated images. This parameter is only supported for `openai/dall-e-3`. Must be one of `vivid` or `natural`.
|
|
266
|
+
:param name: The name to display on the trace. If not specified, the default system name will be used.
|
|
267
|
+
:param fallbacks: Array of fallback models to use if primary model fails
|
|
268
|
+
:param retry: Retry configuration for the request
|
|
269
|
+
:param cache: Cache configuration for the request.
|
|
270
|
+
:param load_balancer: Load balancer configuration for the request.
|
|
271
|
+
: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.
|
|
186
272
|
:param orq:
|
|
187
273
|
:param retries: Override the default retry configuration for this method
|
|
188
274
|
:param server_url: Override the default server URL for this method
|
|
@@ -214,6 +300,18 @@ class Generations(BaseSDK):
|
|
|
214
300
|
response_format=response_format,
|
|
215
301
|
size=size,
|
|
216
302
|
style=style,
|
|
303
|
+
name=name,
|
|
304
|
+
fallbacks=utils.get_pydantic_model(
|
|
305
|
+
fallbacks, Optional[List[models.CreateImageFallbacks]]
|
|
306
|
+
),
|
|
307
|
+
retry=utils.get_pydantic_model(retry, Optional[models.CreateImageRetry]),
|
|
308
|
+
cache=utils.get_pydantic_model(cache, Optional[models.CreateImageCache]),
|
|
309
|
+
load_balancer=utils.get_pydantic_model(
|
|
310
|
+
load_balancer, Optional[models.CreateImageLoadBalancer]
|
|
311
|
+
),
|
|
312
|
+
timeout=utils.get_pydantic_model(
|
|
313
|
+
timeout, Optional[models.CreateImageTimeout]
|
|
314
|
+
),
|
|
217
315
|
orq=utils.get_pydantic_model(orq, Optional[models.CreateImageOrq]),
|
|
218
316
|
)
|
|
219
317
|
|