You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using a version of <code>@langchain/core</code> < 0.2.3, when calling chat models or LLMs you need to call <code>await model.stream()</code> within your nodes to get token-by-token streaming events, and aggregate final outputs if needed to update the graph state. In later versions of <code>@langchain/core</code>, this occurs automatically, and you can call <code>await model.invoke()</code>.
12
12
<br>
13
13
For more on how to upgrade <code>@langchain/core</code>, check out <a href="https://js.langchain.com/v0.2/docs/how_to/installation/#installing-integration-packages">the instructions here</a>.
14
14
</p>
15
15
16
-
</div>
16
+
</div>-->
17
17
18
18
This how-to guide closely follows the others in this directory, showing how to
19
19
incorporate the functionality into a prototypical agent in LangGraph.
Token streaming is supported by many, but not all chat models. Check to see if your LLM integration supports token streaming <a href="https://js.langchain.com/v0.2/docs/integrations/chat/">here (doc)</a>. Note that some integrations may support <i>general</i> token streaming but lack support for streaming tool calls.
@@ -35,7 +35,7 @@ and all its subclasses, such as
35
35
<p>
36
36
In this how-to, we will create our agent from scratch to be transparent (but verbose). You can accomplish similar functionality using the <code>createReactAgent({ llm, tools })</code> (<a href="/langgraphjs/reference/functions/langgraph_prebuilt.createReactAgent.html">API doc</a>) constructor. This may be more appropriate if you are used to LangChain's <a href="https://js.langchain.com/v0.2/docs/how_to/agent_executor">AgentExecutor</a> class.
37
37
</p>
38
-
</div>
38
+
</div>-->
39
39
40
40
## Setup
41
41
@@ -121,12 +121,12 @@ Now load the [chat model](https://js.langchain.com/v0.2/docs/concepts/#chat-mode
0 commit comments