@docling/docling-client 2.150.0 → 2.152.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 +45 -2
- package/dist/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -2
- package/dist/index.d.ts +18 -2
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
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.152.0
|
|
4
|
+
at commit `311b683`, specifically:
|
|
5
5
|
|
|
6
6
|
- `DoclingServiceClient`
|
|
7
7
|
- `AsyncDoclingServiceClient`
|
|
@@ -160,6 +160,49 @@ High-level limits match Python:
|
|
|
160
160
|
TypeScript restricts limit values to safe integers, which is stricter than
|
|
161
161
|
Python's unbounded integer type.
|
|
162
162
|
|
|
163
|
+
## Service client changes (v2.152.0)
|
|
164
|
+
|
|
165
|
+
Python v2.152.0 at commit `311b683` introduces options for customizing heading numbering and changes the default pipeline behavior on the wire.
|
|
166
|
+
|
|
167
|
+
- In `ConvertDocumentsOptions`, `pipeline` is now an optional `ProcessingPipeline` and defaults to `None`/`null` on the wire. This allows the server to select its configured default pipeline (normally `standard` unless overridden by an administrator) rather than forcing `standard` from the client.
|
|
168
|
+
- In `HeadingHierarchyOptions` (nested fine-tuning under `pdf_heading_hierarchy_options`), two new options have been introduced: `numbering_keywords` (a mapping of numeral scheme families to non-English keyword arrays) and `numbering_number_words` (extra number words for enumerators).
|
|
169
|
+
|
|
170
|
+
| Python change (v2.152.0) | TypeScript | Option/Wire key | Notes |
|
|
171
|
+
| ------------------------------------------------ | ------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------- |
|
|
172
|
+
| `ConvertDocumentsOptions.pipeline` is optional | `pipeline?: ProcessingPipeline \| null` | `pipeline` | Defaults to `null` so the server can choose its default pipeline. |
|
|
173
|
+
| `HeadingHierarchyOptions.numbering_keywords` | `numbering_keywords?: Record<string, string[]> \| null` | `numbering_keywords` | Mapping for non-English numbering keyword families. |
|
|
174
|
+
| `HeadingHierarchyOptions.numbering_number_words` | `numbering_number_words?: string[] \| null` | `numbering_number_words` | Extra number words for matching enumerators. |
|
|
175
|
+
|
|
176
|
+
References:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
https://github.com/docling-project/docling/blob/v2.152.0/docling/datamodel/service/options.py#L459
|
|
180
|
+
https://github.com/docling-project/docling/blob/v2.152.0/docling/datamodel/pipeline_options.py#L2201
|
|
181
|
+
https://github.com/docling-project/docling/blob/v2.152.0/docling/datamodel/pipeline_options.py#L2219
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Service client changes (v2.151.1)
|
|
185
|
+
|
|
186
|
+
Python v2.151.1 at commit `56d39ff` (including v2.151.0 and v2.150.1) changes
|
|
187
|
+
two service-client behaviors and one service-datamodel description. The remaining
|
|
188
|
+
changes (backend, CLI, and pipeline fixes) are server-side or core-library
|
|
189
|
+
behavior with no service-client or service-datamodel surface.
|
|
190
|
+
|
|
191
|
+
| Python change | TypeScript | Notes |
|
|
192
|
+
| ---------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
193
|
+
| WebSocket poll fallback stays within the original timeout (#5121) | `watchTask()` | The fallback polls with the time left; exhausted or expired budgets raise the caller's timeout. |
|
|
194
|
+
| Input iterator errors propagate from batch scheduling (#5013) | `boundedOutcomes()`, `convertAll()` | Already matched: iterator failures reject the generator and cancel active work. Regression test added. |
|
|
195
|
+
| Chart extraction preset examples list `granite_vision_v4_mlx` and `..._v3_3` | `ConvertDocumentsOptions` | Documentation comment on `chart_extraction_preset` updated; the field remains `string \| null`. |
|
|
196
|
+
|
|
197
|
+
References:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
https://github.com/docling-project/docling/blob/v2.151.1/docling/service_client/watchers.py#L98
|
|
201
|
+
https://github.com/docling-project/docling/blob/v2.151.1/docling/service_client/watchers.py#L184
|
|
202
|
+
https://github.com/docling-project/docling/blob/v2.151.1/docling/service_client/_scheduler.py#L86
|
|
203
|
+
https://github.com/docling-project/docling/blob/v2.151.1/docling/datamodel/service/options.py#L650
|
|
204
|
+
```
|
|
205
|
+
|
|
163
206
|
## Service client changes (v2.150.0)
|
|
164
207
|
|
|
165
208
|
Python v2.150.0 at commit `6852c27` is a release bump over v2.149.0.
|
package/dist/index.cjs
CHANGED
|
@@ -2182,7 +2182,7 @@ var JSON_STRING_CONFIG_OPTIONS = [
|
|
|
2182
2182
|
"chart_extraction_custom_config"
|
|
2183
2183
|
];
|
|
2184
2184
|
function validateStringEnum(value, allowed, name) {
|
|
2185
|
-
if (value !== void 0 && !allowed.has(value)) {
|
|
2185
|
+
if (value !== void 0 && value !== null && !allowed.has(value)) {
|
|
2186
2186
|
throw new DoclingProtocolError(`${name} contains an unsupported value`);
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
@@ -2670,11 +2670,24 @@ async function* watchTask(options) {
|
|
|
2670
2670
|
yield* pollUpdates(options);
|
|
2671
2671
|
return;
|
|
2672
2672
|
}
|
|
2673
|
+
const timeoutMs = options.timeoutMs ?? 3e5;
|
|
2674
|
+
const deadline = Date.now() + timeoutMs;
|
|
2673
2675
|
try {
|
|
2674
2676
|
yield* webSocketUpdates(options);
|
|
2675
2677
|
} catch (error) {
|
|
2676
2678
|
if (error instanceof DoclingServiceUnavailableError && options.fallbackToPoll) {
|
|
2677
|
-
|
|
2679
|
+
const remaining = deadline - Date.now();
|
|
2680
|
+
if (remaining <= 0) {
|
|
2681
|
+
throw new DoclingTimeoutError(options.taskId, timeoutMs);
|
|
2682
|
+
}
|
|
2683
|
+
try {
|
|
2684
|
+
yield* pollUpdates({ ...options, timeoutMs: remaining });
|
|
2685
|
+
} catch (pollError) {
|
|
2686
|
+
if (pollError instanceof DoclingTimeoutError) {
|
|
2687
|
+
throw new DoclingTimeoutError(options.taskId, timeoutMs);
|
|
2688
|
+
}
|
|
2689
|
+
throw pollError;
|
|
2690
|
+
}
|
|
2678
2691
|
return;
|
|
2679
2692
|
}
|
|
2680
2693
|
throw error;
|