Skip to content

Update an Evaluation Test Case.

client.Agents.EvaluationTestCases.Update(ctx, testCaseUuid, body) (*AgentEvaluationTestCaseUpdateResponse, error)
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 AgentEvaluationTestCaseUpdateParams
DatasetUuid param.Field[string]optional

Dataset against which the test‑case is executed.

Description param.Field[string]optional

Description of the test case.

Metrics param.Field[AgentEvaluationTestCaseUpdateParamsMetrics]optional
MetricUuids []stringoptional
Name param.Field[string]optional

Name of the test case.

StarMetric param.Field[APIStarMetric]optional
TestCaseUuid param.Field[string]optional

Test-case UUID to update

ReturnsExpand Collapse
type AgentEvaluationTestCaseUpdateResponse struct{…}
TestCaseUuid stringoptional
Version int64optional

The new verson of the test case.

formatint32
Update an Evaluation Test Case.
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := gradient.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  evaluationTestCase, err := client.Agents.EvaluationTestCases.Update(
    context.TODO(),
    `"123e4567-e89b-12d3-a456-426614174000"`,
    gradient.AgentEvaluationTestCaseUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", evaluationTestCase.TestCaseUuid)
}
{
  "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "version": 123
}
Returns Examples
{
  "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "version": 123
}