@docling/docling-client 2.132.0 → 2.133.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 +26 -2
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.133.0
|
|
4
|
+
at commit `b0315ea`, specifically:
|
|
5
5
|
|
|
6
6
|
- `DoclingServiceClient`
|
|
7
7
|
- `AsyncDoclingServiceClient`
|
|
@@ -158,6 +158,30 @@ High-level limits match Python:
|
|
|
158
158
|
TypeScript restricts limit values to safe integers, which is stricter than
|
|
159
159
|
Python's unbounded integer type.
|
|
160
160
|
|
|
161
|
+
## Response model changes (v2.133.0)
|
|
162
|
+
|
|
163
|
+
`DocumentResultItem` (exported as `ExportResult`) renamed its field
|
|
164
|
+
`content` to `document` in Python v2.133.0:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
https://github.com/docling-project/docling/blob/v2.133.0/docling/datamodel/service/responses.py#L83
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Pydantic continues to serialize the field as `content` on the wire via
|
|
171
|
+
`serialize_by_alias`, so all current service deployments still send `content`
|
|
172
|
+
in the JSON response. The TypeScript client:
|
|
173
|
+
|
|
174
|
+
- accepts **both** `content` (legacy wire) and `document` (future wire) when
|
|
175
|
+
parsing `ExportResult` objects returned inside `ChunkDocumentResponse`;
|
|
176
|
+
- exposes the canonical Python name `document` on the TypeScript
|
|
177
|
+
`ExportResult` interface and retains deprecated `content` for compatibility;
|
|
178
|
+
- retains backwards-compatible parse logic via `value.content ?? value.document`
|
|
179
|
+
in the internal `parseExportResult` helper.
|
|
180
|
+
|
|
181
|
+
| Python field (v2.133.0) | TypeScript field | Wire key sent by service |
|
|
182
|
+
| ----------------------------- | ----------------------- | ------------------------ |
|
|
183
|
+
| `DocumentResultItem.document` | `ExportResult.document` | `content` (alias) |
|
|
184
|
+
|
|
161
185
|
## Chunking
|
|
162
186
|
|
|
163
187
|
Both clients call the dedicated async routes:
|