// This file was auto-generated by Fern from our API Definition.

import type * as Vapi from "../index.js";

export interface EvalRun {
    /**
     * This is the status of the eval run. When an eval run is created, the status is 'running'.
     * When the eval run is completed, the status is 'ended'.
     */
    status: Vapi.EvalRunStatus;
    /**
     * This is the reason for the eval run to end.
     * When the eval run is completed normally i.e end of mock conversation, the status is 'mockConversation.done'.
     * When the eval fails due to an error like Chat error or incorrect configuration, the status is 'error'.
     * When the eval runs for too long, due to model issues or tool call issues, the status is 'timeout'.
     * When the eval run is cancelled by the user, the status is 'cancelled'.
     * When the eval run is cancelled by Vapi for any reason, the status is 'aborted'.
     */
    endedReason: Vapi.EvalRunEndedReason;
    /** This is the transient eval that will be run */
    eval?: Vapi.CreateEvalDto | undefined;
    /** This is the target that will be run against the eval */
    target: Vapi.EvalRunTarget;
    id: string;
    orgId: string;
    createdAt: string;
    startedAt: string;
    endedAt: string;
    /** This is the ended message when the eval run ended for any reason apart from mockConversation.done */
    endedMessage?: string | undefined;
    /**
     * This is the results of the eval or suite run.
     * The array will have a single item for an eval run, and multiple items each corresponding to the an eval in a suite run in the same order as the evals in the suite.
     */
    results: Vapi.EvalRunResult[];
    /** This is the cost of the eval or suite run in USD. */
    cost: number;
    /** This is the break up of costs of the eval or suite run. */
    costs: Record<string, unknown>[];
    /**
     * This is the type of the run.
     * Currently it is fixed to `eval`.
     */
    type: Vapi.EvalRunType;
    /** This is the id of the eval that will be run. */
    evalId?: string | undefined;
}
