@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
39 lines (33 loc) • 1.57 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;
};
import { AtomName } from "../types";
export const getScheduleLLmOptions = vmindOptions => {
const {customRequestFunc: customRequestFunc = {}} = vmindOptions, others = __rest(vmindOptions, [ "customRequestFunc" ]), llmCustomOptions = {};
return Object.keys(customRequestFunc).forEach((oldName => {
switch (oldName) {
case "dataExtraction":
llmCustomOptions[AtomName.DATA_EXTRACT] = customRequestFunc[oldName];
case "dataQuery":
llmCustomOptions[AtomName.DATA_QUERY] = customRequestFunc[oldName];
break;
case "chartCommand":
llmCustomOptions[AtomName.CHART_COMMAND] = customRequestFunc[oldName];
break;
case "chartAdvisor":
llmCustomOptions[AtomName.CHART_GENERATE] = customRequestFunc[oldName];
break;
case "IntelligentInsight":
llmCustomOptions[AtomName.DATA_INSIGHT] = customRequestFunc[oldName];
}
})), Object.assign(Object.assign({}, others), {
customRequestFunc: llmCustomOptions
});
};
//# sourceMappingURL=utils.js.map