@visactor/vmind
Version:
<div align="center"> <a href="https://github.com/VisActor#gh-light-mode-only" target="_blank"> <img alt="VisActor Logo" width="200" src="https://github.com/VisActor/.github/blob/main/profile/logo_500_200_light.svg"/> </a> <a href="https://githu
45 lines (37 loc) • 1.77 kB
JavaScript
;
var __rest = this && this.__rest || function(s, e) {
var t = {};
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
var i = 0;
for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
}
return t;
};
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.getScheduleLLmOptions = void 0;
const types_1 = require("../types"), getScheduleLLmOptions = vmindOptions => {
const {customRequestFunc: customRequestFunc = {}} = vmindOptions, others = __rest(vmindOptions, [ "customRequestFunc" ]), llmCustomOptions = {};
return Object.keys(customRequestFunc).forEach((oldName => {
switch (oldName) {
case "dataExtraction":
llmCustomOptions[types_1.AtomName.DATA_EXTRACT] = customRequestFunc[oldName];
case "dataQuery":
llmCustomOptions[types_1.AtomName.DATA_QUERY] = customRequestFunc[oldName];
break;
case "chartCommand":
llmCustomOptions[types_1.AtomName.CHART_COMMAND] = customRequestFunc[oldName];
break;
case "chartAdvisor":
llmCustomOptions[types_1.AtomName.CHART_GENERATE] = customRequestFunc[oldName];
break;
case "IntelligentInsight":
llmCustomOptions[types_1.AtomName.DATA_INSIGHT] = customRequestFunc[oldName];
}
})), Object.assign(Object.assign({}, others), {
customRequestFunc: llmCustomOptions
});
};
exports.getScheduleLLmOptions = getScheduleLLmOptions;
//# sourceMappingURL=utils.js.map