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

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class EvalMetric(str, enum.Enum):
    RELEVANCY = "RELEVANCY"
    FAITHFULNESS = "FAITHFULNESS"

    def visit(self, relevancy: typing.Callable[[], T_Result], faithfulness: typing.Callable[[], T_Result]) -> T_Result:
        if self is EvalMetric.RELEVANCY:
            return relevancy()
        if self is EvalMetric.FAITHFULNESS:
            return faithfulness()
