Class EvalResponse

java.lang.Object
com.google.genkit.ai.evaluation.EvalResponse

public class EvalResponse extends Object
Response from an evaluator for a single test case.
  • Constructor Details

    • EvalResponse

      public EvalResponse()
  • Method Details

    • builder

      public static EvalResponse.Builder builder()
    • getSampleIndex

      public Integer getSampleIndex()
    • setSampleIndex

      public void setSampleIndex(Integer sampleIndex)
    • getTestCaseId

      public String getTestCaseId()
    • setTestCaseId

      public void setTestCaseId(String testCaseId)
    • getTraceId

      public String getTraceId()
    • setTraceId

      public void setTraceId(String traceId)
    • getSpanId

      public String getSpanId()
    • setSpanId

      public void setSpanId(String spanId)
    • getEvaluation

      public Object getEvaluation()
    • getEvaluationAsScore

      public Score getEvaluationAsScore()
      Gets the evaluation as a single Score.
      Returns:
      the score, or null if the evaluation is a list
    • getEvaluationAsScoreList

      public List<Score> getEvaluationAsScoreList()
      Gets the evaluation as a list of Scores.
      Returns:
      the list of scores, or null if the evaluation is a single score
    • setEvaluation

      public void setEvaluation(Object evaluation)