Interface Task<INPUT,OUTPUT>

Type Parameters:
INPUT - type of the input data
OUTPUT - type of the output data

public interface Task<INPUT,OUTPUT>
A task function that runs against a single dataset case and produces an output.

If the task throws an exception, the error is recorded on the span and each scorer's Scorer.scoreForTaskException(java.lang.Exception, dev.braintrust.eval.DatasetCase<INPUT, OUTPUT>) method is invoked instead of Scorer.score(dev.braintrust.eval.TaskResult<INPUT, OUTPUT>).

Tasks may optionally accept Parameters by overriding the two-arg apply(DatasetCase, Parameters) method. Tasks that don't need parameters can override the single-arg apply(DatasetCase) method instead — the two-arg version delegates to it by default.