sesterce-cli
Version:
A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.
24 lines • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListInferenceModels = void 0;
const either_1 = require("@/core/logic/either");
const list_inference_models_error_1 = require("./errors/list-inference-models-error");
class ListInferenceModels {
constructor(apiClient) {
this.apiClient = apiClient;
}
async execute() {
try {
const models = await this.apiClient.get("/ai-inference/models");
if (!models) {
return (0, either_1.left)(new list_inference_models_error_1.ListInferenceModelsError("Failed to list inference models"));
}
return (0, either_1.right)(models);
}
catch (error) {
return (0, either_1.left)(new list_inference_models_error_1.ListInferenceModelsError(error instanceof Error ? error.message : "Unexpected error occurred."));
}
}
}
exports.ListInferenceModels = ListInferenceModels;
//# sourceMappingURL=list-inference-models.js.map