mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-27 03:55:00 +02:00
docs: Update subgraphs.md (#5052)
* Update subgraphs.md The state while defining the Subgraph is updated. Also an edge connecting START to the call_model node in the subgraph was created. * Update docs/docs/concepts/subgraphs.md * Update docs/docs/concepts/subgraphs.md --------- Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
This commit is contained in:
co-authored by
Eugene Yurtsev
parent
470b9a4b97
commit
b8683ab67a
@@ -59,8 +59,9 @@ The main question when adding subgraphs is how the parent graph and subgraph com
|
||||
response = model.invoke(state["subgraph_messages"])
|
||||
return {"subgraph_messages": response}
|
||||
|
||||
subgraph_builder = StateGraph(State)
|
||||
subgraph_builder.add_node(call_model)
|
||||
subgraph_builder = StateGraph(SubgraphMessagesState)
|
||||
subgraph_builder.add_node("call_model_from_subgraph", call_model)
|
||||
subgraph_builder.add_edge(START, "call_model_from_subgraph")
|
||||
...
|
||||
# highlight-next-line
|
||||
subgraph = subgraph_builder.compile()
|
||||
|
||||
Reference in New Issue
Block a user