From 673a38c5d97b8acc8ef5516c2741cd69dc0a9d46 Mon Sep 17 00:00:00 2001 From: Daniel Dowler <12484302+dandawg@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:20:32 -0500 Subject: [PATCH] chore: Update date to current year in template (#1860) * update date to current year in template Signed-off-by: dandawg <12484302+dandawg@users.noreply.github.com> * current_year update to example task template Signed-off-by: dandawg <12484302+dandawg@users.noreply.github.com> --------- Signed-off-by: dandawg <12484302+dandawg@users.noreply.github.com> --- src/crewai/cli/templates/crew/config/tasks.yaml | 2 +- src/crewai/cli/templates/crew/main.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/crewai/cli/templates/crew/config/tasks.yaml b/src/crewai/cli/templates/crew/config/tasks.yaml index e6c0870a2..44bd89865 100644 --- a/src/crewai/cli/templates/crew/config/tasks.yaml +++ b/src/crewai/cli/templates/crew/config/tasks.yaml @@ -2,7 +2,7 @@ research_task: description: > Conduct a thorough research about {topic} Make sure you find any interesting and relevant information given - the current year is 2024. + the current year is {current_year}. expected_output: > A list with 10 bullet points of the most relevant information about {topic} agent: researcher diff --git a/src/crewai/cli/templates/crew/main.py b/src/crewai/cli/templates/crew/main.py index 8f68a83c7..104f146c0 100644 --- a/src/crewai/cli/templates/crew/main.py +++ b/src/crewai/cli/templates/crew/main.py @@ -2,6 +2,8 @@ import sys import warnings +from datetime import datetime + from {{folder_name}}.crew import {{crew_name}} warnings.filterwarnings("ignore", category=SyntaxWarning, module="pysbd") @@ -16,7 +18,8 @@ def run(): Run the crew. """ inputs = { - 'topic': 'AI LLMs' + 'topic': 'AI LLMs', + 'current_year': str(datetime.now().year) } try: