From 15fad287682db6b5cac8d66a815d257e0749f8c6 Mon Sep 17 00:00:00 2001 From: Sanket Rajendra Shinde <126979961+sanketshinde3001@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:03:43 +0530 Subject: [PATCH] Added a function to remove an ML engine --- src/ml_engines/ml_engine.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ml_engines/ml_engine.ts b/src/ml_engines/ml_engine.ts index 4cdbfaa..bf96863 100644 --- a/src/ml_engines/ml_engine.ts +++ b/src/ml_engines/ml_engine.ts @@ -35,6 +35,16 @@ export default class MLEngine { this.connection_data = connection_data; } + /** + * Removes a specified mlEngine by its name. + * @param {string} mlEngineName - The name of the mlEngine to remove. + * @returns {Promise} - Resolves when the mlEngine is successfully removed. + * @throws {MindsDbError} - Something went wrong deleting the mlEngine. + */ + async remove(mlEngineName: string): Promise { + await this.mlEnginesApiClient.deleteMLEngine(mlEngineName); + } + /** Deletes this mlEngine. * @throws {MindsDbError} - Something went wrong deleting the mlEngine. */