chunkr-ai 0.1.0a3__tar.gz → 0.1.0a5__tar.gz
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.
- chunkr_ai-0.1.0a5/.release-please-manifest.json +3 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/CHANGELOG.md +22 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/PKG-INFO +4 -4
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/README.md +3 -3
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/api.md +1 -1
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/pyproject.toml +1 -1
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_client.py +4 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_constants.py +5 -5
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_version.py +1 -1
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/files.py +32 -4
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/tasks/parse.py +208 -84
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/tasks/tasks.py +46 -24
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/__init__.py +1 -1
- chunkr_ai-0.1.0a3/src/chunkr_ai/types/files_page_response.py → chunkr_ai-0.1.0a5/src/chunkr_ai/types/files_list_response.py +2 -2
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/task.py +18 -11
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/task_get_params.py +3 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/tasks/parse_create_params.py +32 -13
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/tasks/parse_update_params.py +30 -11
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/api_resources/tasks/test_parse.py +30 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/api_resources/test_files.py +48 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/api_resources/test_health.py +6 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/api_resources/test_tasks.py +36 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_client.py +90 -28
- chunkr_ai-0.1.0a3/.release-please-manifest.json +0 -3
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/.gitignore +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/CONTRIBUTING.md +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/LICENSE +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/SECURITY.md +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/bin/check-release-environment +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/bin/publish-pypi +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/examples/.keep +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/mypy.ini +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/noxfile.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/release-please-config.json +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/requirements-dev.lock +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/requirements.lock +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr/lib/.keep +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_base_client.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_compat.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_exceptions.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_files.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_models.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_qs.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_resource.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_response.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_streaming.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_types.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_logs.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_proxy.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_reflection.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_resources_proxy.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_streams.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_sync.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_transform.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_typing.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_utils.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/lib/.keep +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/pagination.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/py.typed +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/health.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/tasks/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/delete.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_create_params.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_list_params.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_url.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_url_params.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/health_check_response.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/task_list_params.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/tasks/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/api_resources/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/api_resources/tasks/__init__.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/conftest.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/sample_file.txt +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_deepcopy.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_extract_files.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_files.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_models.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_qs.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_required_args.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_response.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_streaming.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_transform.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_utils/test_proxy.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/test_utils/test_typing.py +0 -0
- {chunkr_ai-0.1.0a3 → chunkr_ai-0.1.0a5}/tests/utils.py +0 -0
@@ -1,5 +1,27 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.5 (2025-08-12)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/lumina-ai-inc/chunkr-python/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** added default timeouts ([d8fe4d0](https://github.com/lumina-ai-inc/chunkr-python/commit/d8fe4d089ea7024e90ab01941d7eeb616d0e7034))
|
10
|
+
* **api:** api update ([c925f82](https://github.com/lumina-ai-inc/chunkr-python/commit/c925f825bd9071616aeb45fc7c0853acbfb14797))
|
11
|
+
* **api:** manual updates ([6ac936b](https://github.com/lumina-ai-inc/chunkr-python/commit/6ac936b3ed6623edf21a9a6e7fc1e721398f35ab))
|
12
|
+
* **api:** manual updates ([5af3de5](https://github.com/lumina-ai-inc/chunkr-python/commit/5af3de5c2758931d7ac68e66c09cb2fe7f82f626))
|
13
|
+
* **api:** manual updates ([e768758](https://github.com/lumina-ai-inc/chunkr-python/commit/e768758ce2e2c9fc894be36f1ca08144c48e878e))
|
14
|
+
* **api:** manual updates ([a2ea967](https://github.com/lumina-ai-inc/chunkr-python/commit/a2ea967860af97eaead44ab74f8fb0b54577f3a9))
|
15
|
+
|
16
|
+
## 0.1.0-alpha.4 (2025-08-09)
|
17
|
+
|
18
|
+
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/lumina-ai-inc/chunkr-python/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
|
19
|
+
|
20
|
+
### Features
|
21
|
+
|
22
|
+
* **api:** added poll() and apoll() methods to Task ([#16](https://github.com/lumina-ai-inc/chunkr-python/issues/16)) ([da329dd](https://github.com/lumina-ai-inc/chunkr-python/commit/da329dda8ac0818e2b770e156b6b69456a5cfc72))
|
23
|
+
* **api:** manual updates ([a704c5d](https://github.com/lumina-ai-inc/chunkr-python/commit/a704c5deed4c91af239afb58fce99091f8784210))
|
24
|
+
|
3
25
|
## 0.1.0-alpha.3 (2025-08-09)
|
4
26
|
|
5
27
|
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/lumina-ai-inc/chunkr-python/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: chunkr-ai
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a5
|
4
4
|
Summary: The official Python library for the chunkr API
|
5
5
|
Project-URL: Homepage, https://github.com/lumina-ai-inc/chunkr-python
|
6
6
|
Project-URL: Repository, https://github.com/lumina-ai-inc/chunkr-python
|
@@ -299,7 +299,7 @@ Error codes are as follows:
|
|
299
299
|
|
300
300
|
### Retries
|
301
301
|
|
302
|
-
Certain errors are automatically retried
|
302
|
+
Certain errors are automatically retried 50 times by default, with a short exponential backoff.
|
303
303
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
304
304
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
305
305
|
|
@@ -322,7 +322,7 @@ client.with_options(max_retries=5).tasks.parse.create(
|
|
322
322
|
|
323
323
|
### Timeouts
|
324
324
|
|
325
|
-
By default requests time out after
|
325
|
+
By default requests time out after 30 seconds. You can configure this with a `timeout` option,
|
326
326
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
327
327
|
|
328
328
|
```python
|
@@ -330,7 +330,7 @@ from chunkr_ai import Chunkr
|
|
330
330
|
|
331
331
|
# Configure the default for all requests:
|
332
332
|
client = Chunkr(
|
333
|
-
# 20 seconds (default is
|
333
|
+
# 20 seconds (default is 30 seconds)
|
334
334
|
timeout=20.0,
|
335
335
|
)
|
336
336
|
|
@@ -264,7 +264,7 @@ Error codes are as follows:
|
|
264
264
|
|
265
265
|
### Retries
|
266
266
|
|
267
|
-
Certain errors are automatically retried
|
267
|
+
Certain errors are automatically retried 50 times by default, with a short exponential backoff.
|
268
268
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
269
269
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
270
270
|
|
@@ -287,7 +287,7 @@ client.with_options(max_retries=5).tasks.parse.create(
|
|
287
287
|
|
288
288
|
### Timeouts
|
289
289
|
|
290
|
-
By default requests time out after
|
290
|
+
By default requests time out after 30 seconds. You can configure this with a `timeout` option,
|
291
291
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
|
292
292
|
|
293
293
|
```python
|
@@ -295,7 +295,7 @@ from chunkr_ai import Chunkr
|
|
295
295
|
|
296
296
|
# Configure the default for all requests:
|
297
297
|
client = Chunkr(
|
298
|
-
# 20 seconds (default is
|
298
|
+
# 20 seconds (default is 30 seconds)
|
299
299
|
timeout=20.0,
|
300
300
|
)
|
301
301
|
|
@@ -95,6 +95,8 @@ class Chunkr(SyncAPIClient):
|
|
95
95
|
_strict_response_validation=_strict_response_validation,
|
96
96
|
)
|
97
97
|
|
98
|
+
self._idempotency_header = "Idempotency-Key"
|
99
|
+
|
98
100
|
self.tasks = tasks.TasksResource(self)
|
99
101
|
self.files = files.FilesResource(self)
|
100
102
|
self.health = health.HealthResource(self)
|
@@ -267,6 +269,8 @@ class AsyncChunkr(AsyncAPIClient):
|
|
267
269
|
_strict_response_validation=_strict_response_validation,
|
268
270
|
)
|
269
271
|
|
272
|
+
self._idempotency_header = "Idempotency-Key"
|
273
|
+
|
270
274
|
self.tasks = tasks.AsyncTasksResource(self)
|
271
275
|
self.files = files.AsyncFilesResource(self)
|
272
276
|
self.health = health.AsyncHealthResource(self)
|
@@ -5,10 +5,10 @@ import httpx
|
|
5
5
|
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
|
6
6
|
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
|
7
7
|
|
8
|
-
# default timeout is
|
9
|
-
DEFAULT_TIMEOUT = httpx.Timeout(timeout=
|
10
|
-
DEFAULT_MAX_RETRIES =
|
8
|
+
# default timeout is 30 seconds
|
9
|
+
DEFAULT_TIMEOUT = httpx.Timeout(timeout=30, connect=5.0)
|
10
|
+
DEFAULT_MAX_RETRIES = 50
|
11
11
|
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
|
12
12
|
|
13
|
-
INITIAL_RETRY_DELAY = 0
|
14
|
-
MAX_RETRY_DELAY =
|
13
|
+
INITIAL_RETRY_DELAY = 1.0
|
14
|
+
MAX_RETRY_DELAY = 10.0
|
@@ -59,6 +59,7 @@ class FilesResource(SyncAPIResource):
|
|
59
59
|
extra_query: Query | None = None,
|
60
60
|
extra_body: Body | None = None,
|
61
61
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
62
|
+
idempotency_key: str | None = None,
|
62
63
|
) -> File:
|
63
64
|
"""
|
64
65
|
Accepts multipart/form-data with fields:
|
@@ -78,6 +79,8 @@ class FilesResource(SyncAPIResource):
|
|
78
79
|
extra_body: Add additional JSON properties to the request
|
79
80
|
|
80
81
|
timeout: Override the client-level default timeout for this request, in seconds
|
82
|
+
|
83
|
+
idempotency_key: Specify a custom idempotency key for this request
|
81
84
|
"""
|
82
85
|
body = deepcopy_minimal(
|
83
86
|
{
|
@@ -95,7 +98,11 @@ class FilesResource(SyncAPIResource):
|
|
95
98
|
body=maybe_transform(body, file_create_params.FileCreateParams),
|
96
99
|
files=files,
|
97
100
|
options=make_request_options(
|
98
|
-
extra_headers=extra_headers,
|
101
|
+
extra_headers=extra_headers,
|
102
|
+
extra_query=extra_query,
|
103
|
+
extra_body=extra_body,
|
104
|
+
timeout=timeout,
|
105
|
+
idempotency_key=idempotency_key,
|
99
106
|
),
|
100
107
|
cast_to=File,
|
101
108
|
)
|
@@ -170,6 +177,7 @@ class FilesResource(SyncAPIResource):
|
|
170
177
|
extra_query: Query | None = None,
|
171
178
|
extra_body: Body | None = None,
|
172
179
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
180
|
+
idempotency_key: str | None = None,
|
173
181
|
) -> Delete:
|
174
182
|
"""Delete file contents and scrub sensitive metadata.
|
175
183
|
|
@@ -184,13 +192,19 @@ class FilesResource(SyncAPIResource):
|
|
184
192
|
extra_body: Add additional JSON properties to the request
|
185
193
|
|
186
194
|
timeout: Override the client-level default timeout for this request, in seconds
|
195
|
+
|
196
|
+
idempotency_key: Specify a custom idempotency key for this request
|
187
197
|
"""
|
188
198
|
if not file_id:
|
189
199
|
raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
|
190
200
|
return self._delete(
|
191
201
|
f"/files/{file_id}",
|
192
202
|
options=make_request_options(
|
193
|
-
extra_headers=extra_headers,
|
203
|
+
extra_headers=extra_headers,
|
204
|
+
extra_query=extra_query,
|
205
|
+
extra_body=extra_body,
|
206
|
+
timeout=timeout,
|
207
|
+
idempotency_key=idempotency_key,
|
194
208
|
),
|
195
209
|
cast_to=Delete,
|
196
210
|
)
|
@@ -353,6 +367,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
353
367
|
extra_query: Query | None = None,
|
354
368
|
extra_body: Body | None = None,
|
355
369
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
370
|
+
idempotency_key: str | None = None,
|
356
371
|
) -> File:
|
357
372
|
"""
|
358
373
|
Accepts multipart/form-data with fields:
|
@@ -372,6 +387,8 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
372
387
|
extra_body: Add additional JSON properties to the request
|
373
388
|
|
374
389
|
timeout: Override the client-level default timeout for this request, in seconds
|
390
|
+
|
391
|
+
idempotency_key: Specify a custom idempotency key for this request
|
375
392
|
"""
|
376
393
|
body = deepcopy_minimal(
|
377
394
|
{
|
@@ -389,7 +406,11 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
389
406
|
body=await async_maybe_transform(body, file_create_params.FileCreateParams),
|
390
407
|
files=files,
|
391
408
|
options=make_request_options(
|
392
|
-
extra_headers=extra_headers,
|
409
|
+
extra_headers=extra_headers,
|
410
|
+
extra_query=extra_query,
|
411
|
+
extra_body=extra_body,
|
412
|
+
timeout=timeout,
|
413
|
+
idempotency_key=idempotency_key,
|
393
414
|
),
|
394
415
|
cast_to=File,
|
395
416
|
)
|
@@ -464,6 +485,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
464
485
|
extra_query: Query | None = None,
|
465
486
|
extra_body: Body | None = None,
|
466
487
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
488
|
+
idempotency_key: str | None = None,
|
467
489
|
) -> Delete:
|
468
490
|
"""Delete file contents and scrub sensitive metadata.
|
469
491
|
|
@@ -478,13 +500,19 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
478
500
|
extra_body: Add additional JSON properties to the request
|
479
501
|
|
480
502
|
timeout: Override the client-level default timeout for this request, in seconds
|
503
|
+
|
504
|
+
idempotency_key: Specify a custom idempotency key for this request
|
481
505
|
"""
|
482
506
|
if not file_id:
|
483
507
|
raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
|
484
508
|
return await self._delete(
|
485
509
|
f"/files/{file_id}",
|
486
510
|
options=make_request_options(
|
487
|
-
extra_headers=extra_headers,
|
511
|
+
extra_headers=extra_headers,
|
512
|
+
extra_query=extra_query,
|
513
|
+
extra_body=extra_body,
|
514
|
+
timeout=timeout,
|
515
|
+
idempotency_key=idempotency_key,
|
488
516
|
),
|
489
517
|
cast_to=Delete,
|
490
518
|
)
|