Skip to main content

Python class

GenerationStatus

GenerationStatus

class max.interfaces.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.