GET
/
v4
/
training-datasets
/
{training_dataset_id}
/
contents
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const trainingDatasetGenerationItem of client.trainingDatasets.contents.list(
  'training_dataset_id',
)) {
  console.log(trainingDatasetGenerationItem.input);
}
[
  {
    "schema_type": "GENERATION",
    "input": "<string>",
    "output": "<string>"
  }
]

Authorizations

x-api-key
string
header
required

Path Parameters

training_dataset_id
string
required

Response

200
application/json

Successful Response

The response is of type TrainingDatasetGenerationItem · object[].