L3: Agentic Sales Pipeline - @router&paths error

I am trying to get the code to work in my Pycharm and this part I just can’t get to work even with ChatGPT or the CrewAI Assistant customGPT.

@router(filter_leads, paths=[“high”, “medium”, “low”])
TypeError: router() got an unexpected keyword argument ‘paths’

Of course I can just delete this part as it’s not exactly an important part of the code, but it would still be nice to know how to get this working.
Anybody?

Many thanks in advance,
Ville

I am also getting the same error in vscode. Any ideas? Thanks in advance!

I replaced:
@router(filter_leads, paths=[“high”, “medium”, “low”])
with:
@router(log_leads) # Listen to the input method
def count_leads(self, scores):
if len(scores) > 10:
return ‘high’
elif len(scores) > 5:
return ‘medium’
else:
return ‘low’

the flow will be like this…

I hope this helps.