Closed jamesrichards4 closed 2 months ago
Raising this to get thoughts on how well this ties in with what Will originally planned. This already seems way neater and more extensible. The visualisation is massively improved:
from IPython.display import Image, display
from langchain_core.runnables.graph import CurveStyle, MermaidDrawMethod, NodeStyles
display(
Image(
app = Redbox(env=Settings(_env_file="../.env")).graph.get_graph().draw_mermaid_png(
draw_method=MermaidDrawMethod.API,
)
)
)
@wpfl-dbt be great to get your thoughts on this, the redbox tests are failing for coverage but once I merge main I can remove some worker only code which should sort that so this is good to go (might need additional tests anyway but we can chat about that)
The graph structure is currently messy and confusing. By imposing rules and constraints we can tidy it up and make it easier to develop in future.
RedboxState
p_
rocess,d_
ecision, ands_
sendI'm a visual learner
Changes proposed in this pull request
RedboxState
state and a customdocument_reducer
functionredbox.graph.nodes.processes
for processes and patternsredbox.graph.nodes.sends
for sendsredbox.graph.edges
for functions that build conditionals, which attach to decisionsredbox.graph.root
for subgraphs and the final graphGuidance to review
Things to check