orq-ai-sdk 4.2.0rc48__py3-none-any.whl → 4.2.12__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.
Files changed (103) hide show
  1. orq_ai_sdk/_hooks/globalhook.py +0 -1
  2. orq_ai_sdk/_version.py +3 -3
  3. orq_ai_sdk/audio.py +30 -0
  4. orq_ai_sdk/chat.py +22 -0
  5. orq_ai_sdk/completions.py +438 -0
  6. orq_ai_sdk/contacts.py +43 -886
  7. orq_ai_sdk/deployments.py +61 -0
  8. orq_ai_sdk/edits.py +364 -0
  9. orq_ai_sdk/embeddings.py +344 -0
  10. orq_ai_sdk/generations.py +370 -0
  11. orq_ai_sdk/images.py +28 -0
  12. orq_ai_sdk/models/__init__.py +3839 -424
  13. orq_ai_sdk/models/conversationresponse.py +1 -1
  14. orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
  15. orq_ai_sdk/models/createagentrequestop.py +768 -12
  16. orq_ai_sdk/models/createagentresponse.py +68 -2
  17. orq_ai_sdk/models/createchatcompletionop.py +538 -313
  18. orq_ai_sdk/models/createcompletionop.py +2078 -0
  19. orq_ai_sdk/models/createcontactop.py +5 -10
  20. orq_ai_sdk/models/createconversationop.py +1 -1
  21. orq_ai_sdk/models/createconversationresponseop.py +2 -2
  22. orq_ai_sdk/models/createdatasetitemop.py +4 -4
  23. orq_ai_sdk/models/createdatasetop.py +1 -1
  24. orq_ai_sdk/models/createdatasourceop.py +1 -1
  25. orq_ai_sdk/models/createembeddingop.py +579 -0
  26. orq_ai_sdk/models/createevalop.py +14 -14
  27. orq_ai_sdk/models/createidentityop.py +1 -1
  28. orq_ai_sdk/models/createimageeditop.py +715 -0
  29. orq_ai_sdk/models/createimageop.py +228 -82
  30. orq_ai_sdk/models/createimagevariationop.py +706 -0
  31. orq_ai_sdk/models/creatememoryop.py +4 -2
  32. orq_ai_sdk/models/createmoderationop.py +521 -0
  33. orq_ai_sdk/models/createpromptop.py +375 -6
  34. orq_ai_sdk/models/creatererankop.py +608 -0
  35. orq_ai_sdk/models/createresponseop.py +2567 -0
  36. orq_ai_sdk/models/createspeechop.py +466 -0
  37. orq_ai_sdk/models/createtoolop.py +6 -6
  38. orq_ai_sdk/models/createtranscriptionop.py +732 -0
  39. orq_ai_sdk/models/createtranslationop.py +702 -0
  40. orq_ai_sdk/models/deploymentgetconfigop.py +17 -7
  41. orq_ai_sdk/models/deploymentsop.py +1 -0
  42. orq_ai_sdk/models/deploymentstreamop.py +7 -0
  43. orq_ai_sdk/models/filegetop.py +1 -1
  44. orq_ai_sdk/models/filelistop.py +1 -1
  45. orq_ai_sdk/models/fileuploadop.py +1 -1
  46. orq_ai_sdk/models/generateconversationnameop.py +1 -1
  47. orq_ai_sdk/models/getallmemoriesop.py +4 -2
  48. orq_ai_sdk/models/getallpromptsop.py +188 -3
  49. orq_ai_sdk/models/getalltoolsop.py +6 -6
  50. orq_ai_sdk/models/getevalsop.py +17 -17
  51. orq_ai_sdk/models/getonepromptop.py +188 -3
  52. orq_ai_sdk/models/getpromptversionop.py +188 -3
  53. orq_ai_sdk/models/invokedeploymentrequest.py +11 -4
  54. orq_ai_sdk/models/listagentsop.py +372 -0
  55. orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
  56. orq_ai_sdk/models/listdatasetsop.py +1 -1
  57. orq_ai_sdk/models/listdatasourcesop.py +1 -1
  58. orq_ai_sdk/models/listidentitiesop.py +1 -1
  59. orq_ai_sdk/models/listmodelsop.py +1 -0
  60. orq_ai_sdk/models/listpromptversionsop.py +188 -3
  61. orq_ai_sdk/models/partdoneevent.py +1 -1
  62. orq_ai_sdk/models/post_v2_router_ocrop.py +408 -0
  63. orq_ai_sdk/models/publiccontact.py +9 -3
  64. orq_ai_sdk/models/publicidentity.py +62 -0
  65. orq_ai_sdk/models/reasoningpart.py +1 -1
  66. orq_ai_sdk/models/responsedoneevent.py +14 -11
  67. orq_ai_sdk/models/retrieveagentrequestop.py +382 -0
  68. orq_ai_sdk/models/retrievedatapointop.py +4 -4
  69. orq_ai_sdk/models/retrievedatasetop.py +1 -1
  70. orq_ai_sdk/models/retrievedatasourceop.py +1 -1
  71. orq_ai_sdk/models/retrieveidentityop.py +1 -1
  72. orq_ai_sdk/models/retrievememoryop.py +4 -2
  73. orq_ai_sdk/models/retrievetoolop.py +6 -6
  74. orq_ai_sdk/models/runagentop.py +379 -9
  75. orq_ai_sdk/models/streamrunagentop.py +385 -9
  76. orq_ai_sdk/models/updateagentop.py +770 -12
  77. orq_ai_sdk/models/updateconversationop.py +1 -1
  78. orq_ai_sdk/models/updatedatapointop.py +4 -4
  79. orq_ai_sdk/models/updatedatasetop.py +1 -1
  80. orq_ai_sdk/models/updatedatasourceop.py +1 -1
  81. orq_ai_sdk/models/updateevalop.py +14 -14
  82. orq_ai_sdk/models/updateidentityop.py +1 -1
  83. orq_ai_sdk/models/updatememoryop.py +4 -2
  84. orq_ai_sdk/models/updatepromptop.py +375 -6
  85. orq_ai_sdk/models/updatetoolop.py +7 -7
  86. orq_ai_sdk/moderations.py +218 -0
  87. orq_ai_sdk/orq_completions.py +666 -0
  88. orq_ai_sdk/orq_responses.py +398 -0
  89. orq_ai_sdk/rerank.py +330 -0
  90. orq_ai_sdk/router.py +89 -641
  91. orq_ai_sdk/speech.py +333 -0
  92. orq_ai_sdk/transcriptions.py +416 -0
  93. orq_ai_sdk/translations.py +384 -0
  94. orq_ai_sdk/variations.py +364 -0
  95. orq_ai_sdk-4.2.12.dist-info/METADATA +888 -0
  96. {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/RECORD +98 -75
  97. {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/WHEEL +1 -1
  98. orq_ai_sdk/models/deletecontactop.py +0 -44
  99. orq_ai_sdk/models/listcontactsop.py +0 -265
  100. orq_ai_sdk/models/retrievecontactop.py +0 -142
  101. orq_ai_sdk/models/updatecontactop.py +0 -233
  102. orq_ai_sdk-4.2.0rc48.dist-info/METADATA +0 -788
  103. {orq_ai_sdk-4.2.0rc48.dist-info → orq_ai_sdk-4.2.12.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,370 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .basesdk import BaseSDK
4
+ from orq_ai_sdk import models, utils
5
+ from orq_ai_sdk._hooks import HookContext
6
+ from orq_ai_sdk.models import createimageop as models_createimageop
7
+ from orq_ai_sdk.types import OptionalNullable, UNSET
8
+ from orq_ai_sdk.utils import get_security_from_env
9
+ from orq_ai_sdk.utils.unmarshal_json_response import unmarshal_json_response
10
+ from typing import List, Mapping, Optional, Union
11
+
12
+
13
+ class Generations(BaseSDK):
14
+ def create(
15
+ self,
16
+ *,
17
+ prompt: str,
18
+ model: str,
19
+ background: OptionalNullable[models_createimageop.Background] = UNSET,
20
+ moderation: OptionalNullable[models_createimageop.Moderation] = UNSET,
21
+ n: OptionalNullable[int] = 1,
22
+ output_compression: OptionalNullable[int] = UNSET,
23
+ output_format: OptionalNullable[models_createimageop.OutputFormat] = UNSET,
24
+ quality: OptionalNullable[models_createimageop.Quality] = UNSET,
25
+ response_format: OptionalNullable[
26
+ models_createimageop.CreateImageResponseFormat
27
+ ] = UNSET,
28
+ size: OptionalNullable[str] = UNSET,
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,
61
+ orq: Optional[
62
+ Union[
63
+ models_createimageop.CreateImageOrq,
64
+ models_createimageop.CreateImageOrqTypedDict,
65
+ ]
66
+ ] = None,
67
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
68
+ server_url: Optional[str] = None,
69
+ timeout_ms: Optional[int] = None,
70
+ http_headers: Optional[Mapping[str, str]] = None,
71
+ ) -> models.CreateImageResponseBody:
72
+ r"""Create image
73
+
74
+ Create an Image
75
+
76
+ :param prompt: A text description of the desired image(s).
77
+ :param model: The model to use for image generation. One of `openai/dall-e-2`, `openai/dall-e-3`, or `openai/gpt-image-1`.
78
+ :param background: Allows to set transparency for the background of the generated image(s). This parameter is only supported for `openai/gpt-image-1`.
79
+ :param moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` or `auto`.
80
+ :param n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
81
+ :param output_compression: The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats.
82
+ :param output_format: The format in which the generated images are returned. This parameter is only supported for `openai/gpt-image-1`.
83
+ :param quality: The quality of the image that will be generated. `auto` will automatically select the best quality for the given model.
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.
85
+ :param size: The size of the generated images. Must be one of the specified sizes for each model.
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.
93
+ :param orq:
94
+ :param retries: Override the default retry configuration for this method
95
+ :param server_url: Override the default server URL for this method
96
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
97
+ :param http_headers: Additional headers to set or replace on requests.
98
+ """
99
+ base_url = None
100
+ url_variables = None
101
+ if timeout_ms is None:
102
+ timeout_ms = self.sdk_configuration.timeout_ms
103
+
104
+ if timeout_ms is None:
105
+ timeout_ms = 600000
106
+
107
+ if server_url is not None:
108
+ base_url = server_url
109
+ else:
110
+ base_url = self._get_url(base_url, url_variables)
111
+
112
+ request = models.CreateImageRequestBody(
113
+ prompt=prompt,
114
+ background=background,
115
+ model=model,
116
+ moderation=moderation,
117
+ n=n,
118
+ output_compression=output_compression,
119
+ output_format=output_format,
120
+ quality=quality,
121
+ response_format=response_format,
122
+ size=size,
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
+ ),
136
+ orq=utils.get_pydantic_model(orq, Optional[models.CreateImageOrq]),
137
+ )
138
+
139
+ req = self._build_request(
140
+ method="POST",
141
+ path="/v2/router/images/generations",
142
+ base_url=base_url,
143
+ url_variables=url_variables,
144
+ request=request,
145
+ request_body_required=True,
146
+ request_has_path_params=False,
147
+ request_has_query_params=True,
148
+ user_agent_header="user-agent",
149
+ accept_header_value="application/json",
150
+ http_headers=http_headers,
151
+ security=self.sdk_configuration.security,
152
+ get_serialized_body=lambda: utils.serialize_request_body(
153
+ request, False, False, "json", models.CreateImageRequestBody
154
+ ),
155
+ allow_empty_value=None,
156
+ timeout_ms=timeout_ms,
157
+ )
158
+
159
+ if retries == UNSET:
160
+ if self.sdk_configuration.retry_config is not UNSET:
161
+ retries = self.sdk_configuration.retry_config
162
+
163
+ retry_config = None
164
+ if isinstance(retries, utils.RetryConfig):
165
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
166
+
167
+ http_res = self.do_request(
168
+ hook_ctx=HookContext(
169
+ config=self.sdk_configuration,
170
+ base_url=base_url or "",
171
+ operation_id="createImage",
172
+ oauth2_scopes=None,
173
+ security_source=get_security_from_env(
174
+ self.sdk_configuration.security, models.Security
175
+ ),
176
+ ),
177
+ request=req,
178
+ error_status_codes=["4XX", "5XX"],
179
+ retry_config=retry_config,
180
+ )
181
+
182
+ if utils.match_response(http_res, "200", "application/json"):
183
+ return unmarshal_json_response(models.CreateImageResponseBody, http_res)
184
+ if utils.match_response(http_res, "4XX", "*"):
185
+ http_res_text = utils.stream_to_text(http_res)
186
+ raise models.APIError("API error occurred", http_res, http_res_text)
187
+ if utils.match_response(http_res, "5XX", "*"):
188
+ http_res_text = utils.stream_to_text(http_res)
189
+ raise models.APIError("API error occurred", http_res, http_res_text)
190
+
191
+ raise models.APIError("Unexpected response received", http_res)
192
+
193
+ async def create_async(
194
+ self,
195
+ *,
196
+ prompt: str,
197
+ model: str,
198
+ background: OptionalNullable[models_createimageop.Background] = UNSET,
199
+ moderation: OptionalNullable[models_createimageop.Moderation] = UNSET,
200
+ n: OptionalNullable[int] = 1,
201
+ output_compression: OptionalNullable[int] = UNSET,
202
+ output_format: OptionalNullable[models_createimageop.OutputFormat] = UNSET,
203
+ quality: OptionalNullable[models_createimageop.Quality] = UNSET,
204
+ response_format: OptionalNullable[
205
+ models_createimageop.CreateImageResponseFormat
206
+ ] = UNSET,
207
+ size: OptionalNullable[str] = UNSET,
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,
240
+ orq: Optional[
241
+ Union[
242
+ models_createimageop.CreateImageOrq,
243
+ models_createimageop.CreateImageOrqTypedDict,
244
+ ]
245
+ ] = None,
246
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
247
+ server_url: Optional[str] = None,
248
+ timeout_ms: Optional[int] = None,
249
+ http_headers: Optional[Mapping[str, str]] = None,
250
+ ) -> models.CreateImageResponseBody:
251
+ r"""Create image
252
+
253
+ Create an Image
254
+
255
+ :param prompt: A text description of the desired image(s).
256
+ :param model: The model to use for image generation. One of `openai/dall-e-2`, `openai/dall-e-3`, or `openai/gpt-image-1`.
257
+ :param background: Allows to set transparency for the background of the generated image(s). This parameter is only supported for `openai/gpt-image-1`.
258
+ :param moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must be either `low` or `auto`.
259
+ :param n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported.
260
+ :param output_compression: The compression level (0-100%) for the generated images. This parameter is only supported for `gpt-image-1` with the `webp` or `jpeg` output formats.
261
+ :param output_format: The format in which the generated images are returned. This parameter is only supported for `openai/gpt-image-1`.
262
+ :param quality: The quality of the image that will be generated. `auto` will automatically select the best quality for the given model.
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.
264
+ :param size: The size of the generated images. Must be one of the specified sizes for each model.
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.
272
+ :param orq:
273
+ :param retries: Override the default retry configuration for this method
274
+ :param server_url: Override the default server URL for this method
275
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
276
+ :param http_headers: Additional headers to set or replace on requests.
277
+ """
278
+ base_url = None
279
+ url_variables = None
280
+ if timeout_ms is None:
281
+ timeout_ms = self.sdk_configuration.timeout_ms
282
+
283
+ if timeout_ms is None:
284
+ timeout_ms = 600000
285
+
286
+ if server_url is not None:
287
+ base_url = server_url
288
+ else:
289
+ base_url = self._get_url(base_url, url_variables)
290
+
291
+ request = models.CreateImageRequestBody(
292
+ prompt=prompt,
293
+ background=background,
294
+ model=model,
295
+ moderation=moderation,
296
+ n=n,
297
+ output_compression=output_compression,
298
+ output_format=output_format,
299
+ quality=quality,
300
+ response_format=response_format,
301
+ size=size,
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
+ ),
315
+ orq=utils.get_pydantic_model(orq, Optional[models.CreateImageOrq]),
316
+ )
317
+
318
+ req = self._build_request_async(
319
+ method="POST",
320
+ path="/v2/router/images/generations",
321
+ base_url=base_url,
322
+ url_variables=url_variables,
323
+ request=request,
324
+ request_body_required=True,
325
+ request_has_path_params=False,
326
+ request_has_query_params=True,
327
+ user_agent_header="user-agent",
328
+ accept_header_value="application/json",
329
+ http_headers=http_headers,
330
+ security=self.sdk_configuration.security,
331
+ get_serialized_body=lambda: utils.serialize_request_body(
332
+ request, False, False, "json", models.CreateImageRequestBody
333
+ ),
334
+ allow_empty_value=None,
335
+ timeout_ms=timeout_ms,
336
+ )
337
+
338
+ if retries == UNSET:
339
+ if self.sdk_configuration.retry_config is not UNSET:
340
+ retries = self.sdk_configuration.retry_config
341
+
342
+ retry_config = None
343
+ if isinstance(retries, utils.RetryConfig):
344
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
345
+
346
+ http_res = await self.do_request_async(
347
+ hook_ctx=HookContext(
348
+ config=self.sdk_configuration,
349
+ base_url=base_url or "",
350
+ operation_id="createImage",
351
+ oauth2_scopes=None,
352
+ security_source=get_security_from_env(
353
+ self.sdk_configuration.security, models.Security
354
+ ),
355
+ ),
356
+ request=req,
357
+ error_status_codes=["4XX", "5XX"],
358
+ retry_config=retry_config,
359
+ )
360
+
361
+ if utils.match_response(http_res, "200", "application/json"):
362
+ return unmarshal_json_response(models.CreateImageResponseBody, http_res)
363
+ if utils.match_response(http_res, "4XX", "*"):
364
+ http_res_text = await utils.stream_to_text_async(http_res)
365
+ raise models.APIError("API error occurred", http_res, http_res_text)
366
+ if utils.match_response(http_res, "5XX", "*"):
367
+ http_res_text = await utils.stream_to_text_async(http_res)
368
+ raise models.APIError("API error occurred", http_res, http_res_text)
369
+
370
+ raise models.APIError("Unexpected response received", http_res)
orq_ai_sdk/images.py ADDED
@@ -0,0 +1,28 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .basesdk import BaseSDK
4
+ from .sdkconfiguration import SDKConfiguration
5
+ from orq_ai_sdk.edits import Edits
6
+ from orq_ai_sdk.generations import Generations
7
+ from orq_ai_sdk.variations import Variations
8
+ from typing import Optional
9
+
10
+
11
+ class Images(BaseSDK):
12
+ generations: Generations
13
+ edits: Edits
14
+ variations: Variations
15
+
16
+ def __init__(
17
+ self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None
18
+ ) -> None:
19
+ BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref)
20
+ self.sdk_configuration = sdk_config
21
+ self._init_sdks()
22
+
23
+ def _init_sdks(self):
24
+ self.generations = Generations(
25
+ self.sdk_configuration, parent_ref=self.parent_ref
26
+ )
27
+ self.edits = Edits(self.sdk_configuration, parent_ref=self.parent_ref)
28
+ self.variations = Variations(self.sdk_configuration, parent_ref=self.parent_ref)