View module source on GitHub

Evaluator

@dataclass
class Evaluator()

This class represents an evaluator.

LocalEvaluatorReturn

@dataclass
class LocalEvaluatorReturn()

This class represents the return value of a local evaluator.

__init__

def __init__(score: Union[int, bool, str], reasoning: Optional[str] = None)

This class represents the return value of a local evaluator.

Arguments:

NameDescription
scoreThe score of the evaluator.
reasoningThe reasoning of the evaluator.

PassFailCriteriaOnEachEntry

@dataclass
class PassFailCriteriaOnEachEntry()

This class represents the pass fail criteria on each entry.

__init__

def __init__(score_should_be: OperatorType, value: Union[bool, int, float,
                                                         None])

This class represents the pass fail criteria on each entry.

Arguments:

NameDescription
score_should_beThe score should be.
valueThe value of the pass fail criteria.

PassFailCriteriaForTestrunOverall

@dataclass
class PassFailCriteriaForTestrunOverall()

This class represents the pass fail criteria for the overall testrun.

__init__

def __init__(overall_should_be: OperatorType, value: int,
             for_result: Literal["average", "percentageOfPassedResults"])

This class represents the pass fail criteria for the overall testrun.

Arguments:

NameDescription
overall_should_beThe overall should be.
valueThe value of the pass fail criteria.
for_resultThe for result.

PassFailCriteria

@dataclass
class PassFailCriteria()

This class represents the pass fail criteria.

__init__

def __init__(on_each_entry_pass_if: PassFailCriteriaOnEachEntry,
             for_testrun_overall_pass_if: PassFailCriteriaForTestrunOverall)

This class represents the pass fail criteria.

Arguments:

NameDescription
on_each_entry_pass_ifThe pass fail criteria on each entry.
for_testrun_overall_pass_ifThe pass fail criteria for the overall testrun.

LocalEvaluatorResultParameter

@dataclass
class LocalEvaluatorResultParameter()

This class represents the result parameter of a local evaluator.

__init__

def __init__(output: str, context_to_evaluate: Optional[Union[str,
                                                              List[str]]])

This class represents the result parameter of a local evaluator.

Arguments:

NameDescription
outputThe output of the local evaluator.
context_to_evaluateThe context to evaluate.

LocalEvaluationResult

@dataclass
class LocalEvaluationResult()

This class represents the result of a local evaluation.

__init__

def __init__(result: LocalEvaluatorReturn, name: str,
             pass_fail_criteria: PassFailCriteria)

This class represents the result of a local evaluation.

Arguments:

NameDescription
resultThe result of the local evaluation.
nameThe name of the local evaluation.
pass_fail_criteriaThe pass fail criteria of the local evaluation.

LocalEvaluationResultWithId

@dataclass
class LocalEvaluationResultWithId(LocalEvaluationResult)

This class represents the result of a local evaluation with an id.

__init__

def __init__(result: LocalEvaluatorReturn, name: str,
             pass_fail_criteria: PassFailCriteria, id: str)

This class represents the result of a local evaluation with an id.

Arguments:

NameDescription
resultThe result of the local evaluation.
nameThe name of the local evaluation.
pass_fail_criteriaThe pass fail criteria of the local evaluation.
idThe id of the local evaluation.