chunkr-ai 0.1.0a4__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.
Files changed (92) hide show
  1. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/.gitignore +0 -2
  2. chunkr_ai-0.1.0a5/.release-please-manifest.json +3 -0
  3. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/CHANGELOG.md +13 -0
  4. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/PKG-INFO +4 -4
  5. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/README.md +3 -3
  6. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/pyproject.toml +1 -1
  7. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/__init__.py +0 -3
  8. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_client.py +4 -0
  9. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_constants.py +5 -5
  10. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_version.py +1 -1
  11. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/files.py +32 -4
  12. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/tasks/parse.py +208 -84
  13. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/tasks/tasks.py +46 -24
  14. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/task.py +18 -11
  15. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/task_get_params.py +3 -0
  16. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/tasks/parse_create_params.py +32 -13
  17. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/tasks/parse_update_params.py +30 -11
  18. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/api_resources/tasks/test_parse.py +30 -0
  19. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/api_resources/test_files.py +48 -0
  20. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/api_resources/test_health.py +6 -0
  21. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/api_resources/test_tasks.py +36 -0
  22. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_client.py +90 -28
  23. chunkr_ai-0.1.0a4/.release-please-manifest.json +0 -3
  24. chunkr_ai-0.1.0a4/src/chunkr_ai/lib/tasks_poll.py +0 -122
  25. chunkr_ai-0.1.0a4/tests/test_tasks_poll.py +0 -62
  26. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/CONTRIBUTING.md +0 -0
  27. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/LICENSE +0 -0
  28. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/SECURITY.md +0 -0
  29. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/api.md +0 -0
  30. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/bin/check-release-environment +0 -0
  31. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/bin/publish-pypi +0 -0
  32. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/examples/.keep +0 -0
  33. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/mypy.ini +0 -0
  34. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/noxfile.py +0 -0
  35. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/release-please-config.json +0 -0
  36. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/requirements-dev.lock +0 -0
  37. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/requirements.lock +0 -0
  38. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr/lib/.keep +0 -0
  39. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_base_client.py +0 -0
  40. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_compat.py +0 -0
  41. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_exceptions.py +0 -0
  42. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_files.py +0 -0
  43. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_models.py +0 -0
  44. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_qs.py +0 -0
  45. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_resource.py +0 -0
  46. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_response.py +0 -0
  47. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_streaming.py +0 -0
  48. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_types.py +0 -0
  49. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/__init__.py +0 -0
  50. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_logs.py +0 -0
  51. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_proxy.py +0 -0
  52. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_reflection.py +0 -0
  53. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_resources_proxy.py +0 -0
  54. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_streams.py +0 -0
  55. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_sync.py +0 -0
  56. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_transform.py +0 -0
  57. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_typing.py +0 -0
  58. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/_utils/_utils.py +0 -0
  59. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/lib/.keep +0 -0
  60. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/pagination.py +0 -0
  61. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/py.typed +0 -0
  62. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/__init__.py +0 -0
  63. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/health.py +0 -0
  64. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/resources/tasks/__init__.py +0 -0
  65. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/__init__.py +0 -0
  66. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/delete.py +0 -0
  67. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file.py +0 -0
  68. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_create_params.py +0 -0
  69. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_list_params.py +0 -0
  70. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_url.py +0 -0
  71. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/file_url_params.py +0 -0
  72. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/files_list_response.py +0 -0
  73. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/health_check_response.py +0 -0
  74. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/task_list_params.py +0 -0
  75. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/src/chunkr_ai/types/tasks/__init__.py +0 -0
  76. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/__init__.py +0 -0
  77. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/api_resources/__init__.py +0 -0
  78. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/api_resources/tasks/__init__.py +0 -0
  79. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/conftest.py +0 -0
  80. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/sample_file.txt +0 -0
  81. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_deepcopy.py +0 -0
  82. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_extract_files.py +0 -0
  83. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_files.py +0 -0
  84. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_models.py +0 -0
  85. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_qs.py +0 -0
  86. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_required_args.py +0 -0
  87. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_response.py +0 -0
  88. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_streaming.py +0 -0
  89. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_transform.py +0 -0
  90. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_utils/test_proxy.py +0 -0
  91. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/test_utils/test_typing.py +0 -0
  92. {chunkr_ai-0.1.0a4 → chunkr_ai-0.1.0a5}/tests/utils.py +0 -0
@@ -13,5 +13,3 @@ dist
13
13
  .envrc
14
14
  codegen.log
15
15
  Brewfile.lock.json
16
-
17
- .lh
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.5"
3
+ }
@@ -1,5 +1,18 @@
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
+
3
16
  ## 0.1.0-alpha.4 (2025-08-09)
4
17
 
5
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chunkr-ai
3
- Version: 0.1.0a4
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 2 times by default, with a short exponential backoff.
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 1 minute. You can configure this with a `timeout` option,
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 1 minute)
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 2 times by default, with a short exponential backoff.
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 1 minute. You can configure this with a `timeout` option,
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 1 minute)
298
+ # 20 seconds (default is 30 seconds)
299
299
  timeout=20.0,
300
300
  )
301
301
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "chunkr-ai"
3
- version = "0.1.0-alpha.4"
3
+ version = "0.1.0-alpha.5"
4
4
  description = "The official Python library for the chunkr API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -72,9 +72,6 @@ __all__ = [
72
72
  ]
73
73
 
74
74
  if not _t.TYPE_CHECKING:
75
- # Load custom helpers that monkey-patch generated types.
76
- # This keeps custom code separate from generated files, per Stainless guidance.
77
- from .lib import tasks_poll as _tasks_poll # noqa: F401
78
75
  from ._utils._resources_proxy import resources as resources
79
76
 
80
77
  _setup_logging()
@@ -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 1 minute
9
- DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0)
10
- DEFAULT_MAX_RETRIES = 2
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.5
14
- MAX_RETRY_DELAY = 8.0
13
+ INITIAL_RETRY_DELAY = 1.0
14
+ MAX_RETRY_DELAY = 10.0
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "chunkr_ai"
4
- __version__ = "0.1.0-alpha.4" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.5" # x-release-please-version
@@ -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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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, extra_query=extra_query, extra_body=extra_body, timeout=timeout
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
  )