Skip to content

Parallel node fan-out and fan-in with extra steps #576

Closed Answered by nfcampos
Freezaa9 asked this question in Q&A
Discussion options

You must be logged in to vote

hi @Freezaa9 I think you can achieve what you want with

builder = StateGraph(State)
builder.add_node("a", ReturnNodeValue("I'm A"))
builder.set_entry_point("a")
builder.add_node("b", ReturnNodeValue("I'm B"))
builder.add_node("b2", ReturnNodeValue("I'm B2"))
builder.add_node("c", ReturnNodeValue("I'm C"))
builder.add_node("d", ReturnNodeValue("I'm D"))
builder.add_edge("a", "b")
builder.add_edge("a", "c")
builder.add_edge("b", "b2")
builder.add_edge(["b2", "c"], "d")
builder.set_finish_point("d")
graph = builder.compile()

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@Freezaa9
Comment options

Comment options

You must be logged in to vote
4 replies
@Freezaa9
Comment options

@jasontjahjono
Comment options

@gambastyle
Comment options

@Freezaa9
Comment options

Answer selected by nfcampos
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants