We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On using the crew flow,
let say I am routing in the middle, and the listener method which listen to the router method can run based on string and method instance.
so if the listening method name is same as the string then it will fall into infinite loop.
refer the code below
Can identify the string and method name or it should restrict the this type of usage with some error.
class AnalysisState(BaseModel): """Analysis State class"""
state: int = 3
class CrewFlow(Flow[AnalysisState]): """Crew Flow class"""
@start() def failure_research(self): """ """ print("Failure research crew will start here") @listen(failure_research) def failure_analysis(self): """ """ print("Failure analysis crew will start here") @router(or_(failure_research, "looping")) def what_next(self): """ """ print("Routing will start here") if self.state.state != 0: print("Looping here") self.state.state -= 1 return "looping" return "compose_inference" @listen("compose_inference") def compose_inference(self): """ """ print("Inference crew will start here")
Ubuntu 22.04
3.10
0.98.0
0.17.0
Venv
Except with error! or have understanding on string and method naming
Not a critical issue! as people know how to use it, it's good to fix to make the code more readable with same string that calling with different one.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
On using the crew flow,
let say I am routing in the middle, and the listener method which listen to the router method can run based on string and method instance.
so if the listening method name is same as the string then it will fall into infinite loop.
Steps to Reproduce
refer the code below
Expected behavior
Can identify the string and method name or it should restrict the this type of usage with some error.
Screenshots/Code snippets
class AnalysisState(BaseModel):
"""Analysis State class"""
class CrewFlow(Flow[AnalysisState]):
"""Crew Flow class"""
Operating System
Ubuntu 22.04
Python Version
3.10
crewAI Version
0.98.0
crewAI Tools Version
0.17.0
Virtual Environment
Venv
Evidence
Possible Solution
Except with error! or have understanding on string and method naming
Additional context
Not a critical issue! as people know how to use it, it's good to fix to make the code more readable with same string that calling with different one.
The text was updated successfully, but these errors were encountered: