import { StateGraph } from "@langchain/langgraph";
// GRAPH STATE
type GraphState = {
/**
* An object where each key is a string.
*/
prompt: string;
skipRAG: boolean;
};
const graphState = {
prompt: {
value: (x: string, y: string) => y,
default: () => (""),
},
skipRAG: {
value: (x: boolean, y: boolean) => y,
default: () => (false),
}
};
// GRAPH NODES
// GRAPH CONSTRUCTION
const workflow = new StateGraph<GraphState>({
channels: graphState,
});
Error:
ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/src/scripts/background_v2.ts
27:32-42
[tsl] ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/src/scripts/background_v2.ts(27,33)
TS2558: Expected 0 type arguments, but got 1.
ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/node_modules/@langchain/langgraph/dist/graph/graph.d.ts
22:27-32
[tsl] ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/node_modules/@langchain/langgraph/dist/graph/graph.d.ts(22,28)
TS1139: Type parameter declaration expected.
ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/node_modules/@langchain/langgraph/dist/graph/graph.d.ts
22:35-42
[tsl] ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/node_modules/@langchain/langgraph/dist/graph/graph.d.ts(22,36)
TS1005: ',' expected.
ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/node_modules/@langchain/langgraph/dist/graph/graph.d.ts
23:51-52
[tsl] ERROR in /Users/andrewnguonly/Documents/workspace/github/andrewnguonly/Lumos/node_modules/@langchain/langgraph/dist/graph/graph.d.ts(23,52)
TS1005: ',' expected.
Branch:
langgraph
Build command:npm run build
LangGraph version:"@langchain/langgraph": "^0.0.21"
Code:
Error: