This function allows you to delete trained datasets. It interacts with the Datasets API to delete a dataset that you have trained for both AI and Search Interfaces. Please note that you will only be able to delete datasets that you have created or have access to.

Parameters:

ParameterTypeDescription
datasetIdstringThe ID of the dataset to be deleted. This is a required parameter.

Returns: A Promise that resolves to the deletion result.

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.delete({
    datasetId: "your-dataset-id"
}).then(function(response) {
    console.log(response);
}).catch(function(error) {
    console.log(error);
});