1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
from infini.typing import Literal class Output: type: Literal["null", "text", "workflow"] name: str status: int block: bool @classmethod def empty(cls) -> "Output": output = cls() output.type = "null" output.status = 0 output.block = True return output def is_empty(self) -> bool: return self.type == "null"