mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 16:22:49 +00:00
@@ -57,10 +57,7 @@ class Crew(BaseModel):
|
||||
@classmethod
|
||||
@field_validator("config", mode="before")
|
||||
def check_config_type(cls, v: Union[Json, Dict[str, Any]]):
|
||||
"""Ensures the 'config' field is a valid JSON or dictionary."""
|
||||
if isinstance(v, Json):
|
||||
return json.loads(v)
|
||||
return v
|
||||
return json.loads(v) if isinstance(v, Json) else v
|
||||
|
||||
@model_validator(mode="after")
|
||||
def check_config(self):
|
||||
|
||||
Reference in New Issue
Block a user