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
});

async function main() {
  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);
}

main();
[
  {
    "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 | null

Body

application/json · object[]
application_variant_id
string
required
test_case_id
string
required
output
object
required
account_id
string
required
evaluation_dataset_version_num
integer
required
trace_spans
object[]

List of trace spans associated with the application's execution. These spans provide insight into the individual steps taken by nodes involved in generating the output.

metrics
object
ignore_missing
boolean

If set to true, the output batch will be saved even if there are missing outputs for some test cases.

Response

200
application/json
Successful Response
application_variant_id
string
required
evaluation_dataset_id
string
required
test_case_id
string
required
output
object
required
id
string
required

The unique identifier of the entity.

created_at
string
required

The date and time when the entity was created in ISO format.

account_id
string
required

The ID of the account that owns the given entity.

schema_type
enum<string>
default:
GENERATION
Available options:
GENERATION
application_interaction_id
string
application_test_case_output_group_id
string
metrics
object