POST
/
projects
/
{projectId}
/
systems
import Scorecard from 'scorecard-ai';

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

const system = await client.systems.upsert('314', {
  config: { temperature: 0.1, maxTokens: 1024 },
  description: 'Production chatbot powered by GPT-4',
  name: 'GPT-4 Chatbot',
});

console.log(system.id);
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "GPT-4 Chatbot",
  "description": "Production chatbot powered by GPT-4",
  "productionVersion": {
    "id": "87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0",
    "systemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "Version 1",
    "config": {
      "temperature": 0.1,
      "maxTokens": 1024
    }
  },
  "versions": [
    {
      "id": "87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0",
      "name": "Version 1"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

projectId
string
required

The ID of the system's Project.

Example:

"314"

Body

application/json

Response

201
application/json

System created successfully

A System Under Test (SUT).

Systems are templates - to run evaluations, pair them with a SystemVersion that provides specific parameter values.