camb-sdk 1.5.4__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 (167) hide show
  1. camb/__init__.py +335 -0
  2. camb/audio_separation/__init__.py +4 -0
  3. camb/audio_separation/client.py +406 -0
  4. camb/audio_separation/raw_client.py +534 -0
  5. camb/client.py +717 -0
  6. camb/core/__init__.py +105 -0
  7. camb/core/api_error.py +23 -0
  8. camb/core/client_wrapper.py +113 -0
  9. camb/core/datetime_utils.py +28 -0
  10. camb/core/file.py +67 -0
  11. camb/core/force_multipart.py +18 -0
  12. camb/core/http_client.py +663 -0
  13. camb/core/http_response.py +55 -0
  14. camb/core/http_sse/__init__.py +42 -0
  15. camb/core/http_sse/_api.py +112 -0
  16. camb/core/http_sse/_decoders.py +61 -0
  17. camb/core/http_sse/_exceptions.py +7 -0
  18. camb/core/http_sse/_models.py +17 -0
  19. camb/core/jsonable_encoder.py +100 -0
  20. camb/core/pydantic_utilities.py +260 -0
  21. camb/core/query_encoder.py +58 -0
  22. camb/core/remove_none_from_dict.py +11 -0
  23. camb/core/request_options.py +35 -0
  24. camb/core/serialization.py +276 -0
  25. camb/deprecated_streaming/__init__.py +4 -0
  26. camb/deprecated_streaming/client.py +532 -0
  27. camb/deprecated_streaming/raw_client.py +639 -0
  28. camb/dictionaries/__init__.py +4 -0
  29. camb/dictionaries/client.py +785 -0
  30. camb/dictionaries/raw_client.py +1048 -0
  31. camb/dub/__init__.py +49 -0
  32. camb/dub/client.py +846 -0
  33. camb/dub/raw_client.py +1194 -0
  34. camb/dub/types/__init__.py +53 -0
  35. camb/dub/types/dubbed_output_in_alt_format_request_payload_output_format.py +8 -0
  36. camb/dub/types/get_dubbed_output_in_alt_format_dub_alt_format_run_id_language_post_response.py +9 -0
  37. camb/dub/types/get_dubbed_run_info_dub_result_run_id_get_response.py +7 -0
  38. camb/dub/types/get_dubbing_runs_results_dubbing_results_post_response_value.py +7 -0
  39. camb/environment.py +7 -0
  40. camb/errors/__init__.py +34 -0
  41. camb/errors/unprocessable_entity_error.py +11 -0
  42. camb/folders/__init__.py +4 -0
  43. camb/folders/client.py +213 -0
  44. camb/folders/raw_client.py +278 -0
  45. camb/languages/__init__.py +4 -0
  46. camb/languages/client.py +168 -0
  47. camb/languages/raw_client.py +223 -0
  48. camb/project_setup/__init__.py +4 -0
  49. camb/project_setup/client.py +537 -0
  50. camb/project_setup/raw_client.py +655 -0
  51. camb/py.typed +0 -0
  52. camb/raw_client.py +236 -0
  53. camb/story/__init__.py +37 -0
  54. camb/story/client.py +579 -0
  55. camb/story/raw_client.py +743 -0
  56. camb/story/types/__init__.py +38 -0
  57. camb/story/types/create_story_story_post_response.py +8 -0
  58. camb/story/types/setup_story_story_setup_post_response.py +8 -0
  59. camb/streaming/__init__.py +4 -0
  60. camb/streaming/client.py +645 -0
  61. camb/streaming/raw_client.py +796 -0
  62. camb/text_to_audio/__init__.py +4 -0
  63. camb/text_to_audio/client.py +469 -0
  64. camb/text_to_audio/raw_client.py +610 -0
  65. camb/text_to_speech/__init__.py +49 -0
  66. camb/text_to_speech/baseten.py +214 -0
  67. camb/text_to_speech/client.py +742 -0
  68. camb/text_to_speech/raw_client.py +995 -0
  69. camb/text_to_speech/types/__init__.py +47 -0
  70. camb/text_to_speech/types/create_stream_tts_request_payload_language.py +71 -0
  71. camb/text_to_speech/types/create_stream_tts_request_payload_speech_model.py +7 -0
  72. camb/text_to_speech/types/get_tts_results_tts_results_post_response_value.py +7 -0
  73. camb/text_to_speech/types/get_tts_run_info_tts_result_run_id_get_response.py +7 -0
  74. camb/text_to_voice/__init__.py +4 -0
  75. camb/text_to_voice/client.py +329 -0
  76. camb/text_to_voice/raw_client.py +405 -0
  77. camb/transcription/__init__.py +4 -0
  78. camb/transcription/client.py +465 -0
  79. camb/transcription/raw_client.py +587 -0
  80. camb/translated_story/__init__.py +4 -0
  81. camb/translated_story/client.py +309 -0
  82. camb/translated_story/raw_client.py +381 -0
  83. camb/translated_tts/__init__.py +4 -0
  84. camb/translated_tts/client.py +313 -0
  85. camb/translated_tts/raw_client.py +357 -0
  86. camb/translation/__init__.py +4 -0
  87. camb/translation/client.py +631 -0
  88. camb/translation/raw_client.py +787 -0
  89. camb/types/__init__.py +236 -0
  90. camb/types/add_target_language_out.py +20 -0
  91. camb/types/audio_output_type.py +5 -0
  92. camb/types/audio_stream.py +31 -0
  93. camb/types/config_stream.py +22 -0
  94. camb/types/config_stream_pipeline.py +28 -0
  95. camb/types/create_custom_voice_out.py +19 -0
  96. camb/types/create_project_setup_out.py +19 -0
  97. camb/types/create_stream_out.py +22 -0
  98. camb/types/create_stream_request_payload.py +70 -0
  99. camb/types/create_translated_tts_out.py +19 -0
  100. camb/types/create_tts_out.py +19 -0
  101. camb/types/data_stream.py +24 -0
  102. camb/types/demixing_option.py +10 -0
  103. camb/types/dictionary_term.py +21 -0
  104. camb/types/dictionary_with_terms.py +28 -0
  105. camb/types/dubbing_result.py +22 -0
  106. camb/types/exception_reasons.py +30 -0
  107. camb/types/folder.py +20 -0
  108. camb/types/formalities.py +3 -0
  109. camb/types/gender.py +3 -0
  110. camb/types/get_audio_separation_result_out.py +20 -0
  111. camb/types/get_create_project_setup_response.py +21 -0
  112. camb/types/get_probe_stream_in.py +21 -0
  113. camb/types/get_probe_stream_out.py +24 -0
  114. camb/types/get_setup_story_result_response.py +21 -0
  115. camb/types/get_text_to_voice_result_out.py +19 -0
  116. camb/types/get_tts_result_out_file_url.py +19 -0
  117. camb/types/http_validation_error.py +20 -0
  118. camb/types/language_enums.py +154 -0
  119. camb/types/language_pydantic_model.py +21 -0
  120. camb/types/languages.py +3 -0
  121. camb/types/orchestrator_pipeline_call_result.py +19 -0
  122. camb/types/orchestrator_pipeline_result.py +25 -0
  123. camb/types/orchestrator_pipeline_result_exception_reason.py +7 -0
  124. camb/types/orchestrator_pipeline_result_message.py +5 -0
  125. camb/types/output_format.py +10 -0
  126. camb/types/overdub_config.py +37 -0
  127. camb/types/project_details.py +28 -0
  128. camb/types/revoicing_option.py +5 -0
  129. camb/types/run_i_ds_request_payload.py +19 -0
  130. camb/types/segmenting_option.py +5 -0
  131. camb/types/source_stream.py +30 -0
  132. camb/types/story_details.py +27 -0
  133. camb/types/stream_category.py +3 -0
  134. camb/types/stream_tts_inference_options.py +38 -0
  135. camb/types/stream_tts_output_configuration.py +33 -0
  136. camb/types/stream_tts_voice_settings.py +28 -0
  137. camb/types/stream_type.py +3 -0
  138. camb/types/stream_url_for_languages.py +21 -0
  139. camb/types/target_stream.py +34 -0
  140. camb/types/task_status.py +5 -0
  141. camb/types/term_translation_input.py +21 -0
  142. camb/types/term_translation_output.py +20 -0
  143. camb/types/text_to_audio_result.py +19 -0
  144. camb/types/text_to_audio_type.py +5 -0
  145. camb/types/transcribing_option.py +5 -0
  146. camb/types/transcript.py +22 -0
  147. camb/types/transcript_data_type.py +5 -0
  148. camb/types/transcript_file_format.py +5 -0
  149. camb/types/transcription_result.py +20 -0
  150. camb/types/translating_option.py +5 -0
  151. camb/types/translation_result.py +19 -0
  152. camb/types/tts_provider.py +3 -0
  153. camb/types/validation_error.py +22 -0
  154. camb/types/validation_error_loc_item.py +5 -0
  155. camb/types/video_output_type_without_avi.py +5 -0
  156. camb/types/video_stream.py +28 -0
  157. camb/types/voice.py +28 -0
  158. camb/voice_cloning/__init__.py +34 -0
  159. camb/voice_cloning/client.py +265 -0
  160. camb/voice_cloning/raw_client.py +320 -0
  161. camb/voice_cloning/types/__init__.py +36 -0
  162. camb/voice_cloning/types/list_voices_list_voices_get_response_item.py +7 -0
  163. camb_sdk-1.5.4.dist-info/METADATA +282 -0
  164. camb_sdk-1.5.4.dist-info/RECORD +167 -0
  165. camb_sdk-1.5.4.dist-info/WHEEL +5 -0
  166. camb_sdk-1.5.4.dist-info/licenses/LICENSE +21 -0
  167. camb_sdk-1.5.4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,631 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.request_options import RequestOptions
7
+ from ..types.formalities import Formalities
8
+ from ..types.gender import Gender
9
+ from ..types.languages import Languages
10
+ from ..types.orchestrator_pipeline_result import OrchestratorPipelineResult
11
+ from ..types.translation_result import TranslationResult
12
+ from .raw_client import AsyncRawTranslationClient, RawTranslationClient
13
+
14
+ # this is used as the default value for optional parameters
15
+ OMIT = typing.cast(typing.Any, ...)
16
+
17
+
18
+ class TranslationClient:
19
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
20
+ self._raw_client = RawTranslationClient(client_wrapper=client_wrapper)
21
+
22
+ @property
23
+ def with_raw_response(self) -> RawTranslationClient:
24
+ """
25
+ Retrieves a raw implementation of this client that returns raw responses.
26
+
27
+ Returns
28
+ -------
29
+ RawTranslationClient
30
+ """
31
+ return self._raw_client
32
+
33
+ def translation_stream(
34
+ self,
35
+ *,
36
+ source_language: Languages,
37
+ target_language: Languages,
38
+ text: str,
39
+ traceparent: typing.Optional[str] = None,
40
+ formality: typing.Optional[Formalities] = OMIT,
41
+ gender: typing.Optional[Gender] = OMIT,
42
+ team_id: typing.Optional[int] = OMIT,
43
+ project_name: typing.Optional[str] = OMIT,
44
+ project_description: typing.Optional[str] = OMIT,
45
+ folder_id: typing.Optional[int] = OMIT,
46
+ request_options: typing.Optional[RequestOptions] = None,
47
+ ) -> typing.Any:
48
+ """
49
+ Parameters
50
+ ----------
51
+ source_language : Languages
52
+
53
+ target_language : Languages
54
+
55
+ text : str
56
+
57
+ traceparent : typing.Optional[str]
58
+
59
+ formality : typing.Optional[Formalities]
60
+
61
+ gender : typing.Optional[Gender]
62
+
63
+ team_id : typing.Optional[int]
64
+
65
+ project_name : typing.Optional[str]
66
+
67
+ project_description : typing.Optional[str]
68
+
69
+ folder_id : typing.Optional[int]
70
+
71
+ request_options : typing.Optional[RequestOptions]
72
+ Request-specific configuration.
73
+
74
+ Returns
75
+ -------
76
+ typing.Any
77
+ Text translation stream
78
+
79
+ Examples
80
+ --------
81
+ from camb import CambApi
82
+
83
+ client = CambApi(
84
+ api_key="YOUR_API_KEY",
85
+ )
86
+ client.translation.translation_stream(
87
+ source_language=1,
88
+ target_language=1,
89
+ text="text",
90
+ )
91
+ """
92
+ _response = self._raw_client.translation_stream(
93
+ source_language=source_language,
94
+ target_language=target_language,
95
+ text=text,
96
+ traceparent=traceparent,
97
+ formality=formality,
98
+ gender=gender,
99
+ team_id=team_id,
100
+ project_name=project_name,
101
+ project_description=project_description,
102
+ folder_id=folder_id,
103
+ request_options=request_options,
104
+ )
105
+ return _response.data
106
+
107
+ def create_translation(
108
+ self,
109
+ *,
110
+ texts: typing.Sequence[str],
111
+ source_language: Languages,
112
+ target_language: Languages,
113
+ run_id: typing.Optional[int] = None,
114
+ project_name: typing.Optional[str] = OMIT,
115
+ project_description: typing.Optional[str] = OMIT,
116
+ folder_id: typing.Optional[int] = OMIT,
117
+ age: typing.Optional[int] = OMIT,
118
+ formality: typing.Optional[Formalities] = OMIT,
119
+ gender: typing.Optional[Gender] = OMIT,
120
+ chosen_dictionaries: typing.Optional[typing.Sequence[int]] = OMIT,
121
+ request_options: typing.Optional[RequestOptions] = None,
122
+ ) -> typing.Any:
123
+ """
124
+ Parameters
125
+ ----------
126
+ texts : typing.Sequence[str]
127
+
128
+ source_language : Languages
129
+
130
+ target_language : Languages
131
+
132
+ run_id : typing.Optional[int]
133
+
134
+ project_name : typing.Optional[str]
135
+
136
+ project_description : typing.Optional[str]
137
+
138
+ folder_id : typing.Optional[int]
139
+
140
+ age : typing.Optional[int]
141
+
142
+ formality : typing.Optional[Formalities]
143
+
144
+ gender : typing.Optional[Gender]
145
+
146
+ chosen_dictionaries : typing.Optional[typing.Sequence[int]]
147
+
148
+ request_options : typing.Optional[RequestOptions]
149
+ Request-specific configuration.
150
+
151
+ Returns
152
+ -------
153
+ typing.Any
154
+ Successful Response
155
+
156
+ Examples
157
+ --------
158
+ from camb import CambApi
159
+
160
+ client = CambApi(
161
+ api_key="YOUR_API_KEY",
162
+ )
163
+ client.translation.create_translation(
164
+ texts=["texts"],
165
+ source_language=1,
166
+ target_language=1,
167
+ )
168
+ """
169
+ _response = self._raw_client.create_translation(
170
+ texts=texts,
171
+ source_language=source_language,
172
+ target_language=target_language,
173
+ run_id=run_id,
174
+ project_name=project_name,
175
+ project_description=project_description,
176
+ folder_id=folder_id,
177
+ age=age,
178
+ formality=formality,
179
+ gender=gender,
180
+ chosen_dictionaries=chosen_dictionaries,
181
+ request_options=request_options,
182
+ )
183
+ return _response.data
184
+
185
+ def get_translation_task_status(
186
+ self,
187
+ task_id: str,
188
+ *,
189
+ run_id: typing.Optional[int] = None,
190
+ request_options: typing.Optional[RequestOptions] = None,
191
+ ) -> OrchestratorPipelineResult:
192
+ """
193
+ Parameters
194
+ ----------
195
+ task_id : str
196
+
197
+ run_id : typing.Optional[int]
198
+
199
+ request_options : typing.Optional[RequestOptions]
200
+ Request-specific configuration.
201
+
202
+ Returns
203
+ -------
204
+ OrchestratorPipelineResult
205
+ Successful Response
206
+
207
+ Examples
208
+ --------
209
+ from camb import CambApi
210
+
211
+ client = CambApi(
212
+ api_key="YOUR_API_KEY",
213
+ )
214
+ client.translation.get_translation_task_status(
215
+ task_id="task_id",
216
+ )
217
+ """
218
+ _response = self._raw_client.get_translation_task_status(
219
+ task_id, run_id=run_id, request_options=request_options
220
+ )
221
+ return _response.data
222
+
223
+ def get_translation_result(
224
+ self,
225
+ run_id: typing.Optional[int],
226
+ *,
227
+ traceparent: typing.Optional[str] = None,
228
+ request_options: typing.Optional[RequestOptions] = None,
229
+ ) -> TranslationResult:
230
+ """
231
+ NOTE: This endpoint should be called only by the users to get values for their runs via API.
232
+ Further we need to validate if the user has access to the run_id, otherwise we should not return the output urls.
233
+
234
+ Parameters
235
+ ----------
236
+ run_id : typing.Optional[int]
237
+
238
+ traceparent : typing.Optional[str]
239
+
240
+ request_options : typing.Optional[RequestOptions]
241
+ Request-specific configuration.
242
+
243
+ Returns
244
+ -------
245
+ TranslationResult
246
+ Successful Response
247
+
248
+ Examples
249
+ --------
250
+ from camb import CambApi
251
+
252
+ client = CambApi(
253
+ api_key="YOUR_API_KEY",
254
+ )
255
+ client.translation.get_translation_result(
256
+ run_id=1,
257
+ )
258
+ """
259
+ _response = self._raw_client.get_translation_result(
260
+ run_id, traceparent=traceparent, request_options=request_options
261
+ )
262
+ return _response.data
263
+
264
+ def get_translation_results(
265
+ self,
266
+ *,
267
+ run_ids: typing.Sequence[int],
268
+ run_id: typing.Optional[int] = None,
269
+ traceparent: typing.Optional[str] = None,
270
+ request_options: typing.Optional[RequestOptions] = None,
271
+ ) -> typing.Dict[str, TranslationResult]:
272
+ """
273
+ Parameters
274
+ ----------
275
+ run_ids : typing.Sequence[int]
276
+
277
+ run_id : typing.Optional[int]
278
+
279
+ traceparent : typing.Optional[str]
280
+
281
+ request_options : typing.Optional[RequestOptions]
282
+ Request-specific configuration.
283
+
284
+ Returns
285
+ -------
286
+ typing.Dict[str, TranslationResult]
287
+ Successful Response
288
+
289
+ Examples
290
+ --------
291
+ from camb import CambApi
292
+
293
+ client = CambApi(
294
+ api_key="YOUR_API_KEY",
295
+ )
296
+ client.translation.get_translation_results(
297
+ run_ids=[1],
298
+ )
299
+ """
300
+ _response = self._raw_client.get_translation_results(
301
+ run_ids=run_ids, run_id=run_id, traceparent=traceparent, request_options=request_options
302
+ )
303
+ return _response.data
304
+
305
+
306
+ class AsyncTranslationClient:
307
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
308
+ self._raw_client = AsyncRawTranslationClient(client_wrapper=client_wrapper)
309
+
310
+ @property
311
+ def with_raw_response(self) -> AsyncRawTranslationClient:
312
+ """
313
+ Retrieves a raw implementation of this client that returns raw responses.
314
+
315
+ Returns
316
+ -------
317
+ AsyncRawTranslationClient
318
+ """
319
+ return self._raw_client
320
+
321
+ async def translation_stream(
322
+ self,
323
+ *,
324
+ source_language: Languages,
325
+ target_language: Languages,
326
+ text: str,
327
+ traceparent: typing.Optional[str] = None,
328
+ formality: typing.Optional[Formalities] = OMIT,
329
+ gender: typing.Optional[Gender] = OMIT,
330
+ team_id: typing.Optional[int] = OMIT,
331
+ project_name: typing.Optional[str] = OMIT,
332
+ project_description: typing.Optional[str] = OMIT,
333
+ folder_id: typing.Optional[int] = OMIT,
334
+ request_options: typing.Optional[RequestOptions] = None,
335
+ ) -> typing.Any:
336
+ """
337
+ Parameters
338
+ ----------
339
+ source_language : Languages
340
+
341
+ target_language : Languages
342
+
343
+ text : str
344
+
345
+ traceparent : typing.Optional[str]
346
+
347
+ formality : typing.Optional[Formalities]
348
+
349
+ gender : typing.Optional[Gender]
350
+
351
+ team_id : typing.Optional[int]
352
+
353
+ project_name : typing.Optional[str]
354
+
355
+ project_description : typing.Optional[str]
356
+
357
+ folder_id : typing.Optional[int]
358
+
359
+ request_options : typing.Optional[RequestOptions]
360
+ Request-specific configuration.
361
+
362
+ Returns
363
+ -------
364
+ typing.Any
365
+ Text translation stream
366
+
367
+ Examples
368
+ --------
369
+ import asyncio
370
+
371
+ from camb import AsyncCambApi
372
+
373
+ client = AsyncCambApi(
374
+ api_key="YOUR_API_KEY",
375
+ )
376
+
377
+
378
+ async def main() -> None:
379
+ await client.translation.translation_stream(
380
+ source_language=1,
381
+ target_language=1,
382
+ text="text",
383
+ )
384
+
385
+
386
+ asyncio.run(main())
387
+ """
388
+ _response = await self._raw_client.translation_stream(
389
+ source_language=source_language,
390
+ target_language=target_language,
391
+ text=text,
392
+ traceparent=traceparent,
393
+ formality=formality,
394
+ gender=gender,
395
+ team_id=team_id,
396
+ project_name=project_name,
397
+ project_description=project_description,
398
+ folder_id=folder_id,
399
+ request_options=request_options,
400
+ )
401
+ return _response.data
402
+
403
+ async def create_translation(
404
+ self,
405
+ *,
406
+ texts: typing.Sequence[str],
407
+ source_language: Languages,
408
+ target_language: Languages,
409
+ run_id: typing.Optional[int] = None,
410
+ project_name: typing.Optional[str] = OMIT,
411
+ project_description: typing.Optional[str] = OMIT,
412
+ folder_id: typing.Optional[int] = OMIT,
413
+ age: typing.Optional[int] = OMIT,
414
+ formality: typing.Optional[Formalities] = OMIT,
415
+ gender: typing.Optional[Gender] = OMIT,
416
+ chosen_dictionaries: typing.Optional[typing.Sequence[int]] = OMIT,
417
+ request_options: typing.Optional[RequestOptions] = None,
418
+ ) -> typing.Any:
419
+ """
420
+ Parameters
421
+ ----------
422
+ texts : typing.Sequence[str]
423
+
424
+ source_language : Languages
425
+
426
+ target_language : Languages
427
+
428
+ run_id : typing.Optional[int]
429
+
430
+ project_name : typing.Optional[str]
431
+
432
+ project_description : typing.Optional[str]
433
+
434
+ folder_id : typing.Optional[int]
435
+
436
+ age : typing.Optional[int]
437
+
438
+ formality : typing.Optional[Formalities]
439
+
440
+ gender : typing.Optional[Gender]
441
+
442
+ chosen_dictionaries : typing.Optional[typing.Sequence[int]]
443
+
444
+ request_options : typing.Optional[RequestOptions]
445
+ Request-specific configuration.
446
+
447
+ Returns
448
+ -------
449
+ typing.Any
450
+ Successful Response
451
+
452
+ Examples
453
+ --------
454
+ import asyncio
455
+
456
+ from camb import AsyncCambApi
457
+
458
+ client = AsyncCambApi(
459
+ api_key="YOUR_API_KEY",
460
+ )
461
+
462
+
463
+ async def main() -> None:
464
+ await client.translation.create_translation(
465
+ texts=["texts"],
466
+ source_language=1,
467
+ target_language=1,
468
+ )
469
+
470
+
471
+ asyncio.run(main())
472
+ """
473
+ _response = await self._raw_client.create_translation(
474
+ texts=texts,
475
+ source_language=source_language,
476
+ target_language=target_language,
477
+ run_id=run_id,
478
+ project_name=project_name,
479
+ project_description=project_description,
480
+ folder_id=folder_id,
481
+ age=age,
482
+ formality=formality,
483
+ gender=gender,
484
+ chosen_dictionaries=chosen_dictionaries,
485
+ request_options=request_options,
486
+ )
487
+ return _response.data
488
+
489
+ async def get_translation_task_status(
490
+ self,
491
+ task_id: str,
492
+ *,
493
+ run_id: typing.Optional[int] = None,
494
+ request_options: typing.Optional[RequestOptions] = None,
495
+ ) -> OrchestratorPipelineResult:
496
+ """
497
+ Parameters
498
+ ----------
499
+ task_id : str
500
+
501
+ run_id : typing.Optional[int]
502
+
503
+ request_options : typing.Optional[RequestOptions]
504
+ Request-specific configuration.
505
+
506
+ Returns
507
+ -------
508
+ OrchestratorPipelineResult
509
+ Successful Response
510
+
511
+ Examples
512
+ --------
513
+ import asyncio
514
+
515
+ from camb import AsyncCambApi
516
+
517
+ client = AsyncCambApi(
518
+ api_key="YOUR_API_KEY",
519
+ )
520
+
521
+
522
+ async def main() -> None:
523
+ await client.translation.get_translation_task_status(
524
+ task_id="task_id",
525
+ )
526
+
527
+
528
+ asyncio.run(main())
529
+ """
530
+ _response = await self._raw_client.get_translation_task_status(
531
+ task_id, run_id=run_id, request_options=request_options
532
+ )
533
+ return _response.data
534
+
535
+ async def get_translation_result(
536
+ self,
537
+ run_id: typing.Optional[int],
538
+ *,
539
+ traceparent: typing.Optional[str] = None,
540
+ request_options: typing.Optional[RequestOptions] = None,
541
+ ) -> TranslationResult:
542
+ """
543
+ NOTE: This endpoint should be called only by the users to get values for their runs via API.
544
+ Further we need to validate if the user has access to the run_id, otherwise we should not return the output urls.
545
+
546
+ Parameters
547
+ ----------
548
+ run_id : typing.Optional[int]
549
+
550
+ traceparent : typing.Optional[str]
551
+
552
+ request_options : typing.Optional[RequestOptions]
553
+ Request-specific configuration.
554
+
555
+ Returns
556
+ -------
557
+ TranslationResult
558
+ Successful Response
559
+
560
+ Examples
561
+ --------
562
+ import asyncio
563
+
564
+ from camb import AsyncCambApi
565
+
566
+ client = AsyncCambApi(
567
+ api_key="YOUR_API_KEY",
568
+ )
569
+
570
+
571
+ async def main() -> None:
572
+ await client.translation.get_translation_result(
573
+ run_id=1,
574
+ )
575
+
576
+
577
+ asyncio.run(main())
578
+ """
579
+ _response = await self._raw_client.get_translation_result(
580
+ run_id, traceparent=traceparent, request_options=request_options
581
+ )
582
+ return _response.data
583
+
584
+ async def get_translation_results(
585
+ self,
586
+ *,
587
+ run_ids: typing.Sequence[int],
588
+ run_id: typing.Optional[int] = None,
589
+ traceparent: typing.Optional[str] = None,
590
+ request_options: typing.Optional[RequestOptions] = None,
591
+ ) -> typing.Dict[str, TranslationResult]:
592
+ """
593
+ Parameters
594
+ ----------
595
+ run_ids : typing.Sequence[int]
596
+
597
+ run_id : typing.Optional[int]
598
+
599
+ traceparent : typing.Optional[str]
600
+
601
+ request_options : typing.Optional[RequestOptions]
602
+ Request-specific configuration.
603
+
604
+ Returns
605
+ -------
606
+ typing.Dict[str, TranslationResult]
607
+ Successful Response
608
+
609
+ Examples
610
+ --------
611
+ import asyncio
612
+
613
+ from camb import AsyncCambApi
614
+
615
+ client = AsyncCambApi(
616
+ api_key="YOUR_API_KEY",
617
+ )
618
+
619
+
620
+ async def main() -> None:
621
+ await client.translation.get_translation_results(
622
+ run_ids=[1],
623
+ )
624
+
625
+
626
+ asyncio.run(main())
627
+ """
628
+ _response = await self._raw_client.get_translation_results(
629
+ run_ids=run_ids, run_id=run_id, traceparent=traceparent, request_options=request_options
630
+ )
631
+ return _response.data