Skip to content

Commit 89bade7

Browse files
committed
Merge branch 'main' into fix/platform-server-urls
2 parents 67602d3 + 1363a12 commit 89bade7

File tree

97 files changed

+4593
-2171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+4593
-2171
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,5 @@ A clear and concise description of what you expected to happen.
1919
**Screenshots**
2020
If applicable, add screenshots to help explain your problem.
2121

22-
**Environment Info**
23-
Please run `python scripts/collect_env.py` and paste the output here.
24-
This will help us understand more about the environment in which the bug occurred.
25-
2622
**Additional context**
2723
Add any other context about the problem here.

.github/workflows/claude.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Run Claude Code
33+
id: claude
34+
uses: anthropics/claude-code-action@beta
35+
with:
36+
anthropic_api_key: ${{ secrets.GH_ANTHROPIC_API_KEY }}
37+
allowed_tools: "Bash(git:*),View,GlobTool,GrepTool,BatchTool"

.speakeasy/gen.lock

Lines changed: 161 additions & 139 deletions
Large diffs are not rendered by default.

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.544.0
1+
speakeasyVersion: 1.552.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:53a93cf17b0c135a55b556659f10f1e179ede13959d432e91ab06847d008a70b
6-
sourceBlobDigest: sha256:1ee9e979a771f2c36ad99bf61e63e8eea64b33b47b78ffe12d529627205c8b3d
5+
sourceRevisionDigest: sha256:ac2955e4a812caa63ad339156504c9bdfae02dd241800a6c48892aaf37552c54
6+
sourceBlobDigest: sha256:eb516ced31caa9801a7996b8216fa7c7a46ab16dc9edd4d9eef5721cee7acd6c
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1746058311
10-
- 1.1.13
9+
- speakeasy-sdk-regen-1752365566
10+
- 1.1.34
1111
targets:
1212
unstructured-python:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:53a93cf17b0c135a55b556659f10f1e179ede13959d432e91ab06847d008a70b
16-
sourceBlobDigest: sha256:1ee9e979a771f2c36ad99bf61e63e8eea64b33b47b78ffe12d529627205c8b3d
15+
sourceRevisionDigest: sha256:ac2955e4a812caa63ad339156504c9bdfae02dd241800a6c48892aaf37552c54
16+
sourceBlobDigest: sha256:eb516ced31caa9801a7996b8216fa7c7a46ab16dc9edd4d9eef5721cee7acd6c
1717
codeSamplesNamespace: my-source-code-samples
18-
codeSamplesRevisionDigest: sha256:e89aa66814dff7a62cf894bee505e9c1996c0ba1641816b5262edf315ef35e08
18+
codeSamplesRevisionDigest: sha256:e644b82aab2fb0dc0c506d643aa22910ae14bc998f2b13ac7cc019a789dbe552
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## 0.37.3
2+
3+
### Enhancements
4+
* Improve PDF validation error handling by introducing FileValidationError base class for better error abstraction
5+
6+
### Features
7+
8+
### Fixes
9+
* Replace RequestError with PDFValidationError for invalid PDF files to provide more accurate error context
10+
11+
## 0.37.0
12+
13+
### Enhancements
14+
15+
### Features
16+
17+
### Fixes
18+
* Throws appropriate error message in case the given PDF file is invalid (corrupted or encrypted).
19+
120
## 0.30.0
221

322
### Enhancements

README.md

100755100644
Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ from unstructured_client.utils import BackoffStrategy, RetryConfig
116116
with UnstructuredClient() as uc_client:
117117

118118
res = uc_client.destinations.create_connection_check_destinations(request={
119-
"destination_id": "d9795fb7-2135-4e48-a51d-009dd6ca38a1",
119+
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
120120
},
121121
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
122122

@@ -138,7 +138,7 @@ with UnstructuredClient(
138138
) as uc_client:
139139

140140
res = uc_client.destinations.create_connection_check_destinations(request={
141-
"destination_id": "d9795fb7-2135-4e48-a51d-009dd6ca38a1",
141+
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
142142
})
143143

144144
assert res.dag_node_connection_check is not None
@@ -183,7 +183,7 @@ with UnstructuredClient() as uc_client:
183183
try:
184184

185185
res = uc_client.destinations.create_connection_check_destinations(request={
186-
"destination_id": "d9795fb7-2135-4e48-a51d-009dd6ca38a1",
186+
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
187187
})
188188

189189
assert res.dag_node_connection_check is not None
@@ -305,7 +305,7 @@ from unstructured_client import UnstructuredClient
305305
with UnstructuredClient() as uc_client:
306306

307307
res = uc_client.destinations.create_connection_check_destinations(request={
308-
"destination_id": "d9795fb7-2135-4e48-a51d-009dd6ca38a1",
308+
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
309309
})
310310

311311
assert res.dag_node_connection_check is not None
@@ -327,7 +327,7 @@ async def main():
327327
async with UnstructuredClient() as uc_client:
328328

329329
res = await uc_client.destinations.create_connection_check_destinations_async(request={
330-
"destination_id": "d9795fb7-2135-4e48-a51d-009dd6ca38a1",
330+
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
331331
})
332332

333333
assert res.dag_node_connection_check is not None
@@ -351,7 +351,7 @@ See [page splitting](https://docs.unstructured.io/api-reference/api-services/sdk
351351
In order to speed up processing of large PDF files, the client splits up PDFs into smaller files, sends these to the API concurrently, and recombines the results. `split_pdf_page` can be set to `False` to disable this.
352352

353353
The amount of workers utilized for splitting PDFs is dictated by the `split_pdf_concurrency_level` parameter, with a default of 5 and a maximum of 15 to keep resource usage and costs in check. The splitting process leverages `asyncio` to manage concurrency effectively.
354-
The size of each batch of pages (ranging from 2 to 20) is internally determined based on the concurrency level and the total number of pages in the document. Because the splitting process uses `asyncio` the client can encouter event loop issues if it is nested in another async runner, like running in a `gevent` spawned task. Instead, this is safe to run in multiprocessing workers (e.g., using `multiprocessing.Pool` with `fork` context).
354+
The size of each batch of pages (ranging from 2 to 20) is internally determined based on the concurrency level and the total number of pages in the document. Because the splitting process uses `asyncio` the client can encounter event loop issues if it is nested in another async runner, like running in a `gevent` spawned task. Instead, this is safe to run in multiprocessing workers (e.g., using `multiprocessing.Pool` with `fork` context).
355355

356356
Example:
357357
```python
@@ -410,30 +410,18 @@ Certain SDK methods accept file objects as part of a request body or multi-part
410410
411411
```python
412412
from unstructured_client import UnstructuredClient
413-
from unstructured_client.models import shared
414413

415414

416415
with UnstructuredClient() as uc_client:
417416

418-
res = uc_client.general.partition(request={
419-
"partition_parameters": {
420-
"files": {
421-
"content": open("example.file", "rb"),
422-
"file_name": "example.file",
423-
},
424-
"split_pdf_page_range": [
425-
1,
426-
10,
427-
],
428-
"vlm_model": shared.VLMModel.GPT_4O,
429-
"vlm_model_provider": shared.VLMModelProvider.OPENAI,
430-
},
417+
res = uc_client.workflows.run_workflow(request={
418+
"workflow_id": "e7054f23-ce92-4bf1-a1d7-7cf9cb14d013",
431419
})
432420

433-
assert res.elements is not None
421+
assert res.job_information is not None
434422

435423
# Handle response
436-
print(res.elements)
424+
print(res.job_information)
437425

438426
```
439427
<!-- End File uploads [file-upload] -->

RELEASES.md

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,4 +997,75 @@ Based on:
997997
### Generated
998998
- [python v0.35.0] .
999999
### Releases
1000-
- [PyPI v0.35.0] https://pypi.org/project/unstructured-client/0.35.0 - .
1000+
- [PyPI v0.35.0] https://pypi.org/project/unstructured-client/0.35.0 - .
1001+
1002+
## 2025-05-28 19:09:30
1003+
### Changes
1004+
Based on:
1005+
- OpenAPI Doc
1006+
- Speakeasy CLI 1.552.0 (2.610.0) https://github.com/speakeasy-api/speakeasy
1007+
### Generated
1008+
- [python v0.36.0] .
1009+
### Releases
1010+
- [PyPI v0.36.0] https://pypi.org/project/unstructured-client/0.36.0 - .
1011+
1012+
## 2025-06-23 18:31:52
1013+
### Changes
1014+
Based on:
1015+
- OpenAPI Doc
1016+
- Speakeasy CLI 1.552.0 (2.610.0) https://github.com/speakeasy-api/speakeasy
1017+
### Generated
1018+
- [python v0.37.1] .
1019+
### Releases
1020+
- [PyPI v0.37.1] https://pypi.org/project/unstructured-client/0.37.1 - .
1021+
1022+
## 2025-06-24 15:26:33
1023+
### Changes
1024+
Based on:
1025+
- OpenAPI Doc
1026+
- Speakeasy CLI 1.552.0 (2.610.0) https://github.com/speakeasy-api/speakeasy
1027+
### Generated
1028+
- [python v0.37.2] .
1029+
### Releases
1030+
- [PyPI v0.37.2] https://pypi.org/project/unstructured-client/0.37.2 - .
1031+
1032+
1033+
## 2025-07-01 14:45:04
1034+
### Changes
1035+
Based on:
1036+
- OpenAPI Doc
1037+
- Speakeasy CLI 1.552.0 (2.610.0) https://github.com/speakeasy-api/speakeasy
1038+
### Generated
1039+
- [python v0.37.4] .
1040+
### Releases
1041+
- [PyPI v0.37.4] https://pypi.org/project/unstructured-client/0.37.4 - .
1042+
1043+
## 2025-07-03 14:31:04
1044+
### Changes
1045+
Based on:
1046+
- OpenAPI Doc
1047+
- Speakeasy CLI 1.552.0 (2.610.0) https://github.com/speakeasy-api/speakeasy
1048+
### Generated
1049+
- [python v0.38.1] .
1050+
### Releases
1051+
- [PyPI v0.38.1] https://pypi.org/project/unstructured-client/0.38.1 - .
1052+
1053+
## 2025-07-16 19:20:27
1054+
### Changes
1055+
Based on:
1056+
- OpenAPI Doc
1057+
- Speakeasy CLI 1.552.0 (2.610.0) https://github.com/speakeasy-api/speakeasy
1058+
### Generated
1059+
- [python v0.39.1] .
1060+
### Releases
1061+
- [PyPI v0.39.1] https://pypi.org/project/unstructured-client/0.39.1 - .
1062+
1063+
## 2025-07-23 19:20:27
1064+
### Changes
1065+
Based on:
1066+
- OpenAPI Doc
1067+
- Speakeasy CLI 1.552.0 (2.610.0) https://github.com/speakeasy-api/speakeasy
1068+
### Generated
1069+
- [python v0.40.0] .
1070+
### Releases
1071+
- [PyPI v0.40.0] https://pypi.org/project/unstructured-client/0.40.0 - .

USAGE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from unstructured_client import UnstructuredClient
77
with UnstructuredClient() as uc_client:
88

99
res = uc_client.destinations.create_connection_check_destinations(request={
10-
"destination_id": "d9795fb7-2135-4e48-a51d-009dd6ca38a1",
10+
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
1111
})
1212

1313
assert res.dag_node_connection_check is not None
@@ -29,7 +29,7 @@ async def main():
2929
async with UnstructuredClient() as uc_client:
3030

3131
res = await uc_client.destinations.create_connection_check_destinations_async(request={
32-
"destination_id": "d9795fb7-2135-4e48-a51d-009dd6ca38a1",
32+
"destination_id": "cb9e35c1-0b04-4d98-83fa-fa6241323f96",
3333
})
3434

3535
assert res.dag_node_connection_check is not None

_sample_docs/failing-encrypted.pdf

936 Bytes
Binary file not shown.

_sample_docs/failing-invalid.pdf

70 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)