import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const trainingDataset = await client.trainingDatasets.retrieve('training_dataset_id');
console.log(trainingDataset.id);
{
"name": "<string>",
"schema_type": "GENERATION",
"data_source": "S3",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user"
}
Gets the details of a training dataset
This API can be used to get information about a single training dataset by ID. To use this API, pass in the id
that was returned from your Create Training Dataset 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: 'My API Key',
});
const trainingDataset = await client.trainingDatasets.retrieve('training_dataset_id');
console.log(trainingDataset.id);
{
"name": "<string>",
"schema_type": "GENERATION",
"data_source": "S3",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user"
}
Successful Response
The response is of type object
.