(general)
- partition - Summary
Description
from unstructured_client import UnstructuredClient
from unstructured_client.models import shared
with UnstructuredClient() as uc_client:
res = uc_client.general.partition(request={
"partition_parameters": {
"files": {
"content": open("example.file", "rb"),
"file_name": "example.file",
},
"split_pdf_page_range": [
1,
10,
],
"vlm_model": shared.VLMModel.GPT_4O,
"vlm_model_provider": shared.VLMModelProvider.OPENAI,
},
})
assert res.elements is not None
# Handle response
print(res.elements)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PartitionRequest | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
server_url |
Optional[str] | ➖ | An optional server URL to use. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.ServerError | 5XX | application/json |
| errors.SDKError | 4XX | */* |