POST
/
v4
/
application-test-case-outputs
/
batch
import SGPClient from 'sgp';

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

const applicationTestCaseOutputs = await client.applicationTestCaseOutputs.batch([
  {
    account_id: 'account_id',
    application_variant_id: 'application_variant_id',
    evaluation_dataset_version_num: 0,
    output: { generation_output: 'generation_output' },
    test_case_id: 'test_case_id',
  },
]);

console.log(applicationTestCaseOutputs);
[
  {
    "application_variant_id": "<string>",
    "evaluation_dataset_id": "<string>",
    "test_case_id": "<string>",
    "output": {
      "generation_output": "<string>",
      "generation_extra_info": {
        "schema_type": "CHUNKS",
        "chunks": [
          {
            "text": "<string>",
            "metadata": {}
          }
        ]
      }
    },
    "schema_type": "GENERATION",
    "application_interaction_id": "<string>",
    "application_test_case_output_group_id": "<string>",
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "account_id": "<string>",
    "metrics": {}
  }
]

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string

Body

application/json · ApplicationTestCaseOutputRequest · object[]

The body is of type ApplicationTestCaseOutputRequest · object[].

Response

200
application/json

Successful Response

POST
/
v4
/
application-test-case-outputs
/
batch
import SGPClient from 'sgp';

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

const applicationTestCaseOutputs = await client.applicationTestCaseOutputs.batch([
  {
    account_id: 'account_id',
    application_variant_id: 'application_variant_id',
    evaluation_dataset_version_num: 0,
    output: { generation_output: 'generation_output' },
    test_case_id: 'test_case_id',
  },
]);

console.log(applicationTestCaseOutputs);
[
  {
    "application_variant_id": "<string>",
    "evaluation_dataset_id": "<string>",
    "test_case_id": "<string>",
    "output": {
      "generation_output": "<string>",
      "generation_extra_info": {
        "schema_type": "CHUNKS",
        "chunks": [
          {
            "text": "<string>",
            "metadata": {}
          }
        ]
      }
    },
    "schema_type": "GENERATION",
    "application_interaction_id": "<string>",
    "application_test_case_output_group_id": "<string>",
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "account_id": "<string>",
    "metrics": {}
  }
]

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string

Body

application/json · ApplicationTestCaseOutputRequest · object[]

The body is of type ApplicationTestCaseOutputRequest · object[].

Response

200
application/json

Successful Response