IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python class

StructuredOutputRegionDelimiters

StructuredOutputRegionDelimitersโ€‹

class max.pipelines.context.StructuredOutputRegionDelimiters(start_token_ids=None, end_token_ids=None)

source

Bases: object

Token ID sequences that define structured output boundaries.

Used for conditional grammar enforcement: when the start sequence is detected, grammar enforcement activates. When the end sequence is detected, enforcement deactivates.

Parameters:

end_token_idsโ€‹

end_token_ids: list[int] | None = None

source

Token ID sequence marking the end of a structured output region.

start_token_idsโ€‹

start_token_ids: list[int] | None = None

source

Token ID sequence marking the start of a structured output region.