@@ -74,6 +74,13 @@ export const CompletionUsageSchema = z.object({
7474 total_tokens : z . number ( )
7575} ) ;
7676
77+ export const EvalMetadataSchema = z . object ( {
78+ name : z . string ( ) . describe ( 'Name of the evaluation' ) ,
79+ description : z . string ( ) . optional ( ) . describe ( 'Description of the evaluation' ) ,
80+ version : z . string ( ) . describe ( 'Version of the evaluation. By default, we will populate this with the current commit hash.' ) ,
81+ status : z . enum ( [ 'running' , 'finished' , 'error' ] ) . default ( 'running' ) . describe ( 'Status of the evaluation' )
82+ } ) ;
83+
7784export const EvaluationRowSchema = z . object ( {
7885 messages : z . array ( MessageSchema ) . describe ( 'List of messages in the conversation/trajectory.' ) ,
7986 tools : z . array ( z . record ( z . string ( ) , z . any ( ) ) ) . optional ( ) . describe ( 'Available tools/functions that were provided to the agent.' ) ,
@@ -84,7 +91,8 @@ export const EvaluationRowSchema = z.object({
8491 created_at : z . preprocess (
8592 ( val ) => typeof val === "string" ? new Date ( val ) : val ,
8693 z . date ( )
87- ) . describe ( 'The timestamp when the row was created. Accepts string and parses to Date.' )
94+ ) . describe ( 'The timestamp when the row was created. Accepts string and parses to Date.' ) ,
95+ eval_metadata : EvalMetadataSchema . optional ( ) . describe ( 'Metadata about the evaluation that was run.' )
8896} ) ;
8997
9098// Agent Evaluation Framework (V2) schemas
@@ -142,6 +150,7 @@ export type EvaluateResult = z.infer<typeof EvaluateResultSchema>;
142150export type CompletionParams = z . infer < typeof CompletionParamsSchema > ;
143151export type InputMetadata = z . infer < typeof InputMetadataSchema > ;
144152export type CompletionUsage = z . infer < typeof CompletionUsageSchema > ;
153+ export type EvalMetadata = z . infer < typeof EvalMetadataSchema > ;
145154export type EvaluationRow = z . infer < typeof EvaluationRowSchema > ;
146155export type ResourceServerConfig = z . infer < typeof ResourceServerConfigSchema > ;
147156export type EvaluationCriteriaModel = z . infer < typeof EvaluationCriteriaModelSchema > ;
0 commit comments