# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class TypeEnum(str, enum.Enum):
    TEXT = "TEXT"
    CHAT_HISTORY = "CHAT_HISTORY"

    def visit(self, text: typing.Callable[[], T_Result], chat_history: typing.Callable[[], T_Result]) -> T_Result:
        if self is TypeEnum.TEXT:
            return text()
        if self is TypeEnum.CHAT_HISTORY:
            return chat_history()
