Skip to main content
PUT
/
v1
/
evaluation
/
evaluators
/
{evaluatorId}
JavaScript
import Roark from '@roarkanalytics/sdk';

const client = new Roark({
  bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});

const response = await client.evaluation.updateEvaluator('evaluatorId');

console.log(response.data);
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "slug": "<string>",
    "description": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "blocks": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "description": "<string>",
        "weight": 50,
        "orderIndex": 123,
        "blockType": "<string>",
        "prompt": "<string>",
        "threshold": 0.5,
        "metricName": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

evaluatorId
string
required

The ID of the evaluator to update

Body

application/json

Input for updating an existing evaluator

name
string

New name for the evaluator

Minimum string length: 1
description
string | null

New description for the evaluator

blocks
(CreateCustomPromptBlockInput · object | CreateDatafieldCheckBlockInput · object | CreateEmotionBlockInput · object | CreateLatencyBlockInput · object | CreatePolitenessBlockInput · object | CreateSentimentBlockInput · object | CreateToolCallsBlockInput · object | CreateToxicityBlockInput · object | CreateVocalCueBlockInput · object)[]

Updated array of evaluation blocks. Include id to update, omit id to create. Existing blocks not in the array will be deleted.

Minimum array length: 1

Block definition for updating an evaluator. Include id to update existing blocks, omit id to create new blocks. Existing blocks not in the array will be deleted.

Response

The updated evaluator with its blocks

data
object
required

Evaluator with its configured blocks