mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-02 15:52:34 +00:00
Flow visualizer (#1377)
* Almost working! * It fully works but not clean enought * Working but not clean engouth * Everything is workign * WIP. Working on adding and & or to flows. In the middle of setting up template for flow as well * template working * Everything is working * More changes and todos * Add more support for @start * Router working now * minor tweak to * minor tweak to conditions and event handling * Update logs * Too trigger happy with cleanup * Added in Thiago fix * Flow passing results again * Working on docs. * made more progress updates on docs * Finished talking about controlling flows * add flow output * fixed flow output section * add crews to flows section is looking good now * more flow doc changes * Update docs and add more examples * drop visualizer * save visualizer * pyvis is beginning to work * pyvis working * it is working * regular methods and triggers working. Need to work on router next. * properly identifying router and router children nodes. Need to fix color * children router working. Need to support loops * curving cycles but need to add curve conditionals * everythin is showing up properly need to fix curves * all working. needs to be cleaned up * adjust padding * drop lib * clean up prior to PR * incorporate joao feedback * final tweaks for joao * Refactor to make crews easier to understand * update CLI and templates * Fix crewai version in flows * Fix merge conflict
This commit is contained in:
committed by
GitHub
parent
f65ecef670
commit
8fb08a0b25
@@ -1,12 +1,14 @@
|
||||
# flow.py
|
||||
|
||||
# flow.py
|
||||
|
||||
import asyncio
|
||||
import inspect
|
||||
from typing import Any, Callable, Dict, Generic, List, Set, Type, TypeVar, Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from crewai.flow.flow_visualizer import visualize_flow
|
||||
from crewai.flow.flow_visualizer import plot_flow
|
||||
|
||||
T = TypeVar("T", bound=Union[BaseModel, Dict[str, Any]])
|
||||
|
||||
@@ -268,5 +270,5 @@ class Flow(Generic[T], metaclass=FlowMeta):
|
||||
|
||||
traceback.print_exc()
|
||||
|
||||
def visualize(self, filename: str = "crewai_flow_graph"):
|
||||
visualize_flow(self, filename)
|
||||
def plot(self, filename: str = "crewai_flow_graph"):
|
||||
plot_flow(self, filename)
|
||||
|
||||
Reference in New Issue
Block a user