curl --request PUT \
  --url https://api.honeyhive.ai/metrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "metric_id": "<string>",
  "criteria": "<string>",
  "name": "<string>",
  "description": "<string>",
  "code_snippet": "<string>",
  "prompt": "<string>",
  "type": "custom",
  "enabled_in_prod": true,
  "needs_ground_truth": true,
  "return_type": "boolean",
  "threshold": {
    "min": 123,
    "max": 123
  },
  "pass_when": true,
  "event_name": "<string>",
  "event_type": "model"
}'

Authorizations

Authorization
string
headerrequired

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

Body

application/json
metric_id
string
required

Unique identifier of the metric

criteria
string

Criteria for human metrics

name
string

Updated name of the metric

description
string

Short description of what the metric does

code_snippet
string

Updated code block for the metric

prompt
string

Updated Evaluator prompt for the metric

type
enum<string>

Type of the metric - "custom", "model" or "human"

Available options:
custom,
model,
human
enabled_in_prod
boolean

Whether to compute on all production events automatically

needs_ground_truth
boolean

Whether a ground truth (on metadata) is required to compute it

return_type
enum<string>

The data type of the metric value - "boolean", "float", "string"

Available options:
boolean,
float,
string
threshold
object

Threshold for numeric metrics to decide passing or failing in tests

pass_when
boolean

Threshold for boolean metrics to decide passing or failing in tests

event_name
string

Name of event that the metric is set to be computed on

event_type
enum<string>

Type of event that the metric is set to be computed on

Available options:
model,
tool,
chain,
session