The list function is a method for retrieving all trained datasets. This function communicates with the Datasets API to fetch a list of all datasets that have been trained for both AI and Search Interfaces. Please note that you will only be able to view datasets that you have created or have access to.

Initialize AI Modules

const worqhat = require('worqhat');

var config = new worqhat.Configuration({
    apiKey: "your-api-key",
    debug: true,
    max_retries: 3,
});


worqhat.initializeApp(config);

let ai = worqhat.ai();

Implementation

ai.datasets.list().then(function(response) {
    console.log(response);
}).catch(function(error) {
    console.log(error);
});