Skip to content

Run an Evaluation Test Case

client.Agents.EvaluationRuns.New(ctx, body) (*AgentEvaluationRunNewResponse, error)
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 AgentEvaluationRunNewParams
AgentDeploymentNames param.Field[[]string]optional

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

AgentUuids param.Field[[]string]optional

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

RunName param.Field[string]optional

The name of the run.

TestCaseUuid param.Field[string]optional

Test-case UUID to run

ReturnsExpand Collapse
type AgentEvaluationRunNewResponse struct{…}
EvaluationRunUuids []stringoptional
Run 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"),
  )
  evaluationRun, err := client.Agents.EvaluationRuns.New(context.TODO(), gradient.AgentEvaluationRunNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", evaluationRun.EvaluationRunUuids)
}
{
  "evaluation_run_uuids": [
    "example string"
  ]
}
Returns Examples
{
  "evaluation_run_uuids": [
    "example string"
  ]
}