import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
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": {}
}
]
Creates a batch of application test case outputs
This API can be used to create multiple application test case outputs so users do not have to the incur the cost of repeated network calls. To use this API, pass in a list of application test case outputs in the request body.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
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": {}
}
]
The body is of type ApplicationTestCaseOutputRequest · object[]
.
Successful Response