From 6a1eb10830ac6ab3602bbc4ee07d565bd9eab46f Mon Sep 17 00:00:00 2001 From: Alexandre Gindre Date: Mon, 14 Apr 2025 17:09:59 +0200 Subject: [PATCH] fix(crew template): fix wrong parameter name and missing input (#2387) --- src/crewai/cli/templates/crew/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crewai/cli/templates/crew/main.py b/src/crewai/cli/templates/crew/main.py index 454d28ee6..b604d8ceb 100644 --- a/src/crewai/cli/templates/crew/main.py +++ b/src/crewai/cli/templates/crew/main.py @@ -33,7 +33,8 @@ def train(): Train the crew for a given number of iterations. """ inputs = { - "topic": "AI LLMs" + "topic": "AI LLMs", + 'current_year': str(datetime.now().year) } try: {{crew_name}}().crew().train(n_iterations=int(sys.argv[1]), filename=sys.argv[2], inputs=inputs) @@ -59,6 +60,7 @@ def test(): "topic": "AI LLMs", "current_year": str(datetime.now().year) } + try: {{crew_name}}().crew().test(n_iterations=int(sys.argv[1]), eval_llm=sys.argv[2], inputs=inputs)