import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const autoGeneratedDraftTestCase = await client.evaluationDatasets.autogeneratedDraftTestCases.retrieve(
'evaluation_dataset_id',
'autogenerated_draft_test_case_id',
);
console.log(autoGeneratedDraftTestCase.id);
{
"evaluation_dataset_id": "<string>",
"schema_type": "GENERATION",
"test_case_data": {
"input": "<string>",
"expected_output": "<string>",
"expected_extra_info": {
"schema_type": "CHUNKS",
"chunks": [
{
"text": "<string>",
"metadata": {}
}
]
},
"artifact_ids_filter": [
"<string>"
]
},
"approved": true,
"topic_str": "<string>",
"content_metadata": {},
"id": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"created_by_identity_type": "user"
}
Get the test case by its id.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const autoGeneratedDraftTestCase = await client.evaluationDatasets.autogeneratedDraftTestCases.retrieve(
'evaluation_dataset_id',
'autogenerated_draft_test_case_id',
);
console.log(autoGeneratedDraftTestCase.id);
{
"evaluation_dataset_id": "<string>",
"schema_type": "GENERATION",
"test_case_data": {
"input": "<string>",
"expected_output": "<string>",
"expected_extra_info": {
"schema_type": "CHUNKS",
"chunks": [
{
"text": "<string>",
"metadata": {}
}
]
},
"artifact_ids_filter": [
"<string>"
]
},
"approved": true,
"topic_str": "<string>",
"content_metadata": {},
"id": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"created_by_identity_type": "user"
}
Successful Response
The response is of type object
.