Find answers from the community

Updated 4 weeks ago

Draw All Flows Utility Fails With InputRequiredEvent

Hey! The draw_all_flows utility fails when there's HITL (basically whenever there is an InputRequiredEvent)

Plain Text
```
File /opt/anaconda3/envs/llamaindex/lib/python3.12/site-packages/llama_index/utils/workflow/draw.py:62, in draw_all_possible_flows(workflow, filename, notebook)
     60 for return_type in step_config.return_types:
     61     if return_type != type(None):
---> 62         net.add_edge(step_name, return_type.__name__)
     64 for event_type in step_config.accepted_events:
     65     net.add_edge(event_type.__name__, step_name)

File /opt/anaconda3/envs/llamaindex/lib/python3.12/site-packages/pyvis/network.py:372, in Network.add_edge(self, source, to, **options)
    368 # verify nodes exists
    369 assert source in self.get_nodes(), \
    370     "non existent node '" + str(source) + "'"
--> 372 assert to in self.get_nodes(), \
    373     "non existent node '" + str(to) + "'"
    375 # we only check existing edge for undirected graphs
    376 if not self.directed:

AssertionError: non existent node 'InputRequiredEvent'
L
1 comment
this should be fixed in new releases: pip install -U llama-index-utils-workflow
Add a reply
Sign up and join the conversation on Discord