@langgraph-js/bundler
Version:
Build tool for LangGraph.js applications that packages graph configurations into deployable modules
11 lines • 460 B
JavaScript
export const filterGraphs = (config, agentString) => {
if (!agentString)
return config;
const graphs = agentString.split(',');
// 过滤掉config.graphs中不存在的graph
const filteredGraphs = Object.fromEntries(Object.keys(config.graphs)
.filter((graph) => graphs.includes(graph))
.map((graph) => [graph, config.graphs[graph]]));
return { ...config, graphs: filteredGraphs };
};
//# sourceMappingURL=utils.js.map