Skip to content

Commit daf984b

Browse files
release: 1.10.0 (#83)
* codegen metadata * feat(api): api update * feat(api): custom prompts transformations * release: 1.10.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 8325891 commit daf984b

14 files changed

Lines changed: 102 additions & 42 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.9.0"
2+
".": "1.10.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 6
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai%2Fade-db7429fa53be03221143cd9bee54ac88df7bab829494a1fc592fb6cd327d9dae.yml
3-
openapi_spec_hash: f330fd05042391ac9621ce1895eb156b
4-
config_hash: 79c277ef99c0dbedc6ce5f5cb2b7e81e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai%2Fade-22973c858422fbae26fb3ada2006695fb8f5d5daaf6862e6edb7ed5b8af436b0.yml
3+
openapi_spec_hash: 5511c4c03ee213ceaf68c9f9d889f861
4+
config_hash: 0d45e63699ddebca7fd366c1ca124e51

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 1.10.0 (2026-04-06)
4+
5+
Full Changelog: [v1.9.0...v1.10.0](https://github.com/landing-ai/ade-python/compare/v1.9.0...v1.10.0)
6+
7+
### Features
8+
9+
* **api:** api update ([8213dc8](https://github.com/landing-ai/ade-python/commit/8213dc8f0e8ffa6dc029c10303a95bd93b0eedde))
10+
* **api:** custom prompts transformations ([5eeee63](https://github.com/landing-ai/ade-python/commit/5eeee63e9242dfe9e6b4eb30d884283b9ba49519))
11+
312
## 1.9.0 (2026-03-27)
413

514
Full Changelog: [v1.8.0...v1.9.0](https://github.com/landing-ai/ade-python/compare/v1.8.0...v1.9.0)

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,21 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
261261

262262
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
263263

264+
## Nested params
265+
266+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
267+
268+
```python
269+
from landingai_ade import LandingAIADE
270+
271+
client = LandingAIADE()
272+
273+
response = client.parse(
274+
custom_prompts={},
275+
)
276+
print(response.custom_prompts)
277+
```
278+
264279
## File uploads
265280

266281
Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "landingai-ade"
3-
version = "1.9.0"
3+
version = "1.10.0"
44
description = "The official Python library for the landingai-ade API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/landingai_ade/_client.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ def extract(
294294
markdown: Union[FileTypes, str, None] | Omit = omit,
295295
markdown_url: Optional[str] | Omit = omit,
296296
model: Optional[str] | Omit = omit,
297+
strict: bool | Omit = omit,
297298
save_to: str | Path | None = None,
298299
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
299300
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -324,6 +325,9 @@ def extract(
324325
model: The version of the model to use for extraction. Use `extract-latest` to use the
325326
latest version.
326327
328+
strict: If True, reject schemas with unsupported fields (HTTP 422). If False, prune
329+
unsupported fields and continue. Only applies to extract versions that support
330+
schema validation.
327331
save_to: Optional output folder path. If provided, the response will be saved as
328332
JSON to this folder with the filename format: {input_file}_extract_output.json.
329333
The folder will be created if it doesn't exist.
@@ -348,6 +352,7 @@ def extract(
348352
"markdown": markdown,
349353
"markdown_url": markdown_url,
350354
"model": model,
355+
"strict": strict,
351356
}
352357
)
353358
files = extract_files(cast(Mapping[str, object], body), paths=[["markdown"]])
@@ -379,7 +384,7 @@ def extract(
379384
def parse(
380385
self,
381386
*,
382-
custom_prompts: Optional[str] | Omit = omit,
387+
custom_prompts: Optional[client_parse_params.CustomPrompts] | Omit = omit,
383388
document: Optional[FileTypes] | Omit = omit,
384389
document_url: Optional[str] | Omit = omit,
385390
model: Optional[str] | Omit = omit,
@@ -404,9 +409,7 @@ def parse(
404409
`https://api.va.eu-west-1.landing.ai/v1/ade/parse`.
405410
406411
Args:
407-
custom_prompts: Optional JSON string mapping chunk types to custom parsing prompts. Only the
408-
`figure` key is supported, for example '{"figure":"Describe axis labels in
409-
detail."}'.
412+
custom_prompts: Custom parsing prompts by chunk type. Only `figure` is supported.
410413
411414
document: A file to be parsed. The file can be a PDF or an image. See the list of
412415
supported file types here: https://docs.landing.ai/ade/ade-file-types. Either
@@ -764,6 +767,7 @@ async def extract(
764767
markdown: Union[FileTypes, str, None] | Omit = omit,
765768
markdown_url: Optional[str] | Omit = omit,
766769
model: Optional[str] | Omit = omit,
770+
strict: bool | Omit = omit,
767771
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
768772
# The extra values given here take precedence over values defined on the client or passed to this method.
769773
extra_headers: Headers | None = None,
@@ -793,6 +797,10 @@ async def extract(
793797
model: The version of the model to use for extraction. Use `extract-latest` to use the
794798
latest version.
795799
800+
strict: If True, reject schemas with unsupported fields (HTTP 422). If False, prune
801+
unsupported fields and continue. Only applies to extract versions that support
802+
schema validation.
803+
796804
extra_headers: Send extra headers
797805
798806
extra_query: Add additional query parameters to the request
@@ -810,6 +818,7 @@ async def extract(
810818
"markdown": markdown,
811819
"markdown_url": markdown_url,
812820
"model": model,
821+
"strict": strict,
813822
}
814823
)
815824
files = extract_files(cast(Mapping[str, object], body), paths=[["markdown"]])
@@ -837,7 +846,7 @@ async def extract(
837846
async def parse(
838847
self,
839848
*,
840-
custom_prompts: Optional[str] | Omit = omit,
849+
custom_prompts: Optional[client_parse_params.CustomPrompts] | Omit = omit,
841850
document: Optional[FileTypes] | Omit = omit,
842851
document_url: Optional[str] | Omit = omit,
843852
model: Optional[str] | Omit = omit,
@@ -861,9 +870,7 @@ async def parse(
861870
`https://api.va.eu-west-1.landing.ai/v1/ade/parse`.
862871
863872
Args:
864-
custom_prompts: Optional JSON string mapping chunk types to custom parsing prompts. Only the
865-
`figure` key is supported, for example '{"figure":"Describe axis labels in
866-
detail."}'.
873+
custom_prompts: Custom parsing prompts by chunk type. Only `figure` is supported.
867874
868875
document: A file to be parsed. The file can be a PDF or an image. See the list of
869876
supported file types here: https://docs.landing.ai/ade/ade-file-types. Either

src/landingai_ade/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "landingai_ade"
4-
__version__ = "1.9.0" # x-release-please-version
4+
__version__ = "1.10.0" # x-release-please-version

src/landingai_ade/resources/parse_jobs.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def with_streaming_response(self) -> ParseJobsResourceWithStreamingResponse:
4949
def create(
5050
self,
5151
*,
52-
custom_prompts: Optional[str] | Omit = omit,
52+
custom_prompts: Optional[parse_job_create_params.CustomPrompts] | Omit = omit,
5353
document: Optional[FileTypes] | Omit = omit,
5454
document_url: Optional[str] | Omit = omit,
5555
model: Optional[str] | Omit = omit,
@@ -74,9 +74,7 @@ def create(
7474
`https://api.va.eu-west-1.landing.ai/v1/ade/parse/jobs`.
7575
7676
Args:
77-
custom_prompts: Optional JSON string mapping chunk types to custom parsing prompts. Only the
78-
`figure` key is supported, for example '{"figure":"Describe axis labels in
79-
detail."}'.
77+
custom_prompts: Custom parsing prompts by chunk type. Only `figure` is supported.
8078
8179
document: A file to be parsed. The file can be a PDF or an image. See the list of
8280
supported file types here: https://docs.landing.ai/ade/ade-file-types. Either
@@ -249,7 +247,7 @@ def with_streaming_response(self) -> AsyncParseJobsResourceWithStreamingResponse
249247
async def create(
250248
self,
251249
*,
252-
custom_prompts: Optional[str] | Omit = omit,
250+
custom_prompts: Optional[parse_job_create_params.CustomPrompts] | Omit = omit,
253251
document: Optional[FileTypes] | Omit = omit,
254252
document_url: Optional[str] | Omit = omit,
255253
model: Optional[str] | Omit = omit,
@@ -274,9 +272,7 @@ async def create(
274272
`https://api.va.eu-west-1.landing.ai/v1/ade/parse/jobs`.
275273
276274
Args:
277-
custom_prompts: Optional JSON string mapping chunk types to custom parsing prompts. Only the
278-
`figure` key is supported, for example '{"figure":"Describe axis labels in
279-
detail."}'.
275+
custom_prompts: Custom parsing prompts by chunk type. Only `figure` is supported.
280276
281277
document: A file to be parsed. The file can be a PDF or an image. See the list of
282278
supported file types here: https://docs.landing.ai/ade/ade-file-types. Either

src/landingai_ade/types/client_extract_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ class ClientExtractParams(TypedDict, total=False):
3030
3131
Use `extract-latest` to use the latest version.
3232
"""
33+
34+
strict: bool
35+
"""If True, reject schemas with unsupported fields (HTTP 422).
36+
37+
If False, prune unsupported fields and continue. Only applies to extract
38+
versions that support schema validation.
39+
"""

src/landingai_ade/types/client_parse_params.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@
77

88
from .._types import FileTypes
99

10-
__all__ = ["ClientParseParams"]
10+
__all__ = ["ClientParseParams", "CustomPrompts"]
1111

1212

1313
class ClientParseParams(TypedDict, total=False):
14-
custom_prompts: Optional[str]
15-
"""Optional JSON string mapping chunk types to custom parsing prompts.
16-
17-
Only the `figure` key is supported, for example '{"figure":"Describe axis labels
18-
in detail."}'.
19-
"""
14+
custom_prompts: Optional[CustomPrompts]
15+
"""Custom parsing prompts by chunk type. Only `figure` is supported."""
2016

2117
document: Optional[FileTypes]
2218
"""A file to be parsed.
@@ -50,3 +46,10 @@ class ClientParseParams(TypedDict, total=False):
5046
parameter. Set the parameter to page to split documents at the page level. The
5147
splits object in the API output will contain a set of data for each page.
5248
"""
49+
50+
51+
class CustomPrompts(TypedDict, total=False):
52+
"""Custom parsing prompts by chunk type. Only `figure` is supported."""
53+
54+
figure: str
55+
"""Custom parsing prompt for figure chunks."""

0 commit comments

Comments
 (0)