Skip to content
  • Auto
  • Light
  • Dark

Create

Run an Evaluation Test Case
client.agents.evaluationRuns.create(EvaluationRunCreateParams { 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_uuids, run_name, test_case_uuid }
agent_uuids?: Array<string>

Agent UUIDs to run the test case against.

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();

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"
  ]
}