mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 07:13:00 +00:00
chore: update template files to use modern type annotations
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
from crewai import Agent, Crew, Process, Task
|
from crewai import Agent, Crew, Process, Task
|
||||||
from crewai.project import CrewBase, agent, crew, task
|
from crewai.project import CrewBase, agent, crew, task
|
||||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||||
from typing import List
|
|
||||||
# If you want to run a snippet of code before or after the crew starts,
|
# If you want to run a snippet of code before or after the crew starts,
|
||||||
# you can use the @before_kickoff and @after_kickoff decorators
|
# you can use the @before_kickoff and @after_kickoff decorators
|
||||||
# https://docs.crewai.com/concepts/crews#example-crew-class-with-decorators
|
# https://docs.crewai.com/concepts/crews#example-crew-class-with-decorators
|
||||||
@@ -10,8 +9,8 @@ from typing import List
|
|||||||
class {{crew_name}}():
|
class {{crew_name}}():
|
||||||
"""{{crew_name}} crew"""
|
"""{{crew_name}} crew"""
|
||||||
|
|
||||||
agents: List[BaseAgent]
|
agents: list[BaseAgent]
|
||||||
tasks: List[Task]
|
tasks: list[Task]
|
||||||
|
|
||||||
# Learn more about YAML configuration files here:
|
# Learn more about YAML configuration files here:
|
||||||
# Agents: https://docs.crewai.com/concepts/agents#yaml-configuration-recommended
|
# Agents: https://docs.crewai.com/concepts/agents#yaml-configuration-recommended
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
from typing import List
|
|
||||||
|
|
||||||
from crewai import Agent, Crew, Process, Task
|
from crewai import Agent, Crew, Process, Task
|
||||||
from crewai.agents.agent_builder.base_agent import BaseAgent
|
from crewai.agents.agent_builder.base_agent import BaseAgent
|
||||||
from crewai.project import CrewBase, agent, crew, task
|
from crewai.project import CrewBase, agent, crew, task
|
||||||
@@ -13,8 +11,8 @@ from crewai.project import CrewBase, agent, crew, task
|
|||||||
class PoemCrew:
|
class PoemCrew:
|
||||||
"""Poem Crew"""
|
"""Poem Crew"""
|
||||||
|
|
||||||
agents: List[BaseAgent]
|
agents: list[BaseAgent]
|
||||||
tasks: List[Task]
|
tasks: list[Task]
|
||||||
|
|
||||||
# Learn more about YAML configuration files here:
|
# Learn more about YAML configuration files here:
|
||||||
# Agents: https://docs.crewai.com/concepts/agents#yaml-configuration-recommended
|
# Agents: https://docs.crewai.com/concepts/agents#yaml-configuration-recommended
|
||||||
|
|||||||
Reference in New Issue
Block a user