Skip to content

Commit 4c89f1e

Browse files
author
stlc-bot
committed
feat(parse): apply watermark_handling to text output; add watermark e2e test (#27932)
Stainless-Generated-From: 158630752b68f21d64bdc66dae9bbc82c025ab8c
1 parent 446099a commit 4c89f1e

2 files changed

Lines changed: 32 additions & 22 deletions

File tree

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/models/configurations/ParseV2Parameters.kt‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3205,10 +3205,12 @@ private constructor(
32053205

32063206
/**
32073207
* What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL', 'DRAFT'):
3208-
* 'move_to_end' (default) keeps it as the last block of the page's markdown and text
3209-
* output, 'move_to_start' as the first block, and 'remove' drops it. In every mode the
3210-
* detected text is reported in the page's `watermark` metadata. Requires version 2026-09-28
3211-
* or later on the cost_effective, agentic, and agentic_plus tiers; ignored otherwise
3208+
* 'move_to_end' (default) keeps it as the last block of the page's markdown,
3209+
* 'move_to_start' as the first block, and 'remove' drops it. The text output follows the
3210+
* same choice where the watermark is a line of its own in the PDF text layer. In every mode
3211+
* the detected text is reported in the page's `watermark` metadata. Requires version
3212+
* 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers; ignored
3213+
* otherwise
32123214
*
32133215
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if
32143216
* the server responded with an unexpected value).
@@ -3565,9 +3567,10 @@ private constructor(
35653567

35663568
/**
35673569
* What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL',
3568-
* 'DRAFT'): 'move_to_end' (default) keeps it as the last block of the page's markdown
3569-
* and text output, 'move_to_start' as the first block, and 'remove' drops it. In every
3570-
* mode the detected text is reported in the page's `watermark` metadata. Requires
3570+
* 'DRAFT'): 'move_to_end' (default) keeps it as the last block of the page's markdown,
3571+
* 'move_to_start' as the first block, and 'remove' drops it. The text output follows
3572+
* the same choice where the watermark is a line of its own in the PDF text layer. In
3573+
* every mode the detected text is reported in the page's `watermark` metadata. Requires
35713574
* version 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers;
35723575
* ignored otherwise
35733576
*/
@@ -5354,10 +5357,12 @@ private constructor(
53545357

53555358
/**
53565359
* What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL', 'DRAFT'):
5357-
* 'move_to_end' (default) keeps it as the last block of the page's markdown and text
5358-
* output, 'move_to_start' as the first block, and 'remove' drops it. In every mode the
5359-
* detected text is reported in the page's `watermark` metadata. Requires version 2026-09-28
5360-
* or later on the cost_effective, agentic, and agentic_plus tiers; ignored otherwise
5360+
* 'move_to_end' (default) keeps it as the last block of the page's markdown,
5361+
* 'move_to_start' as the first block, and 'remove' drops it. The text output follows the
5362+
* same choice where the watermark is a line of its own in the PDF text layer. In every mode
5363+
* the detected text is reported in the page's `watermark` metadata. Requires version
5364+
* 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers; ignored
5365+
* otherwise
53615366
*/
53625367
class WatermarkHandling
53635368
@JsonCreator

‎llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/models/parsing/ParsingCreateParams.kt‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4410,10 +4410,12 @@ private constructor(
44104410

44114411
/**
44124412
* What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL', 'DRAFT'):
4413-
* 'move_to_end' (default) keeps it as the last block of the page's markdown and text
4414-
* output, 'move_to_start' as the first block, and 'remove' drops it. In every mode the
4415-
* detected text is reported in the page's `watermark` metadata. Requires version 2026-09-28
4416-
* or later on the cost_effective, agentic, and agentic_plus tiers; ignored otherwise
4413+
* 'move_to_end' (default) keeps it as the last block of the page's markdown,
4414+
* 'move_to_start' as the first block, and 'remove' drops it. The text output follows the
4415+
* same choice where the watermark is a line of its own in the PDF text layer. In every mode
4416+
* the detected text is reported in the page's `watermark` metadata. Requires version
4417+
* 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers; ignored
4418+
* otherwise
44174419
*
44184420
* @throws LlamaCloudInvalidDataException if the JSON field has an unexpected type (e.g. if
44194421
* the server responded with an unexpected value).
@@ -4770,9 +4772,10 @@ private constructor(
47704772

47714773
/**
47724774
* What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL',
4773-
* 'DRAFT'): 'move_to_end' (default) keeps it as the last block of the page's markdown
4774-
* and text output, 'move_to_start' as the first block, and 'remove' drops it. In every
4775-
* mode the detected text is reported in the page's `watermark` metadata. Requires
4775+
* 'DRAFT'): 'move_to_end' (default) keeps it as the last block of the page's markdown,
4776+
* 'move_to_start' as the first block, and 'remove' drops it. The text output follows
4777+
* the same choice where the watermark is a line of its own in the PDF text layer. In
4778+
* every mode the detected text is reported in the page's `watermark` metadata. Requires
47764779
* version 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers;
47774780
* ignored otherwise
47784781
*/
@@ -6559,10 +6562,12 @@ private constructor(
65596562

65606563
/**
65616564
* What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL', 'DRAFT'):
6562-
* 'move_to_end' (default) keeps it as the last block of the page's markdown and text
6563-
* output, 'move_to_start' as the first block, and 'remove' drops it. In every mode the
6564-
* detected text is reported in the page's `watermark` metadata. Requires version 2026-09-28
6565-
* or later on the cost_effective, agentic, and agentic_plus tiers; ignored otherwise
6565+
* 'move_to_end' (default) keeps it as the last block of the page's markdown,
6566+
* 'move_to_start' as the first block, and 'remove' drops it. The text output follows the
6567+
* same choice where the watermark is a line of its own in the PDF text layer. In every mode
6568+
* the detected text is reported in the page's `watermark` metadata. Requires version
6569+
* 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers; ignored
6570+
* otherwise
65666571
*/
65676572
class WatermarkHandling
65686573
@JsonCreator

0 commit comments

Comments
 (0)