mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-12 01:28:30 +00:00
docs: Update documentation for inject_date feature
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from crewai import Agent, Task, Crew
|
||||
from datetime import datetime
|
||||
|
||||
agent = Agent(
|
||||
role="research_analyst",
|
||||
@@ -12,7 +13,7 @@ agent_custom_format = Agent(
|
||||
goal="Provide financial insights with proper date context",
|
||||
backstory="You are a financial analyst who needs precise date formatting.",
|
||||
inject_date=True,
|
||||
date_format="%B %d, %Y", # Format as "May 21, 2025"
|
||||
date_format="%B %d, %Y", # Format as "May 21, 2025" (Month Day, Year)
|
||||
)
|
||||
|
||||
task = Task(
|
||||
@@ -20,12 +21,14 @@ task = Task(
|
||||
expected_output="A comprehensive report on current market trends",
|
||||
agent=agent,
|
||||
)
|
||||
#
|
||||
|
||||
task_custom = Task(
|
||||
description="Analyze financial data and provide insights",
|
||||
expected_output="A detailed financial analysis report",
|
||||
agent=agent_custom_format,
|
||||
)
|
||||
#
|
||||
|
||||
crew = Crew(
|
||||
agents=[agent, agent_custom_format],
|
||||
|
||||
Reference in New Issue
Block a user