From 7b14017fbd23737de525336e69d1adb7d195d582 Mon Sep 17 00:00:00 2001 From: Manz Xiao <79624270+manzxiao@users.noreply.github.com> Date: Fri, 31 Oct 2025 10:44:56 +0800 Subject: [PATCH] Change callModel node to async function "await" can only be used inside an "async" function --- src/oss/langgraph/streaming.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oss/langgraph/streaming.mdx b/src/oss/langgraph/streaming.mdx index c86c5a11ca..1fac410f4c 100644 --- a/src/oss/langgraph/streaming.mdx +++ b/src/oss/langgraph/streaming.mdx @@ -703,7 +703,7 @@ for await (const [msg, metadata] of await graph.stream( }); const graph = new StateGraph(State) - .addNode("callModel", (state) => { + .addNode("callModel", async (state) => { const topic = state.topic; console.log("Writing joke...");