mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-20 21:38:14 +00:00
Implement CrewAIBaseModel and Update to ConfigDict (#29)
New CrewAIBaseModel: Base for Agent, Crew, Task. Includes generated, frozen UUID. Adds hashing capability Migrate to ConfigDict: Replaces class Config with model_config, see this deprecation note . Benefits: Adds auditing capability with frozen UUIDs.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field, model_validator
|
||||
from pydantic import Field, model_validator
|
||||
|
||||
from crewai.agent import Agent
|
||||
from crewai.base.model import CrewAIBaseModel
|
||||
|
||||
|
||||
class Task(BaseModel):
|
||||
class Task(CrewAIBaseModel):
|
||||
"""Class that represent a task to be executed."""
|
||||
|
||||
description: str = Field(description="Description of the actual task.")
|
||||
|
||||
Reference in New Issue
Block a user