import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const evaluationDatasetVersion = await client.evaluationDatasets.evaluationDatasetVersions.retrieve(
'evaluation_dataset_id',
'evaluation_dataset_version_id',
);
console.log(evaluationDatasetVersion.id);
{
"num": 123,
"evaluation_dataset_id": "<string>",
"draft": true,
"published_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
Gets the details of a evaluation dataset version
This API can be used to get information about a single evaluation dataset version by ID. To use this API, pass in the id
that was returned from your Create Evaluation Dataset Version API call as a path parameter.
Review the response schema to see the fields that will be returned.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const evaluationDatasetVersion = await client.evaluationDatasets.evaluationDatasetVersions.retrieve(
'evaluation_dataset_id',
'evaluation_dataset_version_id',
);
console.log(evaluationDatasetVersion.id);
{
"num": 123,
"evaluation_dataset_id": "<string>",
"draft": true,
"published_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
Successful Response
The response is of type object
.