You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the [general partition](docs/sdk/models/shared/partitionparameters.md) page for all available parameters.
127
+
<!-- Start Retries [retries] -->
128
+
<!-- End Retries [retries] -->
166
129
167
130
### Splitting PDF by pages
168
131
169
-
In order to speed up processing of long PDF files, set `splitPdfPage` parameter to `true`. It will cause the PDF to be split into smaller batches at client side, before sending to API, and combining individual responses as single result. This will work only for PDF files, so don't set it for other types of files. Size of each batch is determined internally and it can vary between 2 and 20 pages per split.
170
-
171
-
The amount of parallel requests is controlled by `splitPdfConcurrencyLevel` parameter. By default it equals to 5. It can't be more than 15, to avoid too high resource usage and costs.
132
+
See [page splitting](https://docs.unstructured.io/api-reference/api-services/sdk#page-splitting) for more details.
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. `splitPdfPage` can be set to `false` to disable this.
175
135
176
-
...
136
+
The amount of parallel requests is controlled by `splitPdfConcurrencyLevel` parameter. By default it equals to 5. It can't be more than 15, to avoid too high resource usage and costs. The size of each batch is determined internally and it can vary between 2 and 20 pages per split.
177
137
138
+
```typescript
178
139
client.general.partition({
179
140
partitionParameters: {
180
141
files: {
@@ -186,14 +147,7 @@ client.general.partition({
186
147
// Modify splitPdfConcurrencyLevel to change the limit of parallel requests
187
148
splitPdfConcurrencyLevel: 10,
188
149
},
189
-
}).then((res:PartitionResponse) => {
190
-
if (res.statusCode==200) {
191
-
console.log(res.elements);
192
-
}
193
-
}).catch((e) => {
194
-
console.log(e.statusCode);
195
-
console.log(e.body);
196
-
});
150
+
}};
197
151
```
198
152
199
153
<!-- Start Requirements [requirements] -->
@@ -244,6 +198,7 @@ run();
244
198
```
245
199
<!-- End File uploads [file-upload] -->
246
200
201
+
<!-- No Authentication -->
247
202
<!-- Placeholder for Future Speakeasy SDK Sections -->
0 commit comments