Skip to content

Commit

Permalink
chore: Update date to current year in template (#1860)
Browse files Browse the repository at this point in the history
* update date to current year in template

Signed-off-by: dandawg <[email protected]>

* current_year update to example task template

Signed-off-by: dandawg <[email protected]>

---------

Signed-off-by: dandawg <[email protected]>
  • Loading branch information
dandawg authored Jan 7, 2025
1 parent 8f57753 commit 673a38c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/crewai/cli/templates/crew/config/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/crewai/cli/templates/crew/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -16,7 +18,8 @@ def run():
Run the crew.
"""
inputs = {
'topic': 'AI LLMs'
'topic': 'AI LLMs',
'current_year': str(datetime.now().year)
}

try:
Expand Down

0 comments on commit 673a38c

Please sign in to comment.