All files / shared/src/types evaluations.ts

100% Statements 16/16
100% Branches 1/1
100% Functions 0/0
100% Lines 16/16

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 211x   1x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x    
import { z } from 'zod';
 
export enum EvaluationMethodName {
  TASK_COMPLETION = 'task_completion',
  ARGUMENT_CORRECTNESS = 'argument_correctness',
  ROLE_ADHERENCE = 'role_adherence',
  TURN_RELEVANCY = 'turn_relevancy',
  TOOL_CORRECTNESS = 'tool_correctness',
  KNOWLEDGE_RETENTION = 'knowledge_retention',
  CONVERSATION_COMPLETENESS = 'conversation_completeness',
  LATENCY = 'latency',
}
 
export const EvaluationMethodDetails = z.object({
  method: z.enum(EvaluationMethodName),
  name: z.string(),
  description: z.string(),
  parameterSchema: z.record(z.string(), z.unknown()).optional(), // JSON representation of the schema shape
});
export type EvaluationMethodDetails = z.infer<typeof EvaluationMethodDetails>;