Skip to content

Commit 12d8dde

Browse files
authored
Merge branch 'main' into NEXUS-752-add-vlm-strategy
2 parents 2635cc7 + 49ed16e commit 12d8dde

File tree

201 files changed

+6906
-375
lines changed

Some content is hidden

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

201 files changed

+6906
-375
lines changed

.genignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ _test_unstructured_client
88

99
# ignore Makefile
1010
Makefile
11+
12+
# Ignore the general.partition code until we can fix the base_url issue
13+
src/unstructured_client/general.py

.speakeasy/gen.lock

Lines changed: 180 additions & 41 deletions
Large diffs are not rendered by default.

.speakeasy/workflow.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
speakeasyVersion: 1.490.0
1+
speakeasyVersion: 1.505.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:82a732bbca2d957159890b94e36ff6f10eea1dc12e80bb275ec1675925570321
6-
sourceBlobDigest: sha256:1730103738b7c456ab90d2ff77471053ecba8ed90efc82e97dce14c520fb6e6f
5+
sourceRevisionDigest: sha256:8cba0cf748e247efccefbb5d1839dbeb6e2e3210bb2c90f7b75b9034c22ae24a
6+
sourceBlobDigest: sha256:69fef8ed681f1d68013e71f67927821d64fc1045d3956ace3775fe62ed76b8bb
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1739465403
10-
- 1.0.0
9+
- speakeasy-sdk-regen-1740605410
10+
- 1.0.68
1111
targets:
1212
unstructured-python:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:82a732bbca2d957159890b94e36ff6f10eea1dc12e80bb275ec1675925570321
16-
sourceBlobDigest: sha256:1730103738b7c456ab90d2ff77471053ecba8ed90efc82e97dce14c520fb6e6f
15+
sourceRevisionDigest: sha256:8cba0cf748e247efccefbb5d1839dbeb6e2e3210bb2c90f7b75b9034c22ae24a
16+
sourceBlobDigest: sha256:69fef8ed681f1d68013e71f67927821d64fc1045d3956ace3775fe62ed76b8bb
1717
codeSamplesNamespace: my-source-code-samples
18-
codeSamplesRevisionDigest: sha256:b30a1c0c949edf543749837da980ac9786c05d9c4deeafc777340a39682d11e0
18+
codeSamplesRevisionDigest: sha256:d7a20fe1c8d687f377099cdb412c6d0dd733dd982ec4662052df0894da211da2
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest
2222
sources:
2323
my-source:
2424
inputs:
25-
- location: https://api.unstructured.io/general/openapi.json
2625
- location: https://platform.unstructuredapp.io/openapi.json
26+
- location: https://api.unstructured.io/general/openapi.json
2727
overlays:
2828
- location: ./overlay_client.yaml
2929
registry:

.speakeasy/workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ speakeasyVersion: latest
33
sources:
44
my-source:
55
inputs:
6-
- location: https://api.unstructured.io/general/openapi.json
76
- location: https://platform.unstructuredapp.io/openapi.json
7+
- location: https://api.unstructuredapp.io/general/openapi.json
88
overlays:
99
- location: ./overlay_client.yaml
1010
registry:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ lint:
6565
## download-openapi-specs: Download the openapi specs from the Serverless and Platform APIs
6666
.PHONY: download-openapi-specs
6767
download-openapi-specs:
68-
wget -nv -q -O openapi_serverless.json https://api.unstructured.io/general/openapi.json
68+
wget -nv -q -O openapi_serverless.json https://api.unstructuredapp.io/general/openapi.json
6969
wget -nv -q -O openapi_platform_api.json https://platform.unstructuredapp.io/openapi.json
7070

7171
## client-merge-serverless-platform: Merge the Serverless and Platform APIs specs into a single schema

README.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,9 @@ with UnstructuredClient() as uc_client:
118118
res = uc_client.destinations.create_destination(request={
119119
"create_destination_connector": {
120120
"config": {
121-
"account_key": "azure_account_key",
122-
"account_name": "azure_account_name",
123-
"anonymous": False,
124-
"recursive": True,
125-
"remote_url": "az://<path></path></container-name>",
121+
"endpoint": "<value>",
122+
"index": "<value>",
123+
"key": "<key>",
126124
},
127125
"name": "<value>",
128126
"type": shared.DestinationConnectorType.ASTRADB,
@@ -150,11 +148,9 @@ with UnstructuredClient(
150148
res = uc_client.destinations.create_destination(request={
151149
"create_destination_connector": {
152150
"config": {
153-
"account_key": "azure_account_key",
154-
"account_name": "azure_account_name",
155-
"anonymous": False,
156-
"recursive": True,
157-
"remote_url": "az://<path></path></container-name>",
151+
"endpoint": "<value>",
152+
"index": "<value>",
153+
"key": "<key>",
158154
},
159155
"name": "<value>",
160156
"type": shared.DestinationConnectorType.ASTRADB,
@@ -204,11 +200,9 @@ with UnstructuredClient() as uc_client:
204200
res = uc_client.destinations.create_destination(request={
205201
"create_destination_connector": {
206202
"config": {
207-
"account_key": "azure_account_key",
208-
"account_name": "azure_account_name",
209-
"anonymous": False,
210-
"recursive": True,
211-
"remote_url": "az://<path></path></container-name>",
203+
"endpoint": "<value>",
204+
"index": "<value>",
205+
"key": "<key>",
212206
},
213207
"name": "<value>",
214208
"type": shared.DestinationConnectorType.ASTRADB,
@@ -336,11 +330,9 @@ with UnstructuredClient() as uc_client:
336330
res = uc_client.destinations.create_destination(request={
337331
"create_destination_connector": {
338332
"config": {
339-
"account_key": "azure_account_key",
340-
"account_name": "azure_account_name",
341-
"anonymous": False,
342-
"recursive": True,
343-
"remote_url": "az://<path></path></container-name>",
333+
"endpoint": "<value>",
334+
"index": "<value>",
335+
"key": "<key>",
344336
},
345337
"name": "<value>",
346338
"type": shared.DestinationConnectorType.ASTRADB,
@@ -368,11 +360,9 @@ async def main():
368360
res = await uc_client.destinations.create_destination_async(request={
369361
"create_destination_connector": {
370362
"config": {
371-
"account_key": "azure_account_key",
372-
"account_name": "azure_account_name",
373-
"anonymous": False,
374-
"recursive": True,
375-
"remote_url": "az://<path></path></container-name>",
363+
"endpoint": "<value>",
364+
"index": "<value>",
365+
"key": "<key>",
376366
},
377367
"name": "<value>",
378368
"type": shared.DestinationConnectorType.ASTRADB,
@@ -459,6 +449,7 @@ Certain SDK methods accept file objects as part of a request body or multi-part
459449
460450
```python
461451
from unstructured_client import UnstructuredClient
452+
from unstructured_client.models import shared
462453

463454
with UnstructuredClient() as uc_client:
464455

@@ -472,6 +463,8 @@ with UnstructuredClient() as uc_client:
472463
1,
473464
10,
474465
],
466+
"vlm_model": shared.PartitionParametersStrategy.GPT_4O,
467+
"vlm_model_provider": shared.PartitionParametersSchemasStrategy.OPENAI,
475468
},
476469
})
477470

RELEASES.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,4 +774,64 @@ Based on:
774774
### Generated
775775
- [python v0.30.0] .
776776
### Releases
777-
- [PyPI v0.30.0] https://pypi.org/project/unstructured-client/0.30.0 - .
777+
- [PyPI v0.30.0] https://pypi.org/project/unstructured-client/0.30.0 - .
778+
779+
## 2025-02-15 00:09:23
780+
### Changes
781+
Based on:
782+
- OpenAPI Doc
783+
- Speakeasy CLI 1.493.0 (2.512.4) https://github.com/speakeasy-api/speakeasy
784+
### Generated
785+
- [python v0.30.1] .
786+
### Releases
787+
- [PyPI v0.30.1] https://pypi.org/project/unstructured-client/0.30.1 - .
788+
789+
## 2025-02-20 17:16:49
790+
### Changes
791+
Based on:
792+
- OpenAPI Doc
793+
- Speakeasy CLI 1.498.0 (2.518.0) https://github.com/speakeasy-api/speakeasy
794+
### Generated
795+
- [python v0.30.2] .
796+
### Releases
797+
- [PyPI v0.30.2] https://pypi.org/project/unstructured-client/0.30.2 - .
798+
799+
## 2025-02-21 00:09:34
800+
### Changes
801+
Based on:
802+
- OpenAPI Doc
803+
- Speakeasy CLI 1.498.1 (2.518.1) https://github.com/speakeasy-api/speakeasy
804+
### Generated
805+
- [python v0.30.3] .
806+
### Releases
807+
- [PyPI v0.30.3] https://pypi.org/project/unstructured-client/0.30.3 - .
808+
809+
## 2025-02-24 00:09:35
810+
### Changes
811+
Based on:
812+
- OpenAPI Doc
813+
- Speakeasy CLI 1.501.0 (2.522.1) https://github.com/speakeasy-api/speakeasy
814+
### Generated
815+
- [python v0.31.0] .
816+
### Releases
817+
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .
818+
819+
## 2025-02-26 00:09:36
820+
### Changes
821+
Based on:
822+
- OpenAPI Doc
823+
- Speakeasy CLI 1.504.1 (2.529.2) https://github.com/speakeasy-api/speakeasy
824+
### Generated
825+
- [python v0.31.0] .
826+
### Releases
827+
- [PyPI v0.31.0] https://pypi.org/project/unstructured-client/0.31.0 - .
828+
829+
## 2025-02-26 21:29:54
830+
### Changes
831+
Based on:
832+
- OpenAPI Doc
833+
- Speakeasy CLI 1.505.0 (2.531.0) https://github.com/speakeasy-api/speakeasy
834+
### Generated
835+
- [python v0.30.6] .
836+
### Releases
837+
- [PyPI v0.30.6] https://pypi.org/project/unstructured-client/0.30.6 - .

USAGE.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ with UnstructuredClient() as uc_client:
99
res = uc_client.destinations.create_destination(request={
1010
"create_destination_connector": {
1111
"config": {
12-
"account_key": "azure_account_key",
13-
"account_name": "azure_account_name",
14-
"anonymous": False,
15-
"recursive": True,
16-
"remote_url": "az://<path></path></container-name>",
12+
"endpoint": "<value>",
13+
"index": "<value>",
14+
"key": "<key>",
1715
},
1816
"name": "<value>",
1917
"type": shared.DestinationConnectorType.ASTRADB,
@@ -41,11 +39,9 @@ async def main():
4139
res = await uc_client.destinations.create_destination_async(request={
4240
"create_destination_connector": {
4341
"config": {
44-
"account_key": "azure_account_key",
45-
"account_name": "azure_account_name",
46-
"anonymous": False,
47-
"recursive": True,
48-
"remote_url": "az://<path></path></container-name>",
42+
"endpoint": "<value>",
43+
"index": "<value>",
44+
"key": "<key>",
4945
},
5046
"name": "<value>",
5147
"type": shared.DestinationConnectorType.ASTRADB,

_test_contract/platform_api/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def platform_api_url():
1717
def client(platform_api_url) -> UnstructuredClient:
1818
_client = UnstructuredClient(
1919
api_key_auth=FAKE_API_KEY,
20-
server_url="platform-api",
20+
server_url=platform_api_url,
2121
retry_config=RetryConfig(
2222
strategy="backoff",
2323
retry_connection_errors=False,

_test_contract/platform_api/test_destinations.py

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
from unstructured_client import UnstructuredClient
66
from unstructured_client.models import shared, operations
77
from unstructured_client.models.errors import SDKError
8-
from unstructured_client.models.shared import DestinationConnectorType
9-
108

119

1210
def test_list_destinations(
@@ -19,7 +17,14 @@ def test_list_destinations(
1917
headers={"Content-Type": "application/json"},
2018
json=[
2119
{
22-
"config": {},
20+
"config": {
21+
"remote_url": "s3://mock-s3-connector",
22+
"anonymous": False,
23+
"key": "**********",
24+
"secret": "**********",
25+
"token": None,
26+
"endpoint_url": None,
27+
},
2328
"created_at": "2025-08-22T08:47:29.802Z",
2429
"id": "0c363dec-3c70-45ee-8041-481044a6e1cc",
2530
"name": "test_destination_name",
@@ -45,7 +50,7 @@ def test_list_destinations(
4550
assert destination.id == "0c363dec-3c70-45ee-8041-481044a6e1cc"
4651
assert destination.name == "test_destination_name"
4752
assert destination.type == "s3"
48-
assert destination.config == {}
53+
assert isinstance(destination.config, shared.S3DestinationConnectorConfig)
4954
assert destination.created_at == datetime.fromisoformat(
5055
"2025-08-22T08:47:29.802+00:00"
5156
)
@@ -115,7 +120,14 @@ def test_get_destination(httpx_mock, client: UnstructuredClient, platform_api_ur
115120
method="GET",
116121
headers={"Content-Type": "application/json"},
117122
json={
118-
"config": {},
123+
"config": {
124+
"remote_url": "s3://mock-s3-connector",
125+
"anonymous": False,
126+
"key": "**********",
127+
"secret": "**********",
128+
"token": None,
129+
"endpoint_url": None,
130+
},
119131
"created_at": "2025-08-22T08:47:29.802Z",
120132
"id": "0c363dec-3c70-45ee-8041-481044a6e1cc",
121133
"name": "test_destination_name",
@@ -139,7 +151,7 @@ def test_get_destination(httpx_mock, client: UnstructuredClient, platform_api_ur
139151
assert destination.id == "0c363dec-3c70-45ee-8041-481044a6e1cc"
140152
assert destination.name == "test_destination_name"
141153
assert destination.type == "s3"
142-
assert destination.config == {}
154+
assert isinstance(destination.config, shared.S3DestinationConnectorConfig)
143155
assert destination.created_at == datetime.fromisoformat(
144156
"2025-08-22T08:47:29.802+00:00"
145157
)
@@ -178,7 +190,12 @@ def test_create_destination(
178190
method="POST",
179191
headers={"Content-Type": "application/json"},
180192
json={
181-
"config": {},
193+
"config": {
194+
"remote_url": "s3://mock-s3-connector",
195+
"key": "blah",
196+
"secret": "blah",
197+
"anonymous": False,
198+
},
182199
"created_at": "2023-09-15T01:06:53.146Z",
183200
"id": "b25d4161-77a0-4e08-b65e-86f398ce15ad",
184201
"name": "test_destination_name",
@@ -191,8 +208,12 @@ def test_create_destination(
191208
request=operations.CreateDestinationRequest(
192209
create_destination_connector=shared.CreateDestinationConnector(
193210
name="test_destination_name",
194-
type=DestinationConnectorType.S3,
195-
config={},
211+
type=shared.DestinationConnectorType.S3,
212+
config={
213+
"remote_url": "s3://mock-s3-connector",
214+
"key": "blah",
215+
"secret": "blah",
216+
},
196217
)
197218
)
198219
)
@@ -208,7 +229,7 @@ def test_create_destination(
208229
assert destination.id == "b25d4161-77a0-4e08-b65e-86f398ce15ad"
209230
assert destination.name == "test_destination_name"
210231
assert destination.type == "s3"
211-
assert destination.config == {}
232+
assert isinstance(destination.config, shared.S3DestinationConnectorConfig)
212233
assert destination.created_at == datetime.fromisoformat(
213234
"2023-09-15T01:06:53.146+00:00"
214235
)
@@ -224,7 +245,12 @@ def test_update_destination(
224245
method="PUT",
225246
headers={"Content-Type": "application/json"},
226247
json={
227-
"config": {},
248+
"config": {
249+
"remote_url": "s3://mock-s3-connector",
250+
"key": "blah",
251+
"secret": "blah",
252+
"anonymous": False,
253+
},
228254
"created_at": "2023-09-15T01:06:53.146Z",
229255
"id": "b25d4161-77a0-4e08-b65e-86f398ce15ad",
230256
"name": "test_destination_name",
@@ -237,7 +263,11 @@ def test_update_destination(
237263
request=operations.UpdateDestinationRequest(
238264
destination_id=dest_id,
239265
update_destination_connector=shared.UpdateDestinationConnector(
240-
config={}
266+
config={
267+
"remote_url": "s3://mock-s3-connector",
268+
"key": "blah",
269+
"secret": "blah",
270+
},
241271
),
242272
)
243273
)
@@ -254,7 +284,7 @@ def test_update_destination(
254284
assert updated_destination.id == "b25d4161-77a0-4e08-b65e-86f398ce15ad"
255285
assert updated_destination.name == "test_destination_name"
256286
assert updated_destination.type == "s3"
257-
assert updated_destination.config == {}
287+
assert isinstance(updated_destination.config, shared.S3DestinationConnectorConfig)
258288
assert updated_destination.created_at == datetime.fromisoformat(
259289
"2023-09-15T01:06:53.146+00:00"
260290
)

0 commit comments

Comments
 (0)