tests: use send twice in a sequence - #3060
Closed
Eugene Yurtsev (eyurtsev) wants to merge 6 commits into
Closed
Conversation
| return {"best_selected_joke": best_joke} | ||
|
|
||
| builder = StateGraph(OverallState) | ||
| builder.add_conditional_edges("__start__", generate_jokes, ["generate_joke"]) |
Collaborator
Author
There was a problem hiding this comment.
fails compilation:
raise ValueError(f"Found edge starting at unknown node '{source}'")
E ValueError: Found edge starting at unknown node 'generate_joke'
- This should probably work
- We should've called these "add_routing_node" in retrospect
Contributor
There was a problem hiding this comment.
But your graph doesn't have a "generate_joke" node? What am I missing?
Collaborator
Author
There was a problem hiding this comment.
If i add a node it requires the state to be overall state (and I think forces the reduce step)
| def generate_jokes(state: OverallState): | ||
| # Distribute the subjects to the generate_joke node | ||
| sends = [Send("generate_joke", {"subject": s}) for s in state["subjects"]] | ||
| return Command(goto=sends) |
Collaborator
Author
There was a problem hiding this comment.
This one fails as well -- looks like a bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.