Skip to content

Commit 79329b9

Browse files
committed
Move the note about supporting one file out of the code samples
1 parent 9ce330b commit 79329b9

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

api-reference/api-services/sdk.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ deployment of Unstructured API, you can access the API using the Python or TypeS
3636
to ensure compatibility with future updates.
3737
</Note>
3838

39+
<Note>
40+
Currently, the clients only support sending one file at a time.
41+
</Note>
42+
3943
Let's start with a simple example in which you send a pdf document to be partitioned via the free Unstructured API:
4044

4145
<CodeGroup>
@@ -53,15 +57,14 @@ deployment of Unstructured API, you can access the API using the Python or TypeS
5357
file = open(filename, "rb")
5458
req = operations.PartitionRequest(
5559
partition_parameters=shared.PartitionParameters(
56-
# --- `files` is the only required parameter ---
57-
files=shared.Files( # The sdk currently only supports sending a single file
60+
files=shared.Files(
5861
content=file.read(),
5962
file_name=filename,
6063
),
6164
# --- Other partition parameters ---
6265
# Note: Defining `strategy`, `chunking_strategy`, and `output_format`
6366
# parameters as strings is accepted, but will not pass strict type checking. It is
64-
# advised to use the new enum classes for defining those parameters as shown below.
67+
# advised to use the defined enum classes as shown below.
6568
strategy=shared.Strategy.AUTO,
6669
languages=['eng'],
6770
),
@@ -87,9 +90,7 @@ deployment of Unstructured API, you can access the API using the Python or TypeS
8790
async function run() {
8891
const res = await client.general.partition({
8992
partitionParameters: {
90-
// --- `files` is the only required parameter ---
91-
files: await openAsBlob("sample-docs/layout-parser-paper.pdf"), // The sdk currently only supports sending a single file
92-
// --- Other partition params ---
93+
files: await openAsBlob("sample-docs/layout-parser-paper.pdf"),
9394
strategy: Strategy.Auto,
9495
languages: ['eng'],
9596
},
@@ -115,9 +116,8 @@ deployment of Unstructured API, you can access the API using the Python or TypeS
115116
filename = "sample-docs/layout-parser-paper.pdf"
116117
file = open(filename, "rb")
117118

118-
# Requests not wrapped in `shared.PartitionRequest` may be deprecated and break in future versions
119119
req = shared.PartitionParameters(
120-
files=shared.Files( # The sdk currently only supports sending a single file
120+
files=shared.Files(
121121
content=file.read(),
122122
file_name=filename,
123123
),
@@ -149,7 +149,6 @@ deployment of Unstructured API, you can access the API using the Python or TypeS
149149
const data = fs.readFileSync(filename);
150150

151151
client.general.partition({
152-
// The sdk currently only supports sending a single file
153152
files: {
154153
content: data,
155154
fileName: filename,

0 commit comments

Comments
 (0)