Skip to content

Run an Evaluation Test Case

client.agents.evaluationRuns.create(EvaluationRunCreateParams { agent_deployment_names, agent_uuids, run_name, test_case_uuid } body?, RequestOptionsoptions?): EvaluationRunCreateResponse { evaluation_run_uuids }
post/v2/gen-ai/evaluation_runs

To run an evaluation test case, send a POST request to /v2/gen-ai/evaluation_runs.

ParametersExpand Collapse
body: EvaluationRunCreateParams { agent_deployment_names, agent_uuids, run_name, test_case_uuid }
agent_deployment_names?: Array<string>

Agent deployment names to run the test case against (ADK agent workspaces).

agent_uuids?: Array<string>

Agent UUIDs to run the test case against (legacy agents).

run_name?: string

The name of the run.

test_case_uuid?: string

Test-case UUID to run

ReturnsExpand Collapse
EvaluationRunCreateResponse { evaluation_run_uuids }
evaluation_run_uuids?: Array<string>
Run an Evaluation Test Case
import Gradient from '@digitalocean/gradient';

const client = new Gradient({
  accessToken: 'My Access Token',
});

const evaluationRun = await client.agents.evaluationRuns.create();

console.log(evaluationRun.evaluation_run_uuids);
{
  "evaluation_run_uuids": [
    "example string"
  ]
}
Returns Examples
{
  "evaluation_run_uuids": [
    "example string"
  ]
}