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

GenerationStatus

GenerationStatus​

class max.pipelines.context.GenerationStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

source

Bases: str, Enum

Enum representing the status of a generation process in the MAX API.

ACTIVE​

ACTIVE = 'active'

source

The generation process is ongoing.

CANCELLED​

CANCELLED = 'cancelled'

source

The generation process has been cancelled by the user.

END_OF_SEQUENCE​

END_OF_SEQUENCE = 'end_of_sequence'

source

The generation process has reached the end of the sequence.

MAXIMUM_LENGTH​

MAXIMUM_LENGTH = 'maximum_length'

source

The generation process has reached the maximum allowed length.

is_done​

property is_done: bool

source

Returns True if the generation process is complete (not ACTIVE).

Returns:

True if the status is not ACTIVE, indicating completion.