Skip to content
  • Auto
  • Light
  • Dark

Update

Update an Evaluation Test Case.
client.agents.evaluationTestCases.update(stringtestCaseUuid, EvaluationTestCaseUpdateParams { dataset_uuid, description, metrics, 3 more } body?, RequestOptionsoptions?): EvaluationTestCaseUpdateResponse { test_case_uuid, version }
put/v2/gen-ai/evaluation_test_cases/{test_case_uuid}

To update an evaluation test-case send a PUT request to /v2/gen-ai/evaluation_test_cases/{test_case_uuid}.

ParametersExpand Collapse
testCaseUuid: string
body: EvaluationTestCaseUpdateParams { dataset_uuid, description, metrics, 3 more }
dataset_uuid?: string

Dataset against which the test‑case is executed.

description?: string

Description of the test case.

metrics?: Metrics
metric_uuids?: Array<string>
name?: string

Name of the test case.

star_metric?: APIStarMetric { metric_uuid, name, success_threshold, success_threshold_pct }
metric_uuid?: string
name?: string
success_threshold?: number

The success threshold for the star metric. This is a value that the metric must reach to be considered successful.

formatfloat
success_threshold_pct?: number

The success threshold for the star metric. This is a percentage value between 0 and 100.

formatint32
test_case_uuid?: string

Test-case UUID to update

ReturnsExpand Collapse
EvaluationTestCaseUpdateResponse { test_case_uuid, version }
test_case_uuid?: string
version?: number

The new verson of the test case.

formatint32
Update an Evaluation Test Case.
import Gradient from '@digitalocean/gradient';

const client = new Gradient();

const evaluationTestCase = await client.agents.evaluationTestCases.update(
  '"123e4567-e89b-12d3-a456-426614174000"',
);

console.log(evaluationTestCase.test_case_uuid);
{
  "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "version": 123
}
Returns Examples
{
  "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "version": 123
}