casedev 0.1.0__py3-none-any.whl → 0.2.0__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.
- casedev/_base_client.py +140 -11
- casedev/_client.py +290 -119
- casedev/_models.py +16 -1
- casedev/_types.py +12 -2
- casedev/_version.py +1 -1
- casedev/resources/__init__.py +0 -70
- casedev/resources/compute/v1/__init__.py +0 -42
- casedev/resources/compute/v1/environments.py +16 -19
- casedev/resources/compute/v1/secrets.py +35 -41
- casedev/resources/compute/v1/v1.py +14 -276
- casedev/resources/format/v1/templates.py +11 -13
- casedev/resources/llm/llm.py +6 -7
- casedev/resources/llm/v1/v1.py +11 -13
- casedev/resources/ocr/v1.py +10 -13
- casedev/resources/search/v1.py +6 -7
- casedev/resources/vault/graphrag.py +11 -13
- casedev/resources/vault/objects.py +20 -25
- casedev/resources/vault/vault.py +64 -28
- casedev/resources/voice/streaming.py +6 -7
- casedev/resources/voice/transcription.py +82 -23
- casedev/resources/voice/v1/speak.py +1 -195
- casedev/resources/voice/v1/v1.py +6 -7
- casedev/types/__init__.py +2 -0
- casedev/types/compute/__init__.py +1 -2
- casedev/types/compute/v1/__init__.py +7 -5
- casedev/types/compute/v1/environment_list_response.py +40 -0
- casedev/types/compute/v1/environment_retrieve_response.py +36 -0
- casedev/types/compute/v1/environment_set_default_response.py +36 -0
- casedev/types/{convert/v1_webhook_response.py → compute/v1/secret_delete_group_response.py} +3 -3
- casedev/types/compute/v1/secret_list_response.py +31 -0
- casedev/types/compute/v1/secret_retrieve_group_response.py +38 -0
- casedev/types/compute/v1/secret_update_group_response.py +22 -0
- casedev/types/compute/v1_get_usage_response.py +51 -0
- casedev/types/format/v1/__init__.py +2 -0
- casedev/types/format/v1/template_list_response.py +40 -0
- casedev/types/format/v1/template_retrieve_response.py +33 -0
- casedev/types/llm/__init__.py +2 -0
- casedev/types/llm/v1_create_embedding_response.py +31 -0
- casedev/types/llm/v1_list_models_response.py +41 -0
- casedev/types/llm_get_config_response.py +33 -0
- casedev/types/ocr/__init__.py +2 -0
- casedev/types/ocr/v1_download_response.py +7 -0
- casedev/types/ocr/v1_process_params.py +2 -0
- casedev/types/ocr/v1_retrieve_response.py +32 -0
- casedev/types/search/__init__.py +1 -0
- casedev/types/search/v1_retrieve_research_response.py +74 -0
- casedev/types/vault/__init__.py +6 -0
- casedev/types/vault/graphrag_get_stats_response.py +31 -0
- casedev/types/{workflows/v1_delete_response.py → vault/graphrag_init_response.py} +6 -2
- casedev/types/vault/object_download_response.py +7 -0
- casedev/types/vault/object_get_text_response.py +35 -0
- casedev/types/vault/object_list_response.py +64 -0
- casedev/types/vault/object_retrieve_response.py +57 -0
- casedev/types/vault_create_params.py +16 -1
- casedev/types/vault_create_response.py +5 -2
- casedev/types/vault_ingest_response.py +15 -5
- casedev/types/vault_retrieve_response.py +76 -0
- casedev/types/vault_search_params.py +19 -5
- casedev/types/vault_search_response.py +25 -1
- casedev/types/vault_upload_params.py +7 -0
- casedev/types/vault_upload_response.py +6 -0
- casedev/types/voice/__init__.py +3 -0
- casedev/types/voice/streaming_get_url_response.py +44 -0
- casedev/types/voice/transcription_create_params.py +23 -3
- casedev/types/voice/transcription_create_response.py +22 -0
- casedev/types/voice/transcription_retrieve_response.py +19 -17
- casedev/types/voice/v1/__init__.py +0 -1
- casedev/types/voice/v1/speak_create_params.py +2 -0
- casedev/types/voice/v1_list_voices_response.py +40 -0
- casedev/types/webhooks/__init__.py +0 -3
- {casedev-0.1.0.dist-info → casedev-0.2.0.dist-info}/METADATA +10 -13
- casedev-0.2.0.dist-info/RECORD +149 -0
- {casedev-0.1.0.dist-info → casedev-0.2.0.dist-info}/licenses/LICENSE +1 -1
- casedev/resources/actions/__init__.py +0 -33
- casedev/resources/actions/actions.py +0 -102
- casedev/resources/actions/v1.py +0 -640
- casedev/resources/compute/v1/functions.py +0 -278
- casedev/resources/compute/v1/invoke.py +0 -216
- casedev/resources/compute/v1/runs.py +0 -290
- casedev/resources/convert/__init__.py +0 -33
- casedev/resources/convert/convert.py +0 -102
- casedev/resources/convert/v1/__init__.py +0 -33
- casedev/resources/convert/v1/jobs.py +0 -254
- casedev/resources/convert/v1/v1.py +0 -450
- casedev/resources/templates/__init__.py +0 -33
- casedev/resources/templates/templates.py +0 -102
- casedev/resources/templates/v1.py +0 -633
- casedev/resources/webhooks/__init__.py +0 -33
- casedev/resources/webhooks/v1.py +0 -447
- casedev/resources/webhooks/webhooks.py +0 -102
- casedev/resources/workflows/__init__.py +0 -33
- casedev/resources/workflows/v1.py +0 -1053
- casedev/resources/workflows/workflows.py +0 -102
- casedev/types/actions/__init__.py +0 -8
- casedev/types/actions/v1_create_params.py +0 -22
- casedev/types/actions/v1_create_response.py +0 -33
- casedev/types/actions/v1_execute_params.py +0 -16
- casedev/types/actions/v1_execute_response.py +0 -31
- casedev/types/compute/v1/function_get_logs_params.py +0 -12
- casedev/types/compute/v1/function_list_params.py +0 -12
- casedev/types/compute/v1/invoke_run_params.py +0 -21
- casedev/types/compute/v1/invoke_run_response.py +0 -39
- casedev/types/compute/v1/run_list_params.py +0 -18
- casedev/types/compute/v1_deploy_params.py +0 -114
- casedev/types/compute/v1_deploy_response.py +0 -30
- casedev/types/convert/__init__.py +0 -8
- casedev/types/convert/v1/__init__.py +0 -3
- casedev/types/convert/v1_process_params.py +0 -15
- casedev/types/convert/v1_process_response.py +0 -19
- casedev/types/convert/v1_webhook_params.py +0 -32
- casedev/types/templates/__init__.py +0 -8
- casedev/types/templates/v1_execute_params.py +0 -22
- casedev/types/templates/v1_execute_response.py +0 -31
- casedev/types/templates/v1_list_params.py +0 -32
- casedev/types/templates/v1_search_params.py +0 -18
- casedev/types/voice/v1/speak_stream_params.py +0 -58
- casedev/types/webhooks/v1_create_params.py +0 -20
- casedev/types/webhooks/v1_create_response.py +0 -33
- casedev/types/workflows/__init__.py +0 -19
- casedev/types/workflows/v1_create_params.py +0 -32
- casedev/types/workflows/v1_create_response.py +0 -29
- casedev/types/workflows/v1_deploy_response.py +0 -20
- casedev/types/workflows/v1_execute_params.py +0 -12
- casedev/types/workflows/v1_execute_response.py +0 -22
- casedev/types/workflows/v1_list_executions_params.py +0 -13
- casedev/types/workflows/v1_list_executions_response.py +0 -27
- casedev/types/workflows/v1_list_params.py +0 -18
- casedev/types/workflows/v1_list_response.py +0 -37
- casedev/types/workflows/v1_retrieve_execution_response.py +0 -31
- casedev/types/workflows/v1_retrieve_response.py +0 -35
- casedev/types/workflows/v1_undeploy_response.py +0 -13
- casedev/types/workflows/v1_update_params.py +0 -26
- casedev/types/workflows/v1_update_response.py +0 -17
- casedev-0.1.0.dist-info/RECORD +0 -185
- {casedev-0.1.0.dist-info → casedev-0.2.0.dist-info}/WHEEL +0 -0
casedev/resources/vault/vault.py
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
6
5
|
from typing_extensions import Literal
|
|
7
6
|
|
|
8
7
|
import httpx
|
|
@@ -16,7 +15,7 @@ from .objects import (
|
|
|
16
15
|
ObjectsResourceWithStreamingResponse,
|
|
17
16
|
AsyncObjectsResourceWithStreamingResponse,
|
|
18
17
|
)
|
|
19
|
-
from ..._types import Body, Omit, Query, Headers,
|
|
18
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
20
19
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
21
20
|
from .graphrag import (
|
|
22
21
|
GraphragResource,
|
|
@@ -40,6 +39,7 @@ from ...types.vault_create_response import VaultCreateResponse
|
|
|
40
39
|
from ...types.vault_ingest_response import VaultIngestResponse
|
|
41
40
|
from ...types.vault_search_response import VaultSearchResponse
|
|
42
41
|
from ...types.vault_upload_response import VaultUploadResponse
|
|
42
|
+
from ...types.vault_retrieve_response import VaultRetrieveResponse
|
|
43
43
|
|
|
44
44
|
__all__ = ["VaultResource", "AsyncVaultResource"]
|
|
45
45
|
|
|
@@ -78,6 +78,8 @@ class VaultResource(SyncAPIResource):
|
|
|
78
78
|
name: str,
|
|
79
79
|
description: str | Omit = omit,
|
|
80
80
|
enable_graph: bool | Omit = omit,
|
|
81
|
+
enable_indexing: bool | Omit = omit,
|
|
82
|
+
metadata: object | Omit = omit,
|
|
81
83
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
82
84
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
83
85
|
extra_headers: Headers | None = None,
|
|
@@ -88,15 +90,22 @@ class VaultResource(SyncAPIResource):
|
|
|
88
90
|
"""
|
|
89
91
|
Creates a new secure vault with dedicated S3 storage and vector search
|
|
90
92
|
capabilities. Each vault provides isolated document storage with semantic
|
|
91
|
-
search, OCR processing, and optional knowledge graph features for legal
|
|
92
|
-
analysis and discovery.
|
|
93
|
+
search, OCR processing, and optional GraphRAG knowledge graph features for legal
|
|
94
|
+
document analysis and discovery.
|
|
93
95
|
|
|
94
96
|
Args:
|
|
95
97
|
name: Display name for the vault
|
|
96
98
|
|
|
97
99
|
description: Optional description of the vault's purpose
|
|
98
100
|
|
|
99
|
-
enable_graph: Enable knowledge graph for entity relationship mapping
|
|
101
|
+
enable_graph: Enable knowledge graph for entity relationship mapping. Only applies when
|
|
102
|
+
enableIndexing is true.
|
|
103
|
+
|
|
104
|
+
enable_indexing: Enable vector indexing and search capabilities. Set to false for storage-only
|
|
105
|
+
vaults.
|
|
106
|
+
|
|
107
|
+
metadata: Optional metadata to attach to the vault (e.g., { containsPHI: true } for HIPAA
|
|
108
|
+
compliance tracking)
|
|
100
109
|
|
|
101
110
|
extra_headers: Send extra headers
|
|
102
111
|
|
|
@@ -113,6 +122,8 @@ class VaultResource(SyncAPIResource):
|
|
|
113
122
|
"name": name,
|
|
114
123
|
"description": description,
|
|
115
124
|
"enable_graph": enable_graph,
|
|
125
|
+
"enable_indexing": enable_indexing,
|
|
126
|
+
"metadata": metadata,
|
|
116
127
|
},
|
|
117
128
|
vault_create_params.VaultCreateParams,
|
|
118
129
|
),
|
|
@@ -132,7 +143,7 @@ class VaultResource(SyncAPIResource):
|
|
|
132
143
|
extra_query: Query | None = None,
|
|
133
144
|
extra_body: Body | None = None,
|
|
134
145
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
135
|
-
) ->
|
|
146
|
+
) -> VaultRetrieveResponse:
|
|
136
147
|
"""
|
|
137
148
|
Retrieve detailed information about a specific vault, including storage
|
|
138
149
|
configuration, chunking strategy, and usage statistics. Returns vault metadata,
|
|
@@ -149,13 +160,12 @@ class VaultResource(SyncAPIResource):
|
|
|
149
160
|
"""
|
|
150
161
|
if not id:
|
|
151
162
|
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
152
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
153
163
|
return self._get(
|
|
154
164
|
f"/vault/{id}",
|
|
155
165
|
options=make_request_options(
|
|
156
166
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
157
167
|
),
|
|
158
|
-
cast_to=
|
|
168
|
+
cast_to=VaultRetrieveResponse,
|
|
159
169
|
)
|
|
160
170
|
|
|
161
171
|
def list(
|
|
@@ -171,7 +181,7 @@ class VaultResource(SyncAPIResource):
|
|
|
171
181
|
"""List all vaults for the authenticated organization.
|
|
172
182
|
|
|
173
183
|
Returns vault metadata
|
|
174
|
-
including storage configuration and usage statistics.
|
|
184
|
+
including name, description, storage configuration, and usage statistics.
|
|
175
185
|
"""
|
|
176
186
|
return self._get(
|
|
177
187
|
"/vault",
|
|
@@ -194,10 +204,12 @@ class VaultResource(SyncAPIResource):
|
|
|
194
204
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
195
205
|
) -> VaultIngestResponse:
|
|
196
206
|
"""
|
|
197
|
-
Triggers
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
207
|
+
Triggers ingestion workflow for a vault object to extract text, generate chunks,
|
|
208
|
+
and create embeddings. For supported file types (PDF, DOCX, TXT, RTF, XML,
|
|
209
|
+
audio, video), processing happens asynchronously. For unsupported types (images,
|
|
210
|
+
archives, etc.), the file is marked as completed immediately without text
|
|
211
|
+
extraction. GraphRAG indexing must be triggered separately via POST
|
|
212
|
+
/vault/:id/graphrag/:objectId.
|
|
201
213
|
|
|
202
214
|
Args:
|
|
203
215
|
extra_headers: Send extra headers
|
|
@@ -225,7 +237,7 @@ class VaultResource(SyncAPIResource):
|
|
|
225
237
|
id: str,
|
|
226
238
|
*,
|
|
227
239
|
query: str,
|
|
228
|
-
filters:
|
|
240
|
+
filters: vault_search_params.Filters | Omit = omit,
|
|
229
241
|
method: Literal["vector", "graph", "hybrid", "global", "local", "fast", "entity"] | Omit = omit,
|
|
230
242
|
top_k: int | Omit = omit,
|
|
231
243
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -244,7 +256,7 @@ class VaultResource(SyncAPIResource):
|
|
|
244
256
|
Args:
|
|
245
257
|
query: Search query or question to find relevant documents
|
|
246
258
|
|
|
247
|
-
filters:
|
|
259
|
+
filters: Filters to narrow search results to specific documents
|
|
248
260
|
|
|
249
261
|
method: Search method: 'global' for comprehensive questions, 'entity' for specific
|
|
250
262
|
entities, 'fast' for quick similarity search, 'hybrid' for combined approach
|
|
@@ -286,6 +298,7 @@ class VaultResource(SyncAPIResource):
|
|
|
286
298
|
filename: str,
|
|
287
299
|
auto_index: bool | Omit = omit,
|
|
288
300
|
metadata: object | Omit = omit,
|
|
301
|
+
path: str | Omit = omit,
|
|
289
302
|
size_bytes: float | Omit = omit,
|
|
290
303
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
291
304
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -309,6 +322,10 @@ class VaultResource(SyncAPIResource):
|
|
|
309
322
|
|
|
310
323
|
metadata: Additional metadata to associate with the file
|
|
311
324
|
|
|
325
|
+
path: Optional folder path for hierarchy preservation. Allows integrations to maintain
|
|
326
|
+
source folder structure from systems like NetDocs, Clio, or Smokeball. Example:
|
|
327
|
+
'/Discovery/Depositions/2024'
|
|
328
|
+
|
|
312
329
|
size_bytes: Estimated file size in bytes for cost calculation
|
|
313
330
|
|
|
314
331
|
extra_headers: Send extra headers
|
|
@@ -329,6 +346,7 @@ class VaultResource(SyncAPIResource):
|
|
|
329
346
|
"filename": filename,
|
|
330
347
|
"auto_index": auto_index,
|
|
331
348
|
"metadata": metadata,
|
|
349
|
+
"path": path,
|
|
332
350
|
"size_bytes": size_bytes,
|
|
333
351
|
},
|
|
334
352
|
vault_upload_params.VaultUploadParams,
|
|
@@ -374,6 +392,8 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
374
392
|
name: str,
|
|
375
393
|
description: str | Omit = omit,
|
|
376
394
|
enable_graph: bool | Omit = omit,
|
|
395
|
+
enable_indexing: bool | Omit = omit,
|
|
396
|
+
metadata: object | Omit = omit,
|
|
377
397
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
378
398
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
379
399
|
extra_headers: Headers | None = None,
|
|
@@ -384,15 +404,22 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
384
404
|
"""
|
|
385
405
|
Creates a new secure vault with dedicated S3 storage and vector search
|
|
386
406
|
capabilities. Each vault provides isolated document storage with semantic
|
|
387
|
-
search, OCR processing, and optional knowledge graph features for legal
|
|
388
|
-
analysis and discovery.
|
|
407
|
+
search, OCR processing, and optional GraphRAG knowledge graph features for legal
|
|
408
|
+
document analysis and discovery.
|
|
389
409
|
|
|
390
410
|
Args:
|
|
391
411
|
name: Display name for the vault
|
|
392
412
|
|
|
393
413
|
description: Optional description of the vault's purpose
|
|
394
414
|
|
|
395
|
-
enable_graph: Enable knowledge graph for entity relationship mapping
|
|
415
|
+
enable_graph: Enable knowledge graph for entity relationship mapping. Only applies when
|
|
416
|
+
enableIndexing is true.
|
|
417
|
+
|
|
418
|
+
enable_indexing: Enable vector indexing and search capabilities. Set to false for storage-only
|
|
419
|
+
vaults.
|
|
420
|
+
|
|
421
|
+
metadata: Optional metadata to attach to the vault (e.g., { containsPHI: true } for HIPAA
|
|
422
|
+
compliance tracking)
|
|
396
423
|
|
|
397
424
|
extra_headers: Send extra headers
|
|
398
425
|
|
|
@@ -409,6 +436,8 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
409
436
|
"name": name,
|
|
410
437
|
"description": description,
|
|
411
438
|
"enable_graph": enable_graph,
|
|
439
|
+
"enable_indexing": enable_indexing,
|
|
440
|
+
"metadata": metadata,
|
|
412
441
|
},
|
|
413
442
|
vault_create_params.VaultCreateParams,
|
|
414
443
|
),
|
|
@@ -428,7 +457,7 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
428
457
|
extra_query: Query | None = None,
|
|
429
458
|
extra_body: Body | None = None,
|
|
430
459
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
431
|
-
) ->
|
|
460
|
+
) -> VaultRetrieveResponse:
|
|
432
461
|
"""
|
|
433
462
|
Retrieve detailed information about a specific vault, including storage
|
|
434
463
|
configuration, chunking strategy, and usage statistics. Returns vault metadata,
|
|
@@ -445,13 +474,12 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
445
474
|
"""
|
|
446
475
|
if not id:
|
|
447
476
|
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
448
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
449
477
|
return await self._get(
|
|
450
478
|
f"/vault/{id}",
|
|
451
479
|
options=make_request_options(
|
|
452
480
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
453
481
|
),
|
|
454
|
-
cast_to=
|
|
482
|
+
cast_to=VaultRetrieveResponse,
|
|
455
483
|
)
|
|
456
484
|
|
|
457
485
|
async def list(
|
|
@@ -467,7 +495,7 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
467
495
|
"""List all vaults for the authenticated organization.
|
|
468
496
|
|
|
469
497
|
Returns vault metadata
|
|
470
|
-
including storage configuration and usage statistics.
|
|
498
|
+
including name, description, storage configuration, and usage statistics.
|
|
471
499
|
"""
|
|
472
500
|
return await self._get(
|
|
473
501
|
"/vault",
|
|
@@ -490,10 +518,12 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
490
518
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
491
519
|
) -> VaultIngestResponse:
|
|
492
520
|
"""
|
|
493
|
-
Triggers
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
521
|
+
Triggers ingestion workflow for a vault object to extract text, generate chunks,
|
|
522
|
+
and create embeddings. For supported file types (PDF, DOCX, TXT, RTF, XML,
|
|
523
|
+
audio, video), processing happens asynchronously. For unsupported types (images,
|
|
524
|
+
archives, etc.), the file is marked as completed immediately without text
|
|
525
|
+
extraction. GraphRAG indexing must be triggered separately via POST
|
|
526
|
+
/vault/:id/graphrag/:objectId.
|
|
497
527
|
|
|
498
528
|
Args:
|
|
499
529
|
extra_headers: Send extra headers
|
|
@@ -521,7 +551,7 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
521
551
|
id: str,
|
|
522
552
|
*,
|
|
523
553
|
query: str,
|
|
524
|
-
filters:
|
|
554
|
+
filters: vault_search_params.Filters | Omit = omit,
|
|
525
555
|
method: Literal["vector", "graph", "hybrid", "global", "local", "fast", "entity"] | Omit = omit,
|
|
526
556
|
top_k: int | Omit = omit,
|
|
527
557
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -540,7 +570,7 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
540
570
|
Args:
|
|
541
571
|
query: Search query or question to find relevant documents
|
|
542
572
|
|
|
543
|
-
filters:
|
|
573
|
+
filters: Filters to narrow search results to specific documents
|
|
544
574
|
|
|
545
575
|
method: Search method: 'global' for comprehensive questions, 'entity' for specific
|
|
546
576
|
entities, 'fast' for quick similarity search, 'hybrid' for combined approach
|
|
@@ -582,6 +612,7 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
582
612
|
filename: str,
|
|
583
613
|
auto_index: bool | Omit = omit,
|
|
584
614
|
metadata: object | Omit = omit,
|
|
615
|
+
path: str | Omit = omit,
|
|
585
616
|
size_bytes: float | Omit = omit,
|
|
586
617
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
587
618
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -605,6 +636,10 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
605
636
|
|
|
606
637
|
metadata: Additional metadata to associate with the file
|
|
607
638
|
|
|
639
|
+
path: Optional folder path for hierarchy preservation. Allows integrations to maintain
|
|
640
|
+
source folder structure from systems like NetDocs, Clio, or Smokeball. Example:
|
|
641
|
+
'/Discovery/Depositions/2024'
|
|
642
|
+
|
|
608
643
|
size_bytes: Estimated file size in bytes for cost calculation
|
|
609
644
|
|
|
610
645
|
extra_headers: Send extra headers
|
|
@@ -625,6 +660,7 @@ class AsyncVaultResource(AsyncAPIResource):
|
|
|
625
660
|
"filename": filename,
|
|
626
661
|
"auto_index": auto_index,
|
|
627
662
|
"metadata": metadata,
|
|
663
|
+
"path": path,
|
|
628
664
|
"size_bytes": size_bytes,
|
|
629
665
|
},
|
|
630
666
|
vault_upload_params.VaultUploadParams,
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from ..._types import Body, Query, Headers,
|
|
7
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
8
8
|
from ..._compat import cached_property
|
|
9
9
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
10
|
from ..._response import (
|
|
@@ -14,6 +14,7 @@ from ..._response import (
|
|
|
14
14
|
async_to_streamed_response_wrapper,
|
|
15
15
|
)
|
|
16
16
|
from ..._base_client import make_request_options
|
|
17
|
+
from ...types.voice.streaming_get_url_response import StreamingGetURLResponse
|
|
17
18
|
|
|
18
19
|
__all__ = ["StreamingResource", "AsyncStreamingResource"]
|
|
19
20
|
|
|
@@ -47,7 +48,7 @@ class StreamingResource(SyncAPIResource):
|
|
|
47
48
|
extra_query: Query | None = None,
|
|
48
49
|
extra_body: Body | None = None,
|
|
49
50
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
50
|
-
) ->
|
|
51
|
+
) -> StreamingGetURLResponse:
|
|
51
52
|
"""
|
|
52
53
|
Returns the WebSocket URL and connection details for real-time audio
|
|
53
54
|
transcription. The returned URL can be used to establish a WebSocket connection
|
|
@@ -61,13 +62,12 @@ class StreamingResource(SyncAPIResource):
|
|
|
61
62
|
|
|
62
63
|
**Pricing:** $0.30 per minute ($18.00 per hour)
|
|
63
64
|
"""
|
|
64
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
65
65
|
return self._get(
|
|
66
66
|
"/voice/streaming/url",
|
|
67
67
|
options=make_request_options(
|
|
68
68
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
69
69
|
),
|
|
70
|
-
cast_to=
|
|
70
|
+
cast_to=StreamingGetURLResponse,
|
|
71
71
|
)
|
|
72
72
|
|
|
73
73
|
|
|
@@ -100,7 +100,7 @@ class AsyncStreamingResource(AsyncAPIResource):
|
|
|
100
100
|
extra_query: Query | None = None,
|
|
101
101
|
extra_body: Body | None = None,
|
|
102
102
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
103
|
-
) ->
|
|
103
|
+
) -> StreamingGetURLResponse:
|
|
104
104
|
"""
|
|
105
105
|
Returns the WebSocket URL and connection details for real-time audio
|
|
106
106
|
transcription. The returned URL can be used to establish a WebSocket connection
|
|
@@ -114,13 +114,12 @@ class AsyncStreamingResource(AsyncAPIResource):
|
|
|
114
114
|
|
|
115
115
|
**Pricing:** $0.30 per minute ($18.00 per hour)
|
|
116
116
|
"""
|
|
117
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
118
117
|
return await self._get(
|
|
119
118
|
"/voice/streaming/url",
|
|
120
119
|
options=make_request_options(
|
|
121
120
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
122
121
|
),
|
|
123
|
-
cast_to=
|
|
122
|
+
cast_to=StreamingGetURLResponse,
|
|
124
123
|
)
|
|
125
124
|
|
|
126
125
|
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
5
7
|
import httpx
|
|
6
8
|
|
|
7
|
-
from ..._types import Body, Omit, Query, Headers,
|
|
9
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
8
10
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
9
11
|
from ..._compat import cached_property
|
|
10
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -16,6 +18,7 @@ from ..._response import (
|
|
|
16
18
|
)
|
|
17
19
|
from ...types.voice import transcription_create_params
|
|
18
20
|
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.voice.transcription_create_response import TranscriptionCreateResponse
|
|
19
22
|
from ...types.voice.transcription_retrieve_response import TranscriptionRetrieveResponse
|
|
20
23
|
|
|
21
24
|
__all__ = ["TranscriptionResource", "AsyncTranscriptionResource"]
|
|
@@ -44,35 +47,49 @@ class TranscriptionResource(SyncAPIResource):
|
|
|
44
47
|
def create(
|
|
45
48
|
self,
|
|
46
49
|
*,
|
|
47
|
-
audio_url: str,
|
|
50
|
+
audio_url: str | Omit = omit,
|
|
48
51
|
auto_highlights: bool | Omit = omit,
|
|
52
|
+
boost_param: Literal["low", "default", "high"] | Omit = omit,
|
|
49
53
|
content_safety_labels: bool | Omit = omit,
|
|
54
|
+
format: Literal["json", "text"] | Omit = omit,
|
|
50
55
|
format_text: bool | Omit = omit,
|
|
51
56
|
language_code: str | Omit = omit,
|
|
52
57
|
language_detection: bool | Omit = omit,
|
|
58
|
+
object_id: str | Omit = omit,
|
|
53
59
|
punctuate: bool | Omit = omit,
|
|
54
60
|
speaker_labels: bool | Omit = omit,
|
|
61
|
+
speakers_expected: int | Omit = omit,
|
|
62
|
+
vault_id: str | Omit = omit,
|
|
63
|
+
word_boost: SequenceNotStr[str] | Omit = omit,
|
|
55
64
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
65
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
66
|
extra_headers: Headers | None = None,
|
|
58
67
|
extra_query: Query | None = None,
|
|
59
68
|
extra_body: Body | None = None,
|
|
60
69
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
61
|
-
) ->
|
|
70
|
+
) -> TranscriptionCreateResponse:
|
|
62
71
|
"""Creates an asynchronous transcription job for audio files.
|
|
63
72
|
|
|
64
|
-
Supports
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
Supports two modes:
|
|
74
|
+
|
|
75
|
+
**Vault-based (recommended)**: Pass `vault_id` and `object_id` to transcribe
|
|
76
|
+
audio from your vault. The transcript will automatically be saved back to the
|
|
77
|
+
vault when complete.
|
|
78
|
+
|
|
79
|
+
**Direct URL (legacy)**: Pass `audio_url` for direct transcription without
|
|
80
|
+
automatic storage.
|
|
68
81
|
|
|
69
82
|
Args:
|
|
70
|
-
audio_url: URL of the audio file to transcribe
|
|
83
|
+
audio_url: URL of the audio file to transcribe (legacy mode, no auto-storage)
|
|
71
84
|
|
|
72
85
|
auto_highlights: Automatically extract key phrases and topics
|
|
73
86
|
|
|
87
|
+
boost_param: How much to boost custom vocabulary
|
|
88
|
+
|
|
74
89
|
content_safety_labels: Enable content moderation and safety labeling
|
|
75
90
|
|
|
91
|
+
format: Output format for the transcript when using vault mode
|
|
92
|
+
|
|
76
93
|
format_text: Format text with proper capitalization
|
|
77
94
|
|
|
78
95
|
language_code: Language code (e.g., 'en_us', 'es', 'fr'). If not specified, language will be
|
|
@@ -80,10 +97,18 @@ class TranscriptionResource(SyncAPIResource):
|
|
|
80
97
|
|
|
81
98
|
language_detection: Enable automatic language detection
|
|
82
99
|
|
|
100
|
+
object_id: Object ID of the audio file in the vault (use with vault_id)
|
|
101
|
+
|
|
83
102
|
punctuate: Add punctuation to the transcript
|
|
84
103
|
|
|
85
104
|
speaker_labels: Enable speaker identification and labeling
|
|
86
105
|
|
|
106
|
+
speakers_expected: Expected number of speakers (improves accuracy when known)
|
|
107
|
+
|
|
108
|
+
vault_id: Vault ID containing the audio file (use with object_id)
|
|
109
|
+
|
|
110
|
+
word_boost: Custom vocabulary words to boost (e.g., legal terms)
|
|
111
|
+
|
|
87
112
|
extra_headers: Send extra headers
|
|
88
113
|
|
|
89
114
|
extra_query: Add additional query parameters to the request
|
|
@@ -92,26 +117,31 @@ class TranscriptionResource(SyncAPIResource):
|
|
|
92
117
|
|
|
93
118
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
94
119
|
"""
|
|
95
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
96
120
|
return self._post(
|
|
97
121
|
"/voice/transcription",
|
|
98
122
|
body=maybe_transform(
|
|
99
123
|
{
|
|
100
124
|
"audio_url": audio_url,
|
|
101
125
|
"auto_highlights": auto_highlights,
|
|
126
|
+
"boost_param": boost_param,
|
|
102
127
|
"content_safety_labels": content_safety_labels,
|
|
128
|
+
"format": format,
|
|
103
129
|
"format_text": format_text,
|
|
104
130
|
"language_code": language_code,
|
|
105
131
|
"language_detection": language_detection,
|
|
132
|
+
"object_id": object_id,
|
|
106
133
|
"punctuate": punctuate,
|
|
107
134
|
"speaker_labels": speaker_labels,
|
|
135
|
+
"speakers_expected": speakers_expected,
|
|
136
|
+
"vault_id": vault_id,
|
|
137
|
+
"word_boost": word_boost,
|
|
108
138
|
},
|
|
109
139
|
transcription_create_params.TranscriptionCreateParams,
|
|
110
140
|
),
|
|
111
141
|
options=make_request_options(
|
|
112
142
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
113
143
|
),
|
|
114
|
-
cast_to=
|
|
144
|
+
cast_to=TranscriptionCreateResponse,
|
|
115
145
|
)
|
|
116
146
|
|
|
117
147
|
def retrieve(
|
|
@@ -127,8 +157,9 @@ class TranscriptionResource(SyncAPIResource):
|
|
|
127
157
|
) -> TranscriptionRetrieveResponse:
|
|
128
158
|
"""Retrieve the status and result of an audio transcription job.
|
|
129
159
|
|
|
130
|
-
|
|
131
|
-
|
|
160
|
+
For vault-based
|
|
161
|
+
jobs, returns status and result_object_id when complete. For legacy direct URL
|
|
162
|
+
jobs, returns the full transcription data.
|
|
132
163
|
|
|
133
164
|
Args:
|
|
134
165
|
extra_headers: Send extra headers
|
|
@@ -173,35 +204,49 @@ class AsyncTranscriptionResource(AsyncAPIResource):
|
|
|
173
204
|
async def create(
|
|
174
205
|
self,
|
|
175
206
|
*,
|
|
176
|
-
audio_url: str,
|
|
207
|
+
audio_url: str | Omit = omit,
|
|
177
208
|
auto_highlights: bool | Omit = omit,
|
|
209
|
+
boost_param: Literal["low", "default", "high"] | Omit = omit,
|
|
178
210
|
content_safety_labels: bool | Omit = omit,
|
|
211
|
+
format: Literal["json", "text"] | Omit = omit,
|
|
179
212
|
format_text: bool | Omit = omit,
|
|
180
213
|
language_code: str | Omit = omit,
|
|
181
214
|
language_detection: bool | Omit = omit,
|
|
215
|
+
object_id: str | Omit = omit,
|
|
182
216
|
punctuate: bool | Omit = omit,
|
|
183
217
|
speaker_labels: bool | Omit = omit,
|
|
218
|
+
speakers_expected: int | Omit = omit,
|
|
219
|
+
vault_id: str | Omit = omit,
|
|
220
|
+
word_boost: SequenceNotStr[str] | Omit = omit,
|
|
184
221
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
185
222
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
186
223
|
extra_headers: Headers | None = None,
|
|
187
224
|
extra_query: Query | None = None,
|
|
188
225
|
extra_body: Body | None = None,
|
|
189
226
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
190
|
-
) ->
|
|
227
|
+
) -> TranscriptionCreateResponse:
|
|
191
228
|
"""Creates an asynchronous transcription job for audio files.
|
|
192
229
|
|
|
193
|
-
Supports
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
230
|
+
Supports two modes:
|
|
231
|
+
|
|
232
|
+
**Vault-based (recommended)**: Pass `vault_id` and `object_id` to transcribe
|
|
233
|
+
audio from your vault. The transcript will automatically be saved back to the
|
|
234
|
+
vault when complete.
|
|
235
|
+
|
|
236
|
+
**Direct URL (legacy)**: Pass `audio_url` for direct transcription without
|
|
237
|
+
automatic storage.
|
|
197
238
|
|
|
198
239
|
Args:
|
|
199
|
-
audio_url: URL of the audio file to transcribe
|
|
240
|
+
audio_url: URL of the audio file to transcribe (legacy mode, no auto-storage)
|
|
200
241
|
|
|
201
242
|
auto_highlights: Automatically extract key phrases and topics
|
|
202
243
|
|
|
244
|
+
boost_param: How much to boost custom vocabulary
|
|
245
|
+
|
|
203
246
|
content_safety_labels: Enable content moderation and safety labeling
|
|
204
247
|
|
|
248
|
+
format: Output format for the transcript when using vault mode
|
|
249
|
+
|
|
205
250
|
format_text: Format text with proper capitalization
|
|
206
251
|
|
|
207
252
|
language_code: Language code (e.g., 'en_us', 'es', 'fr'). If not specified, language will be
|
|
@@ -209,10 +254,18 @@ class AsyncTranscriptionResource(AsyncAPIResource):
|
|
|
209
254
|
|
|
210
255
|
language_detection: Enable automatic language detection
|
|
211
256
|
|
|
257
|
+
object_id: Object ID of the audio file in the vault (use with vault_id)
|
|
258
|
+
|
|
212
259
|
punctuate: Add punctuation to the transcript
|
|
213
260
|
|
|
214
261
|
speaker_labels: Enable speaker identification and labeling
|
|
215
262
|
|
|
263
|
+
speakers_expected: Expected number of speakers (improves accuracy when known)
|
|
264
|
+
|
|
265
|
+
vault_id: Vault ID containing the audio file (use with object_id)
|
|
266
|
+
|
|
267
|
+
word_boost: Custom vocabulary words to boost (e.g., legal terms)
|
|
268
|
+
|
|
216
269
|
extra_headers: Send extra headers
|
|
217
270
|
|
|
218
271
|
extra_query: Add additional query parameters to the request
|
|
@@ -221,26 +274,31 @@ class AsyncTranscriptionResource(AsyncAPIResource):
|
|
|
221
274
|
|
|
222
275
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
223
276
|
"""
|
|
224
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
225
277
|
return await self._post(
|
|
226
278
|
"/voice/transcription",
|
|
227
279
|
body=await async_maybe_transform(
|
|
228
280
|
{
|
|
229
281
|
"audio_url": audio_url,
|
|
230
282
|
"auto_highlights": auto_highlights,
|
|
283
|
+
"boost_param": boost_param,
|
|
231
284
|
"content_safety_labels": content_safety_labels,
|
|
285
|
+
"format": format,
|
|
232
286
|
"format_text": format_text,
|
|
233
287
|
"language_code": language_code,
|
|
234
288
|
"language_detection": language_detection,
|
|
289
|
+
"object_id": object_id,
|
|
235
290
|
"punctuate": punctuate,
|
|
236
291
|
"speaker_labels": speaker_labels,
|
|
292
|
+
"speakers_expected": speakers_expected,
|
|
293
|
+
"vault_id": vault_id,
|
|
294
|
+
"word_boost": word_boost,
|
|
237
295
|
},
|
|
238
296
|
transcription_create_params.TranscriptionCreateParams,
|
|
239
297
|
),
|
|
240
298
|
options=make_request_options(
|
|
241
299
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
242
300
|
),
|
|
243
|
-
cast_to=
|
|
301
|
+
cast_to=TranscriptionCreateResponse,
|
|
244
302
|
)
|
|
245
303
|
|
|
246
304
|
async def retrieve(
|
|
@@ -256,8 +314,9 @@ class AsyncTranscriptionResource(AsyncAPIResource):
|
|
|
256
314
|
) -> TranscriptionRetrieveResponse:
|
|
257
315
|
"""Retrieve the status and result of an audio transcription job.
|
|
258
316
|
|
|
259
|
-
|
|
260
|
-
|
|
317
|
+
For vault-based
|
|
318
|
+
jobs, returns status and result_object_id when complete. For legacy direct URL
|
|
319
|
+
jobs, returns the full transcription data.
|
|
261
320
|
|
|
262
321
|
Args:
|
|
263
322
|
extra_headers: Send extra headers
|