Skip to main content
POST
/
metrics
/
{metric_id}
/
setup-evaluator
Setup metric evaluator
curl --request POST \
  --url https://api.example.com/metrics/{metric_id}/setup-evaluator \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "evaluator_name": "<string>",
  "evaluator_prompt": "<string>",
  "project_id": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "project_id": "<string>",
  "preset": true,
  "agent_name": "<string>",
  "sampling_rate": 123,
  "evaluator_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "collection_config": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

metric_id
string
required

Metric ID.

Body

application/json
evaluator_name
string
required
evaluator_prompt
string
required
project_id
string
required

Response

Metric with evaluator

id
string
required
name
string
required
description
string | null
required
type
enum<string>
required
Available options:
SYNTHETIC,
OBSERVED
collection_type
enum<string> | null
required
Available options:
BINARY,
VALUE,
FLAG,
null
project_id
string
required
preset
boolean
required
agent_name
string | null
required
sampling_rate
number | null
required
evaluator_id
string | null
required
created_at
string<date-time> | null
required
updated_at
string<date-time> | null
required
collection_config
null