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
camb/story/client.py ADDED
@@ -0,0 +1,579 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .. import core
6
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
+ from ..core.request_options import RequestOptions
8
+ from ..types.languages import Languages
9
+ from ..types.orchestrator_pipeline_result import OrchestratorPipelineResult
10
+ from .raw_client import AsyncRawStoryClient, RawStoryClient
11
+ from .types.create_story_story_post_response import CreateStoryStoryPostResponse
12
+ from .types.setup_story_story_setup_post_response import SetupStoryStorySetupPostResponse
13
+
14
+ # this is used as the default value for optional parameters
15
+ OMIT = typing.cast(typing.Any, ...)
16
+
17
+
18
+ class StoryClient:
19
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
20
+ self._raw_client = RawStoryClient(client_wrapper=client_wrapper)
21
+
22
+ @property
23
+ def with_raw_response(self) -> RawStoryClient:
24
+ """
25
+ Retrieves a raw implementation of this client that returns raw responses.
26
+
27
+ Returns
28
+ -------
29
+ RawStoryClient
30
+ """
31
+ return self._raw_client
32
+
33
+ def create_story(
34
+ self,
35
+ *,
36
+ file: core.File,
37
+ source_language: Languages,
38
+ run_id: typing.Optional[int] = None,
39
+ title: typing.Optional[str] = OMIT,
40
+ description: typing.Optional[str] = OMIT,
41
+ narrator_voice_id: typing.Optional[int] = OMIT,
42
+ folder_id: typing.Optional[int] = OMIT,
43
+ chosen_dictionaries: typing.Optional[typing.List[int]] = OMIT,
44
+ request_options: typing.Optional[RequestOptions] = None,
45
+ ) -> CreateStoryStoryPostResponse:
46
+ """
47
+ Parameters
48
+ ----------
49
+ file : core.File
50
+ See core.File for more documentation
51
+
52
+ source_language : Languages
53
+
54
+ run_id : typing.Optional[int]
55
+
56
+ title : typing.Optional[str]
57
+
58
+ description : typing.Optional[str]
59
+
60
+ narrator_voice_id : typing.Optional[int]
61
+
62
+ folder_id : typing.Optional[int]
63
+
64
+ chosen_dictionaries : typing.Optional[typing.List[int]]
65
+
66
+ request_options : typing.Optional[RequestOptions]
67
+ Request-specific configuration.
68
+
69
+ Returns
70
+ -------
71
+ CreateStoryStoryPostResponse
72
+ Successful Response
73
+
74
+ Examples
75
+ --------
76
+ from camb import CambApi
77
+
78
+ client = CambApi(
79
+ api_key="YOUR_API_KEY",
80
+ )
81
+ client.story.create_story(
82
+ source_language=1,
83
+ )
84
+ """
85
+ _response = self._raw_client.create_story(
86
+ file=file,
87
+ source_language=source_language,
88
+ run_id=run_id,
89
+ title=title,
90
+ description=description,
91
+ narrator_voice_id=narrator_voice_id,
92
+ folder_id=folder_id,
93
+ chosen_dictionaries=chosen_dictionaries,
94
+ request_options=request_options,
95
+ )
96
+ return _response.data
97
+
98
+ def setup_story(
99
+ self,
100
+ *,
101
+ file: core.File,
102
+ source_language: Languages,
103
+ run_id: typing.Optional[int] = None,
104
+ title: typing.Optional[str] = OMIT,
105
+ description: typing.Optional[str] = OMIT,
106
+ narrator_voice_id: typing.Optional[int] = OMIT,
107
+ folder_id: typing.Optional[int] = OMIT,
108
+ chosen_dictionaries: typing.Optional[typing.List[int]] = OMIT,
109
+ request_options: typing.Optional[RequestOptions] = None,
110
+ ) -> SetupStoryStorySetupPostResponse:
111
+ """
112
+ Parameters
113
+ ----------
114
+ file : core.File
115
+ See core.File for more documentation
116
+
117
+ source_language : Languages
118
+
119
+ run_id : typing.Optional[int]
120
+
121
+ title : typing.Optional[str]
122
+
123
+ description : typing.Optional[str]
124
+
125
+ narrator_voice_id : typing.Optional[int]
126
+
127
+ folder_id : typing.Optional[int]
128
+
129
+ chosen_dictionaries : typing.Optional[typing.List[int]]
130
+
131
+ request_options : typing.Optional[RequestOptions]
132
+ Request-specific configuration.
133
+
134
+ Returns
135
+ -------
136
+ SetupStoryStorySetupPostResponse
137
+ Successful Response
138
+
139
+ Examples
140
+ --------
141
+ from camb import CambApi
142
+
143
+ client = CambApi(
144
+ api_key="YOUR_API_KEY",
145
+ )
146
+ client.story.setup_story(
147
+ source_language=1,
148
+ )
149
+ """
150
+ _response = self._raw_client.setup_story(
151
+ file=file,
152
+ source_language=source_language,
153
+ run_id=run_id,
154
+ title=title,
155
+ description=description,
156
+ narrator_voice_id=narrator_voice_id,
157
+ folder_id=folder_id,
158
+ chosen_dictionaries=chosen_dictionaries,
159
+ request_options=request_options,
160
+ )
161
+ return _response.data
162
+
163
+ def get_story_status(
164
+ self,
165
+ task_id: str,
166
+ *,
167
+ run_id: typing.Optional[int] = None,
168
+ request_options: typing.Optional[RequestOptions] = None,
169
+ ) -> OrchestratorPipelineResult:
170
+ """
171
+ Parameters
172
+ ----------
173
+ task_id : str
174
+
175
+ run_id : typing.Optional[int]
176
+
177
+ request_options : typing.Optional[RequestOptions]
178
+ Request-specific configuration.
179
+
180
+ Returns
181
+ -------
182
+ OrchestratorPipelineResult
183
+ Successful Response
184
+
185
+ Examples
186
+ --------
187
+ from camb import CambApi
188
+
189
+ client = CambApi(
190
+ api_key="YOUR_API_KEY",
191
+ )
192
+ client.story.get_story_status(
193
+ task_id="task_id",
194
+ )
195
+ """
196
+ _response = self._raw_client.get_story_status(task_id, run_id=run_id, request_options=request_options)
197
+ return _response.data
198
+
199
+ def get_story_run_info(
200
+ self,
201
+ run_id: typing.Optional[int],
202
+ *,
203
+ include_transcript: typing.Optional[bool] = None,
204
+ request_options: typing.Optional[RequestOptions] = None,
205
+ ) -> typing.Dict[str, typing.Any]:
206
+ """
207
+ Parameters
208
+ ----------
209
+ run_id : typing.Optional[int]
210
+
211
+ include_transcript : typing.Optional[bool]
212
+ Whether to include the transcription in the response for fetching the result of a Stories run.
213
+
214
+ request_options : typing.Optional[RequestOptions]
215
+ Request-specific configuration.
216
+
217
+ Returns
218
+ -------
219
+ typing.Dict[str, typing.Any]
220
+ Successful Response
221
+
222
+ Examples
223
+ --------
224
+ from camb import CambApi
225
+
226
+ client = CambApi(
227
+ api_key="YOUR_API_KEY",
228
+ )
229
+ client.story.get_story_run_info(
230
+ run_id=1,
231
+ )
232
+ """
233
+ _response = self._raw_client.get_story_run_info(
234
+ run_id, include_transcript=include_transcript, request_options=request_options
235
+ )
236
+ return _response.data
237
+
238
+ def get_stories_runs_results(
239
+ self,
240
+ *,
241
+ run_ids: typing.Sequence[int],
242
+ run_id: typing.Optional[int] = None,
243
+ traceparent: typing.Optional[str] = None,
244
+ request_options: typing.Optional[RequestOptions] = None,
245
+ ) -> typing.Dict[str, typing.Dict[str, typing.Any]]:
246
+ """
247
+ Parameters
248
+ ----------
249
+ run_ids : typing.Sequence[int]
250
+
251
+ run_id : typing.Optional[int]
252
+
253
+ traceparent : typing.Optional[str]
254
+
255
+ request_options : typing.Optional[RequestOptions]
256
+ Request-specific configuration.
257
+
258
+ Returns
259
+ -------
260
+ typing.Dict[str, typing.Dict[str, typing.Any]]
261
+ Successful Response
262
+
263
+ Examples
264
+ --------
265
+ from camb import CambApi
266
+
267
+ client = CambApi(
268
+ api_key="YOUR_API_KEY",
269
+ )
270
+ client.story.get_stories_runs_results(
271
+ run_ids=[1],
272
+ )
273
+ """
274
+ _response = self._raw_client.get_stories_runs_results(
275
+ run_ids=run_ids, run_id=run_id, traceparent=traceparent, request_options=request_options
276
+ )
277
+ return _response.data
278
+
279
+
280
+ class AsyncStoryClient:
281
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
282
+ self._raw_client = AsyncRawStoryClient(client_wrapper=client_wrapper)
283
+
284
+ @property
285
+ def with_raw_response(self) -> AsyncRawStoryClient:
286
+ """
287
+ Retrieves a raw implementation of this client that returns raw responses.
288
+
289
+ Returns
290
+ -------
291
+ AsyncRawStoryClient
292
+ """
293
+ return self._raw_client
294
+
295
+ async def create_story(
296
+ self,
297
+ *,
298
+ file: core.File,
299
+ source_language: Languages,
300
+ run_id: typing.Optional[int] = None,
301
+ title: typing.Optional[str] = OMIT,
302
+ description: typing.Optional[str] = OMIT,
303
+ narrator_voice_id: typing.Optional[int] = OMIT,
304
+ folder_id: typing.Optional[int] = OMIT,
305
+ chosen_dictionaries: typing.Optional[typing.List[int]] = OMIT,
306
+ request_options: typing.Optional[RequestOptions] = None,
307
+ ) -> CreateStoryStoryPostResponse:
308
+ """
309
+ Parameters
310
+ ----------
311
+ file : core.File
312
+ See core.File for more documentation
313
+
314
+ source_language : Languages
315
+
316
+ run_id : typing.Optional[int]
317
+
318
+ title : typing.Optional[str]
319
+
320
+ description : typing.Optional[str]
321
+
322
+ narrator_voice_id : typing.Optional[int]
323
+
324
+ folder_id : typing.Optional[int]
325
+
326
+ chosen_dictionaries : typing.Optional[typing.List[int]]
327
+
328
+ request_options : typing.Optional[RequestOptions]
329
+ Request-specific configuration.
330
+
331
+ Returns
332
+ -------
333
+ CreateStoryStoryPostResponse
334
+ Successful Response
335
+
336
+ Examples
337
+ --------
338
+ import asyncio
339
+
340
+ from camb import AsyncCambApi
341
+
342
+ client = AsyncCambApi(
343
+ api_key="YOUR_API_KEY",
344
+ )
345
+
346
+
347
+ async def main() -> None:
348
+ await client.story.create_story(
349
+ source_language=1,
350
+ )
351
+
352
+
353
+ asyncio.run(main())
354
+ """
355
+ _response = await self._raw_client.create_story(
356
+ file=file,
357
+ source_language=source_language,
358
+ run_id=run_id,
359
+ title=title,
360
+ description=description,
361
+ narrator_voice_id=narrator_voice_id,
362
+ folder_id=folder_id,
363
+ chosen_dictionaries=chosen_dictionaries,
364
+ request_options=request_options,
365
+ )
366
+ return _response.data
367
+
368
+ async def setup_story(
369
+ self,
370
+ *,
371
+ file: core.File,
372
+ source_language: Languages,
373
+ run_id: typing.Optional[int] = None,
374
+ title: typing.Optional[str] = OMIT,
375
+ description: typing.Optional[str] = OMIT,
376
+ narrator_voice_id: typing.Optional[int] = OMIT,
377
+ folder_id: typing.Optional[int] = OMIT,
378
+ chosen_dictionaries: typing.Optional[typing.List[int]] = OMIT,
379
+ request_options: typing.Optional[RequestOptions] = None,
380
+ ) -> SetupStoryStorySetupPostResponse:
381
+ """
382
+ Parameters
383
+ ----------
384
+ file : core.File
385
+ See core.File for more documentation
386
+
387
+ source_language : Languages
388
+
389
+ run_id : typing.Optional[int]
390
+
391
+ title : typing.Optional[str]
392
+
393
+ description : typing.Optional[str]
394
+
395
+ narrator_voice_id : typing.Optional[int]
396
+
397
+ folder_id : typing.Optional[int]
398
+
399
+ chosen_dictionaries : typing.Optional[typing.List[int]]
400
+
401
+ request_options : typing.Optional[RequestOptions]
402
+ Request-specific configuration.
403
+
404
+ Returns
405
+ -------
406
+ SetupStoryStorySetupPostResponse
407
+ Successful Response
408
+
409
+ Examples
410
+ --------
411
+ import asyncio
412
+
413
+ from camb import AsyncCambApi
414
+
415
+ client = AsyncCambApi(
416
+ api_key="YOUR_API_KEY",
417
+ )
418
+
419
+
420
+ async def main() -> None:
421
+ await client.story.setup_story(
422
+ source_language=1,
423
+ )
424
+
425
+
426
+ asyncio.run(main())
427
+ """
428
+ _response = await self._raw_client.setup_story(
429
+ file=file,
430
+ source_language=source_language,
431
+ run_id=run_id,
432
+ title=title,
433
+ description=description,
434
+ narrator_voice_id=narrator_voice_id,
435
+ folder_id=folder_id,
436
+ chosen_dictionaries=chosen_dictionaries,
437
+ request_options=request_options,
438
+ )
439
+ return _response.data
440
+
441
+ async def get_story_status(
442
+ self,
443
+ task_id: str,
444
+ *,
445
+ run_id: typing.Optional[int] = None,
446
+ request_options: typing.Optional[RequestOptions] = None,
447
+ ) -> OrchestratorPipelineResult:
448
+ """
449
+ Parameters
450
+ ----------
451
+ task_id : str
452
+
453
+ run_id : typing.Optional[int]
454
+
455
+ request_options : typing.Optional[RequestOptions]
456
+ Request-specific configuration.
457
+
458
+ Returns
459
+ -------
460
+ OrchestratorPipelineResult
461
+ Successful Response
462
+
463
+ Examples
464
+ --------
465
+ import asyncio
466
+
467
+ from camb import AsyncCambApi
468
+
469
+ client = AsyncCambApi(
470
+ api_key="YOUR_API_KEY",
471
+ )
472
+
473
+
474
+ async def main() -> None:
475
+ await client.story.get_story_status(
476
+ task_id="task_id",
477
+ )
478
+
479
+
480
+ asyncio.run(main())
481
+ """
482
+ _response = await self._raw_client.get_story_status(task_id, run_id=run_id, request_options=request_options)
483
+ return _response.data
484
+
485
+ async def get_story_run_info(
486
+ self,
487
+ run_id: typing.Optional[int],
488
+ *,
489
+ include_transcript: typing.Optional[bool] = None,
490
+ request_options: typing.Optional[RequestOptions] = None,
491
+ ) -> typing.Dict[str, typing.Any]:
492
+ """
493
+ Parameters
494
+ ----------
495
+ run_id : typing.Optional[int]
496
+
497
+ include_transcript : typing.Optional[bool]
498
+ Whether to include the transcription in the response for fetching the result of a Stories run.
499
+
500
+ request_options : typing.Optional[RequestOptions]
501
+ Request-specific configuration.
502
+
503
+ Returns
504
+ -------
505
+ typing.Dict[str, typing.Any]
506
+ Successful Response
507
+
508
+ Examples
509
+ --------
510
+ import asyncio
511
+
512
+ from camb import AsyncCambApi
513
+
514
+ client = AsyncCambApi(
515
+ api_key="YOUR_API_KEY",
516
+ )
517
+
518
+
519
+ async def main() -> None:
520
+ await client.story.get_story_run_info(
521
+ run_id=1,
522
+ )
523
+
524
+
525
+ asyncio.run(main())
526
+ """
527
+ _response = await self._raw_client.get_story_run_info(
528
+ run_id, include_transcript=include_transcript, request_options=request_options
529
+ )
530
+ return _response.data
531
+
532
+ async def get_stories_runs_results(
533
+ self,
534
+ *,
535
+ run_ids: typing.Sequence[int],
536
+ run_id: typing.Optional[int] = None,
537
+ traceparent: typing.Optional[str] = None,
538
+ request_options: typing.Optional[RequestOptions] = None,
539
+ ) -> typing.Dict[str, typing.Dict[str, typing.Any]]:
540
+ """
541
+ Parameters
542
+ ----------
543
+ run_ids : typing.Sequence[int]
544
+
545
+ run_id : typing.Optional[int]
546
+
547
+ traceparent : typing.Optional[str]
548
+
549
+ request_options : typing.Optional[RequestOptions]
550
+ Request-specific configuration.
551
+
552
+ Returns
553
+ -------
554
+ typing.Dict[str, typing.Dict[str, typing.Any]]
555
+ Successful Response
556
+
557
+ Examples
558
+ --------
559
+ import asyncio
560
+
561
+ from camb import AsyncCambApi
562
+
563
+ client = AsyncCambApi(
564
+ api_key="YOUR_API_KEY",
565
+ )
566
+
567
+
568
+ async def main() -> None:
569
+ await client.story.get_stories_runs_results(
570
+ run_ids=[1],
571
+ )
572
+
573
+
574
+ asyncio.run(main())
575
+ """
576
+ _response = await self._raw_client.get_stories_runs_results(
577
+ run_ids=run_ids, run_id=run_id, traceparent=traceparent, request_options=request_options
578
+ )
579
+ return _response.data