Skip to content

Commit c67a6f7

Browse files
committed
chore/set pdf page splitting to true by default
1 parent 49997b0 commit c67a6f7

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

.speakeasy/gen.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
33
management:
4-
docChecksum: f152122a1bb6e932d6eb54355be2da11
4+
docChecksum: fd76ef24456d50f23903277067ffaa2e
55
docVersion: 1.0.35
66
speakeasyVersion: 1.308.1
77
generationVersion: 2.342.6
8-
releaseVersion: 0.11.1
9-
configChecksum: bd8ea9af107b087e7927abd855542414
8+
releaseVersion: 0.11.2
9+
configChecksum: f5f0ec91134be577b27ca7ca87e4f5fa
1010
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-js-client

gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ generation:
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
1212
typescript:
13-
version: 0.11.1
13+
version: 0.11.2
1414
additionalDependencies:
1515
dependencies:
1616
async: ^3.2.5

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "unstructured-client",
5-
"version": "0.11.1",
5+
"version": "0.11.2",
66
"exports": {
77
".": "./src/index.ts",
88
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",

overlay_client.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ actions:
1010
"type": "boolean",
1111
"title": "Split Pdf Page",
1212
"description": "Should the pdf file be split at client. Ignored on backend.",
13-
"default": false,
13+
"default": true,
1414
}
1515
- target: $["components"]["schemas"]["partition_parameters"]["properties"]
1616
update:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unstructured-client",
3-
"version": "0.11.1",
3+
"version": "0.11.2",
44
"author": "Unstructured",
55
"main": "./index.js",
66
"sideEffects": false,

src/hooks/custom/SplitPdfHook.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ export class SplitPdfHook
9898

9999
const [error, pdf, pagesCount] = await loadPdf(file);
100100
if (file === null || pdf === null || error) {
101-
console.warn("File could not be split. Partitioning without split.")
101+
console.info("Partitioning without split.")
102102
return request;
103103
}
104104

105105
if (pagesCount < MIN_PAGES_PER_THREAD) {
106-
console.warn(
106+
console.info(
107107
`PDF has less than ${MIN_PAGES_PER_THREAD} pages. Partitioning without split.`
108108
);
109109
return request;
@@ -119,7 +119,7 @@ export class SplitPdfHook
119119
console.info("Determined optimal split size of %d pages.", splitSize)
120120

121121
if (splitSize >= pagesCount) {
122-
console.warn(
122+
console.info(
123123
"Document has too few pages (%d) to be split efficiently. Partitioning without split.",
124124
pagesCount,
125125
)

src/hooks/custom/utils/pdf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export async function loadPdf(
102102
file: File | null
103103
): Promise<[boolean, PDFDocument | null, number]> {
104104
if (!file?.name.endsWith(".pdf")) {
105-
console.warn("Given file is not a PDF. Continuing without splitting.");
105+
console.info("Given file is not a PDF, so splitting is not enabled.");
106106
return [true, null, 0];
107107
}
108108

src/lib/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
6161
export const SDK_METADATA = {
6262
language: "typescript",
6363
openapiDocVersion: "1.0.35",
64-
sdkVersion: "0.11.1",
64+
sdkVersion: "0.11.2",
6565
genVersion: "2.342.6",
66-
userAgent: "speakeasy-sdk/typescript 0.11.1 2.342.6 1.0.35 unstructured-client",
66+
userAgent: "speakeasy-sdk/typescript 0.11.2 2.342.6 1.0.35 unstructured-client",
6767
} as const;

src/sdk/models/shared/partitionparameters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export namespace PartitionParameters$ {
240240
similarity_threshold: z.nullable(z.number()).optional(),
241241
skip_infer_table_types: z.array(z.string()).optional(),
242242
split_pdf_concurrency_level: z.number().int().default(5),
243-
split_pdf_page: z.boolean().default(false),
243+
split_pdf_page: z.boolean().default(true),
244244
starting_page_number: z.nullable(z.number().int()).optional(),
245245
strategy: Strategy$.inboundSchema.default(Strategy.Auto),
246246
unique_element_ids: z.boolean().default(false),
@@ -326,7 +326,7 @@ export namespace PartitionParameters$ {
326326
similarityThreshold: z.nullable(z.number()).optional(),
327327
skipInferTableTypes: z.array(z.string()).optional(),
328328
splitPdfConcurrencyLevel: z.number().int().default(5),
329-
splitPdfPage: z.boolean().default(false),
329+
splitPdfPage: z.boolean().default(true),
330330
startingPageNumber: z.nullable(z.number().int()).optional(),
331331
strategy: Strategy$.outboundSchema.default(Strategy.Auto),
332332
uniqueElementIds: z.boolean().default(false),

0 commit comments

Comments
 (0)