@docling/docling-client 2.139.0 → 2.141.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PYTHON_CLIENT_PARITY.md +19 -5
- package/dist/index.cjs +24 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -4
- package/dist/index.d.ts +21 -4
- package/dist/index.js +21 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/PYTHON_CLIENT_PARITY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Python client parity
|
|
2
2
|
|
|
3
|
-
This document compares `@docling/docling-client` with Docling Python 2.
|
|
4
|
-
at commit `
|
|
3
|
+
This document compares `@docling/docling-client` with Docling Python 2.141.0
|
|
4
|
+
at commit `4f00195`, specifically:
|
|
5
5
|
|
|
6
6
|
- `DoclingServiceClient`
|
|
7
7
|
- `AsyncDoclingServiceClient`
|
|
@@ -159,16 +159,30 @@ High-level limits match Python:
|
|
|
159
159
|
TypeScript restricts limit values to safe integers, which is stricter than
|
|
160
160
|
Python's unbounded integer type.
|
|
161
161
|
|
|
162
|
+
## Internal scheduler refactoring (v2.141.0)
|
|
163
|
+
|
|
164
|
+
`AsyncDoclingServiceClient.submit_and_retrieve_each()` was refactored in
|
|
165
|
+
Python v2.141.0 to use an internal `_run_bounded()` helper from
|
|
166
|
+
`docling/service_client/_scheduler.py` for bounded concurrency fan-out:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
https://github.com/docling-project/docling/blob/v2.141.0/docling/service_client/_scheduler.py#L31
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The TypeScript scheduler already implements equivalent bounded-concurrency
|
|
173
|
+
semantics via `boundedOutcomes()` in `scheduler.ts`. No TypeScript API
|
|
174
|
+
changes are needed; this is a pure internal refactoring on the Python side.
|
|
175
|
+
|
|
162
176
|
## Response model changes (v2.139.0)
|
|
163
177
|
|
|
164
178
|
`ConfidenceScores` gained a recursive `pages` field in Python v2.139.0:
|
|
165
179
|
|
|
166
180
|
```
|
|
167
|
-
https://github.com/docling-project/docling/blob/v2.
|
|
181
|
+
https://github.com/docling-project/docling/blob/v2.141.0/docling/datamodel/service/responses.py#L45
|
|
168
182
|
```
|
|
169
183
|
|
|
170
184
|
When present, it maps 1-based page numbers to per-page `ConfidenceScores`
|
|
171
|
-
objects. The TypeScript `ConfidenceScores` interface
|
|
185
|
+
objects. The TypeScript `ConfidenceScores` interface includes the
|
|
172
186
|
`pages` field (`Record<number, ConfidenceScores> | null | undefined`) and the
|
|
173
187
|
`parseConfidence` validator recursively validates each page entry.
|
|
174
188
|
|
|
@@ -182,7 +196,7 @@ objects. The TypeScript `ConfidenceScores` interface now includes the
|
|
|
182
196
|
`content` to `document` in Python v2.133.0:
|
|
183
197
|
|
|
184
198
|
```
|
|
185
|
-
https://github.com/docling-project/docling/blob/v2.
|
|
199
|
+
https://github.com/docling-project/docling/blob/v2.141.0/docling/datamodel/service/responses.py#L84
|
|
186
200
|
```
|
|
187
201
|
|
|
188
202
|
Pydantic continues to serialize the field as `content` on the wire via
|
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
ArtifactDownloader: () => ArtifactDownloader,
|
|
34
|
+
ChunkerKind: () => ChunkerKind,
|
|
35
|
+
ChunkerType: () => ChunkerType,
|
|
34
36
|
DEFAULT_MAX_CONCURRENCY: () => DEFAULT_MAX_CONCURRENCY,
|
|
35
37
|
DoclingArtifactDownloadError: () => DoclingArtifactDownloadError,
|
|
36
38
|
DoclingBatchConversionError: () => DoclingBatchConversionError,
|
|
@@ -51,6 +53,7 @@ __export(index_exports, {
|
|
|
51
53
|
DoclingUsageLimitExceededError: () => DoclingUsageLimitExceededError,
|
|
52
54
|
FetchTransport: () => FetchTransport,
|
|
53
55
|
MAX_CONCURRENCY_LIMIT: () => MAX_CONCURRENCY_LIMIT,
|
|
56
|
+
StatusWatcherKind: () => StatusWatcherKind,
|
|
54
57
|
TargetName: () => TargetName,
|
|
55
58
|
appendFormValue: () => appendFormValue,
|
|
56
59
|
applyPageLimits: () => applyPageLimits,
|
|
@@ -2011,6 +2014,24 @@ var TransportTimeoutError = class extends Error {
|
|
|
2011
2014
|
|
|
2012
2015
|
// src/watchers.ts
|
|
2013
2016
|
var import_isomorphic_ws = __toESM(require("isomorphic-ws"), 1);
|
|
2017
|
+
|
|
2018
|
+
// src/types.ts
|
|
2019
|
+
var ChunkerKind = {
|
|
2020
|
+
HYBRID: "hybrid",
|
|
2021
|
+
HIERARCHICAL: "hierarchical"
|
|
2022
|
+
};
|
|
2023
|
+
var ChunkerType = ChunkerKind;
|
|
2024
|
+
var TargetName = {
|
|
2025
|
+
INBODY: "inbody",
|
|
2026
|
+
PRESIGNED_URL: "presigned_url",
|
|
2027
|
+
ZIP: "zip"
|
|
2028
|
+
};
|
|
2029
|
+
var StatusWatcherKind = {
|
|
2030
|
+
WEBSOCKET: "websocket",
|
|
2031
|
+
POLLING: "polling"
|
|
2032
|
+
};
|
|
2033
|
+
|
|
2034
|
+
// src/watchers.ts
|
|
2014
2035
|
async function* watchTask(options) {
|
|
2015
2036
|
if (options.watcher === "polling") {
|
|
2016
2037
|
yield* pollUpdates(options);
|
|
@@ -4204,16 +4225,11 @@ async function* mapSourcesToItems(sources, options, headers) {
|
|
|
4204
4225
|
function isRecord4(value) {
|
|
4205
4226
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
4206
4227
|
}
|
|
4207
|
-
|
|
4208
|
-
// src/types.ts
|
|
4209
|
-
var TargetName = {
|
|
4210
|
-
INBODY: "inbody",
|
|
4211
|
-
PRESIGNED_URL: "presigned_url",
|
|
4212
|
-
ZIP: "zip"
|
|
4213
|
-
};
|
|
4214
4228
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4215
4229
|
0 && (module.exports = {
|
|
4216
4230
|
ArtifactDownloader,
|
|
4231
|
+
ChunkerKind,
|
|
4232
|
+
ChunkerType,
|
|
4217
4233
|
DEFAULT_MAX_CONCURRENCY,
|
|
4218
4234
|
DoclingArtifactDownloadError,
|
|
4219
4235
|
DoclingBatchConversionError,
|
|
@@ -4234,6 +4250,7 @@ var TargetName = {
|
|
|
4234
4250
|
DoclingUsageLimitExceededError,
|
|
4235
4251
|
FetchTransport,
|
|
4236
4252
|
MAX_CONCURRENCY_LIMIT,
|
|
4253
|
+
StatusWatcherKind,
|
|
4237
4254
|
TargetName,
|
|
4238
4255
|
appendFormValue,
|
|
4239
4256
|
applyPageLimits,
|