cartesia 1.3.1__py3-none-any.whl → 2.0.0a0__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 (174) hide show
  1. cartesia/__init__.py +288 -3
  2. cartesia/api_status/__init__.py +6 -0
  3. cartesia/api_status/client.py +104 -0
  4. cartesia/api_status/requests/__init__.py +5 -0
  5. cartesia/api_status/requests/api_info.py +8 -0
  6. cartesia/api_status/types/__init__.py +5 -0
  7. cartesia/api_status/types/api_info.py +20 -0
  8. cartesia/base_client.py +160 -0
  9. cartesia/client.py +163 -40
  10. cartesia/core/__init__.py +47 -0
  11. cartesia/core/api_error.py +15 -0
  12. cartesia/core/client_wrapper.py +55 -0
  13. cartesia/core/datetime_utils.py +28 -0
  14. cartesia/core/file.py +67 -0
  15. cartesia/core/http_client.py +499 -0
  16. cartesia/core/jsonable_encoder.py +101 -0
  17. cartesia/core/pydantic_utilities.py +296 -0
  18. cartesia/core/query_encoder.py +58 -0
  19. cartesia/core/remove_none_from_dict.py +11 -0
  20. cartesia/core/request_options.py +35 -0
  21. cartesia/core/serialization.py +272 -0
  22. cartesia/datasets/__init__.py +24 -0
  23. cartesia/datasets/client.py +422 -0
  24. cartesia/datasets/requests/__init__.py +15 -0
  25. cartesia/datasets/requests/create_dataset_request.py +7 -0
  26. cartesia/datasets/requests/dataset.py +9 -0
  27. cartesia/datasets/requests/dataset_file.py +9 -0
  28. cartesia/datasets/requests/paginated_dataset_files.py +10 -0
  29. cartesia/datasets/requests/paginated_datasets.py +10 -0
  30. cartesia/datasets/types/__init__.py +17 -0
  31. cartesia/datasets/types/create_dataset_request.py +19 -0
  32. cartesia/datasets/types/dataset.py +21 -0
  33. cartesia/datasets/types/dataset_file.py +21 -0
  34. cartesia/datasets/types/file_purpose.py +5 -0
  35. cartesia/datasets/types/paginated_dataset_files.py +21 -0
  36. cartesia/datasets/types/paginated_datasets.py +21 -0
  37. cartesia/embedding/__init__.py +5 -0
  38. cartesia/embedding/types/__init__.py +5 -0
  39. cartesia/embedding/types/embedding.py +201 -0
  40. cartesia/environment.py +7 -0
  41. cartesia/infill/__init__.py +2 -0
  42. cartesia/infill/client.py +294 -0
  43. cartesia/tts/__init__.py +167 -0
  44. cartesia/{_async_websocket.py → tts/_async_websocket.py} +159 -84
  45. cartesia/tts/_websocket.py +430 -0
  46. cartesia/tts/client.py +407 -0
  47. cartesia/tts/requests/__init__.py +76 -0
  48. cartesia/tts/requests/cancel_context_request.py +17 -0
  49. cartesia/tts/requests/controls.py +11 -0
  50. cartesia/tts/requests/generation_request.py +53 -0
  51. cartesia/tts/requests/mp_3_output_format.py +11 -0
  52. cartesia/tts/requests/output_format.py +30 -0
  53. cartesia/tts/requests/phoneme_timestamps.py +10 -0
  54. cartesia/tts/requests/raw_output_format.py +11 -0
  55. cartesia/tts/requests/speed.py +7 -0
  56. cartesia/tts/requests/tts_request.py +24 -0
  57. cartesia/tts/requests/tts_request_embedding_specifier.py +16 -0
  58. cartesia/tts/requests/tts_request_id_specifier.py +16 -0
  59. cartesia/tts/requests/tts_request_voice_specifier.py +7 -0
  60. cartesia/tts/requests/wav_output_format.py +7 -0
  61. cartesia/tts/requests/web_socket_base_response.py +11 -0
  62. cartesia/tts/requests/web_socket_chunk_response.py +8 -0
  63. cartesia/tts/requests/web_socket_done_response.py +7 -0
  64. cartesia/tts/requests/web_socket_error_response.py +7 -0
  65. cartesia/tts/requests/web_socket_flush_done_response.py +9 -0
  66. cartesia/tts/requests/web_socket_phoneme_timestamps_response.py +9 -0
  67. cartesia/tts/requests/web_socket_raw_output_format.py +11 -0
  68. cartesia/tts/requests/web_socket_request.py +7 -0
  69. cartesia/tts/requests/web_socket_response.py +69 -0
  70. cartesia/tts/requests/web_socket_stream_options.py +8 -0
  71. cartesia/tts/requests/web_socket_timestamps_response.py +9 -0
  72. cartesia/tts/requests/web_socket_tts_output.py +18 -0
  73. cartesia/tts/requests/web_socket_tts_request.py +24 -0
  74. cartesia/tts/requests/word_timestamps.py +10 -0
  75. cartesia/tts/socket_client.py +302 -0
  76. cartesia/tts/types/__init__.py +90 -0
  77. cartesia/tts/types/cancel_context_request.py +28 -0
  78. cartesia/tts/types/context_id.py +3 -0
  79. cartesia/tts/types/controls.py +22 -0
  80. cartesia/tts/types/emotion.py +29 -0
  81. cartesia/tts/types/flush_id.py +3 -0
  82. cartesia/tts/types/generation_request.py +66 -0
  83. cartesia/tts/types/mp_3_output_format.py +23 -0
  84. cartesia/tts/types/natural_specifier.py +5 -0
  85. cartesia/tts/types/numerical_specifier.py +3 -0
  86. cartesia/tts/types/output_format.py +58 -0
  87. cartesia/tts/types/phoneme_timestamps.py +21 -0
  88. cartesia/tts/types/raw_encoding.py +5 -0
  89. cartesia/tts/types/raw_output_format.py +22 -0
  90. cartesia/tts/types/speed.py +7 -0
  91. cartesia/tts/types/supported_language.py +7 -0
  92. cartesia/tts/types/tts_request.py +35 -0
  93. cartesia/tts/types/tts_request_embedding_specifier.py +27 -0
  94. cartesia/tts/types/tts_request_id_specifier.py +27 -0
  95. cartesia/tts/types/tts_request_voice_specifier.py +7 -0
  96. cartesia/tts/types/wav_output_format.py +17 -0
  97. cartesia/tts/types/web_socket_base_response.py +22 -0
  98. cartesia/tts/types/web_socket_chunk_response.py +20 -0
  99. cartesia/tts/types/web_socket_done_response.py +17 -0
  100. cartesia/tts/types/web_socket_error_response.py +19 -0
  101. cartesia/tts/types/web_socket_flush_done_response.py +21 -0
  102. cartesia/tts/types/web_socket_phoneme_timestamps_response.py +20 -0
  103. cartesia/tts/types/web_socket_raw_output_format.py +22 -0
  104. cartesia/tts/types/web_socket_request.py +7 -0
  105. cartesia/tts/types/web_socket_response.py +124 -0
  106. cartesia/tts/types/web_socket_stream_options.py +19 -0
  107. cartesia/tts/types/web_socket_timestamps_response.py +20 -0
  108. cartesia/tts/types/web_socket_tts_output.py +27 -0
  109. cartesia/tts/types/web_socket_tts_request.py +36 -0
  110. cartesia/tts/types/word_timestamps.py +21 -0
  111. cartesia/tts/utils/tts.py +64 -0
  112. cartesia/tts/utils/types.py +70 -0
  113. cartesia/version.py +3 -1
  114. cartesia/voice_changer/__init__.py +27 -0
  115. cartesia/voice_changer/client.py +395 -0
  116. cartesia/voice_changer/requests/__init__.py +15 -0
  117. cartesia/voice_changer/requests/streaming_response.py +36 -0
  118. cartesia/voice_changer/types/__init__.py +17 -0
  119. cartesia/voice_changer/types/output_format_container.py +5 -0
  120. cartesia/voice_changer/types/streaming_response.py +62 -0
  121. cartesia/voices/__init__.py +67 -0
  122. cartesia/voices/client.py +1812 -0
  123. cartesia/voices/requests/__init__.py +27 -0
  124. cartesia/voices/requests/create_voice_request.py +21 -0
  125. cartesia/voices/requests/embedding_response.py +8 -0
  126. cartesia/voices/requests/embedding_specifier.py +10 -0
  127. cartesia/voices/requests/id_specifier.py +10 -0
  128. cartesia/voices/requests/localize_dialect.py +6 -0
  129. cartesia/voices/requests/localize_voice_request.py +15 -0
  130. cartesia/voices/requests/mix_voice_specifier.py +7 -0
  131. cartesia/voices/requests/mix_voices_request.py +9 -0
  132. cartesia/voices/requests/update_voice_request.py +15 -0
  133. cartesia/voices/requests/voice.py +39 -0
  134. cartesia/voices/requests/voice_metadata.py +36 -0
  135. cartesia/voices/types/__init__.py +41 -0
  136. cartesia/voices/types/base_voice_id.py +5 -0
  137. cartesia/voices/types/clone_mode.py +5 -0
  138. cartesia/voices/types/create_voice_request.py +32 -0
  139. cartesia/voices/types/embedding_response.py +20 -0
  140. cartesia/voices/types/embedding_specifier.py +22 -0
  141. cartesia/voices/types/gender.py +5 -0
  142. cartesia/voices/types/id_specifier.py +22 -0
  143. cartesia/voices/types/localize_dialect.py +6 -0
  144. cartesia/voices/types/localize_english_dialect.py +5 -0
  145. cartesia/voices/types/localize_target_language.py +7 -0
  146. cartesia/voices/types/localize_voice_request.py +26 -0
  147. cartesia/voices/types/mix_voice_specifier.py +7 -0
  148. cartesia/voices/types/mix_voices_request.py +20 -0
  149. cartesia/voices/types/update_voice_request.py +27 -0
  150. cartesia/voices/types/voice.py +50 -0
  151. cartesia/voices/types/voice_id.py +3 -0
  152. cartesia/voices/types/voice_metadata.py +48 -0
  153. cartesia/voices/types/weight.py +3 -0
  154. cartesia-2.0.0a0.dist-info/METADATA +306 -0
  155. cartesia-2.0.0a0.dist-info/RECORD +158 -0
  156. {cartesia-1.3.1.dist-info → cartesia-2.0.0a0.dist-info}/WHEEL +1 -1
  157. cartesia/_async_sse.py +0 -95
  158. cartesia/_logger.py +0 -3
  159. cartesia/_sse.py +0 -143
  160. cartesia/_types.py +0 -70
  161. cartesia/_websocket.py +0 -358
  162. cartesia/async_client.py +0 -82
  163. cartesia/async_tts.py +0 -63
  164. cartesia/resource.py +0 -44
  165. cartesia/tts.py +0 -137
  166. cartesia/utils/deprecated.py +0 -55
  167. cartesia/utils/retry.py +0 -87
  168. cartesia/utils/tts.py +0 -78
  169. cartesia/voices.py +0 -208
  170. cartesia-1.3.1.dist-info/METADATA +0 -661
  171. cartesia-1.3.1.dist-info/RECORD +0 -23
  172. cartesia-1.3.1.dist-info/licenses/LICENSE.md +0 -21
  173. /cartesia/{utils/__init__.py → py.typed} +0 -0
  174. /cartesia/{_constants.py → tts/utils/constants.py} +0 -0
@@ -0,0 +1,422 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from ..core.client_wrapper import SyncClientWrapper
5
+ from ..core.request_options import RequestOptions
6
+ from .types.paginated_datasets import PaginatedDatasets
7
+ from ..core.pydantic_utilities import parse_obj_as
8
+ from json.decoder import JSONDecodeError
9
+ from ..core.api_error import ApiError
10
+ from .types.dataset import Dataset
11
+ from .types.paginated_dataset_files import PaginatedDatasetFiles
12
+ from ..core.jsonable_encoder import jsonable_encoder
13
+ from .. import core
14
+ from .types.file_purpose import FilePurpose
15
+ from ..core.client_wrapper import AsyncClientWrapper
16
+
17
+ # this is used as the default value for optional parameters
18
+ OMIT = typing.cast(typing.Any, ...)
19
+
20
+
21
+ class DatasetsClient:
22
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
23
+ self._client_wrapper = client_wrapper
24
+
25
+ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> PaginatedDatasets:
26
+ """
27
+ Parameters
28
+ ----------
29
+ request_options : typing.Optional[RequestOptions]
30
+ Request-specific configuration.
31
+
32
+ Returns
33
+ -------
34
+ PaginatedDatasets
35
+
36
+ Examples
37
+ --------
38
+ from cartesia import Cartesia
39
+
40
+ client = Cartesia(
41
+ api_key="YOUR_API_KEY",
42
+ )
43
+ client.datasets.list()
44
+ """
45
+ _response = self._client_wrapper.httpx_client.request(
46
+ "datasets/",
47
+ method="GET",
48
+ request_options=request_options,
49
+ )
50
+ try:
51
+ if 200 <= _response.status_code < 300:
52
+ return typing.cast(
53
+ PaginatedDatasets,
54
+ parse_obj_as(
55
+ type_=PaginatedDatasets, # type: ignore
56
+ object_=_response.json(),
57
+ ),
58
+ )
59
+ _response_json = _response.json()
60
+ except JSONDecodeError:
61
+ raise ApiError(status_code=_response.status_code, body=_response.text)
62
+ raise ApiError(status_code=_response.status_code, body=_response_json)
63
+
64
+ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> Dataset:
65
+ """
66
+ Parameters
67
+ ----------
68
+ name : str
69
+
70
+ request_options : typing.Optional[RequestOptions]
71
+ Request-specific configuration.
72
+
73
+ Returns
74
+ -------
75
+ Dataset
76
+
77
+ Examples
78
+ --------
79
+ from cartesia import Cartesia
80
+
81
+ client = Cartesia(
82
+ api_key="YOUR_API_KEY",
83
+ )
84
+ client.datasets.create(
85
+ name="string",
86
+ )
87
+ """
88
+ _response = self._client_wrapper.httpx_client.request(
89
+ "datasets/",
90
+ method="POST",
91
+ json={
92
+ "name": name,
93
+ },
94
+ request_options=request_options,
95
+ omit=OMIT,
96
+ )
97
+ try:
98
+ if 200 <= _response.status_code < 300:
99
+ return typing.cast(
100
+ Dataset,
101
+ parse_obj_as(
102
+ type_=Dataset, # type: ignore
103
+ object_=_response.json(),
104
+ ),
105
+ )
106
+ _response_json = _response.json()
107
+ except JSONDecodeError:
108
+ raise ApiError(status_code=_response.status_code, body=_response.text)
109
+ raise ApiError(status_code=_response.status_code, body=_response_json)
110
+
111
+ def list_files(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> PaginatedDatasetFiles:
112
+ """
113
+ Parameters
114
+ ----------
115
+ id : str
116
+
117
+ request_options : typing.Optional[RequestOptions]
118
+ Request-specific configuration.
119
+
120
+ Returns
121
+ -------
122
+ PaginatedDatasetFiles
123
+
124
+ Examples
125
+ --------
126
+ from cartesia import Cartesia
127
+
128
+ client = Cartesia(
129
+ api_key="YOUR_API_KEY",
130
+ )
131
+ client.datasets.list_files(
132
+ id="string",
133
+ )
134
+ """
135
+ _response = self._client_wrapper.httpx_client.request(
136
+ f"datasets/{jsonable_encoder(id)}/files",
137
+ method="GET",
138
+ request_options=request_options,
139
+ )
140
+ try:
141
+ if 200 <= _response.status_code < 300:
142
+ return typing.cast(
143
+ PaginatedDatasetFiles,
144
+ parse_obj_as(
145
+ type_=PaginatedDatasetFiles, # type: ignore
146
+ object_=_response.json(),
147
+ ),
148
+ )
149
+ _response_json = _response.json()
150
+ except JSONDecodeError:
151
+ raise ApiError(status_code=_response.status_code, body=_response.text)
152
+ raise ApiError(status_code=_response.status_code, body=_response_json)
153
+
154
+ def upload_file(
155
+ self, id: str, *, file: core.File, purpose: FilePurpose, request_options: typing.Optional[RequestOptions] = None
156
+ ) -> None:
157
+ """
158
+ Parameters
159
+ ----------
160
+ id : str
161
+
162
+ file : core.File
163
+ See core.File for more documentation
164
+
165
+ purpose : FilePurpose
166
+
167
+ request_options : typing.Optional[RequestOptions]
168
+ Request-specific configuration.
169
+
170
+ Returns
171
+ -------
172
+ None
173
+
174
+ Examples
175
+ --------
176
+ from cartesia import Cartesia
177
+
178
+ client = Cartesia(
179
+ api_key="YOUR_API_KEY",
180
+ )
181
+ client.datasets.upload_file(
182
+ id="string",
183
+ )
184
+ """
185
+ _response = self._client_wrapper.httpx_client.request(
186
+ f"datasets/{jsonable_encoder(id)}/files",
187
+ method="POST",
188
+ data={
189
+ "purpose": purpose,
190
+ },
191
+ files={
192
+ "file": file,
193
+ },
194
+ request_options=request_options,
195
+ omit=OMIT,
196
+ )
197
+ try:
198
+ if 200 <= _response.status_code < 300:
199
+ return
200
+ _response_json = _response.json()
201
+ except JSONDecodeError:
202
+ raise ApiError(status_code=_response.status_code, body=_response.text)
203
+ raise ApiError(status_code=_response.status_code, body=_response_json)
204
+
205
+
206
+ class AsyncDatasetsClient:
207
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
208
+ self._client_wrapper = client_wrapper
209
+
210
+ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> PaginatedDatasets:
211
+ """
212
+ Parameters
213
+ ----------
214
+ request_options : typing.Optional[RequestOptions]
215
+ Request-specific configuration.
216
+
217
+ Returns
218
+ -------
219
+ PaginatedDatasets
220
+
221
+ Examples
222
+ --------
223
+ import asyncio
224
+
225
+ from cartesia import AsyncCartesia
226
+
227
+ client = AsyncCartesia(
228
+ api_key="YOUR_API_KEY",
229
+ )
230
+
231
+
232
+ async def main() -> None:
233
+ await client.datasets.list()
234
+
235
+
236
+ asyncio.run(main())
237
+ """
238
+ _response = await self._client_wrapper.httpx_client.request(
239
+ "datasets/",
240
+ method="GET",
241
+ request_options=request_options,
242
+ )
243
+ try:
244
+ if 200 <= _response.status_code < 300:
245
+ return typing.cast(
246
+ PaginatedDatasets,
247
+ parse_obj_as(
248
+ type_=PaginatedDatasets, # type: ignore
249
+ object_=_response.json(),
250
+ ),
251
+ )
252
+ _response_json = _response.json()
253
+ except JSONDecodeError:
254
+ raise ApiError(status_code=_response.status_code, body=_response.text)
255
+ raise ApiError(status_code=_response.status_code, body=_response_json)
256
+
257
+ async def create(self, *, name: str, request_options: typing.Optional[RequestOptions] = None) -> Dataset:
258
+ """
259
+ Parameters
260
+ ----------
261
+ name : str
262
+
263
+ request_options : typing.Optional[RequestOptions]
264
+ Request-specific configuration.
265
+
266
+ Returns
267
+ -------
268
+ Dataset
269
+
270
+ Examples
271
+ --------
272
+ import asyncio
273
+
274
+ from cartesia import AsyncCartesia
275
+
276
+ client = AsyncCartesia(
277
+ api_key="YOUR_API_KEY",
278
+ )
279
+
280
+
281
+ async def main() -> None:
282
+ await client.datasets.create(
283
+ name="string",
284
+ )
285
+
286
+
287
+ asyncio.run(main())
288
+ """
289
+ _response = await self._client_wrapper.httpx_client.request(
290
+ "datasets/",
291
+ method="POST",
292
+ json={
293
+ "name": name,
294
+ },
295
+ request_options=request_options,
296
+ omit=OMIT,
297
+ )
298
+ try:
299
+ if 200 <= _response.status_code < 300:
300
+ return typing.cast(
301
+ Dataset,
302
+ parse_obj_as(
303
+ type_=Dataset, # type: ignore
304
+ object_=_response.json(),
305
+ ),
306
+ )
307
+ _response_json = _response.json()
308
+ except JSONDecodeError:
309
+ raise ApiError(status_code=_response.status_code, body=_response.text)
310
+ raise ApiError(status_code=_response.status_code, body=_response_json)
311
+
312
+ async def list_files(
313
+ self, id: str, *, request_options: typing.Optional[RequestOptions] = None
314
+ ) -> PaginatedDatasetFiles:
315
+ """
316
+ Parameters
317
+ ----------
318
+ id : str
319
+
320
+ request_options : typing.Optional[RequestOptions]
321
+ Request-specific configuration.
322
+
323
+ Returns
324
+ -------
325
+ PaginatedDatasetFiles
326
+
327
+ Examples
328
+ --------
329
+ import asyncio
330
+
331
+ from cartesia import AsyncCartesia
332
+
333
+ client = AsyncCartesia(
334
+ api_key="YOUR_API_KEY",
335
+ )
336
+
337
+
338
+ async def main() -> None:
339
+ await client.datasets.list_files(
340
+ id="string",
341
+ )
342
+
343
+
344
+ asyncio.run(main())
345
+ """
346
+ _response = await self._client_wrapper.httpx_client.request(
347
+ f"datasets/{jsonable_encoder(id)}/files",
348
+ method="GET",
349
+ request_options=request_options,
350
+ )
351
+ try:
352
+ if 200 <= _response.status_code < 300:
353
+ return typing.cast(
354
+ PaginatedDatasetFiles,
355
+ parse_obj_as(
356
+ type_=PaginatedDatasetFiles, # type: ignore
357
+ object_=_response.json(),
358
+ ),
359
+ )
360
+ _response_json = _response.json()
361
+ except JSONDecodeError:
362
+ raise ApiError(status_code=_response.status_code, body=_response.text)
363
+ raise ApiError(status_code=_response.status_code, body=_response_json)
364
+
365
+ async def upload_file(
366
+ self, id: str, *, file: core.File, purpose: FilePurpose, request_options: typing.Optional[RequestOptions] = None
367
+ ) -> None:
368
+ """
369
+ Parameters
370
+ ----------
371
+ id : str
372
+
373
+ file : core.File
374
+ See core.File for more documentation
375
+
376
+ purpose : FilePurpose
377
+
378
+ request_options : typing.Optional[RequestOptions]
379
+ Request-specific configuration.
380
+
381
+ Returns
382
+ -------
383
+ None
384
+
385
+ Examples
386
+ --------
387
+ import asyncio
388
+
389
+ from cartesia import AsyncCartesia
390
+
391
+ client = AsyncCartesia(
392
+ api_key="YOUR_API_KEY",
393
+ )
394
+
395
+
396
+ async def main() -> None:
397
+ await client.datasets.upload_file(
398
+ id="string",
399
+ )
400
+
401
+
402
+ asyncio.run(main())
403
+ """
404
+ _response = await self._client_wrapper.httpx_client.request(
405
+ f"datasets/{jsonable_encoder(id)}/files",
406
+ method="POST",
407
+ data={
408
+ "purpose": purpose,
409
+ },
410
+ files={
411
+ "file": file,
412
+ },
413
+ request_options=request_options,
414
+ omit=OMIT,
415
+ )
416
+ try:
417
+ if 200 <= _response.status_code < 300:
418
+ return
419
+ _response_json = _response.json()
420
+ except JSONDecodeError:
421
+ raise ApiError(status_code=_response.status_code, body=_response.text)
422
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,15 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .create_dataset_request import CreateDatasetRequestParams
4
+ from .dataset import DatasetParams
5
+ from .dataset_file import DatasetFileParams
6
+ from .paginated_dataset_files import PaginatedDatasetFilesParams
7
+ from .paginated_datasets import PaginatedDatasetsParams
8
+
9
+ __all__ = [
10
+ "CreateDatasetRequestParams",
11
+ "DatasetFileParams",
12
+ "DatasetParams",
13
+ "PaginatedDatasetFilesParams",
14
+ "PaginatedDatasetsParams",
15
+ ]
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+
5
+
6
+ class CreateDatasetRequestParams(typing_extensions.TypedDict):
7
+ name: str
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+
5
+
6
+ class DatasetParams(typing_extensions.TypedDict):
7
+ id: str
8
+ name: str
9
+ created_at: str
@@ -0,0 +1,9 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+
5
+
6
+ class DatasetFileParams(typing_extensions.TypedDict):
7
+ id: str
8
+ filename: str
9
+ created_at: str
@@ -0,0 +1,10 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+ import typing
5
+ from .dataset_file import DatasetFileParams
6
+
7
+
8
+ class PaginatedDatasetFilesParams(typing_extensions.TypedDict):
9
+ data: typing.Sequence[DatasetFileParams]
10
+ has_more: bool
@@ -0,0 +1,10 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+ import typing
5
+ from .dataset import DatasetParams
6
+
7
+
8
+ class PaginatedDatasetsParams(typing_extensions.TypedDict):
9
+ data: typing.Sequence[DatasetParams]
10
+ has_more: bool
@@ -0,0 +1,17 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .create_dataset_request import CreateDatasetRequest
4
+ from .dataset import Dataset
5
+ from .dataset_file import DatasetFile
6
+ from .file_purpose import FilePurpose
7
+ from .paginated_dataset_files import PaginatedDatasetFiles
8
+ from .paginated_datasets import PaginatedDatasets
9
+
10
+ __all__ = [
11
+ "CreateDatasetRequest",
12
+ "Dataset",
13
+ "DatasetFile",
14
+ "FilePurpose",
15
+ "PaginatedDatasetFiles",
16
+ "PaginatedDatasets",
17
+ ]
@@ -0,0 +1,19 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class CreateDatasetRequest(UniversalBaseModel):
10
+ name: str
11
+
12
+ if IS_PYDANTIC_V2:
13
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
14
+ else:
15
+
16
+ class Config:
17
+ frozen = True
18
+ smart_union = True
19
+ extra = pydantic.Extra.allow
@@ -0,0 +1,21 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class Dataset(UniversalBaseModel):
10
+ id: str
11
+ name: str
12
+ created_at: str
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
+ else:
17
+
18
+ class Config:
19
+ frozen = True
20
+ smart_union = True
21
+ extra = pydantic.Extra.allow
@@ -0,0 +1,21 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class DatasetFile(UniversalBaseModel):
10
+ id: str
11
+ filename: str
12
+ created_at: str
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
+ else:
17
+
18
+ class Config:
19
+ frozen = True
20
+ smart_union = True
21
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ FilePurpose = typing.Union[typing.Literal["fine_tune"], typing.Any]
@@ -0,0 +1,21 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .dataset_file import DatasetFile
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class PaginatedDatasetFiles(UniversalBaseModel):
11
+ data: typing.List[DatasetFile]
12
+ has_more: bool
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
+ else:
17
+
18
+ class Config:
19
+ frozen = True
20
+ smart_union = True
21
+ extra = pydantic.Extra.allow
@@ -0,0 +1,21 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .dataset import Dataset
6
+ from ...core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class PaginatedDatasets(UniversalBaseModel):
11
+ data: typing.List[Dataset]
12
+ has_more: bool
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
+ else:
17
+
18
+ class Config:
19
+ frozen = True
20
+ smart_union = True
21
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import Embedding
4
+
5
+ __all__ = ["Embedding"]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .embedding import Embedding
4
+
5
+ __all__ = ["Embedding"]