fix: allow both string and dict types for TaskOutput.raw

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-20 17:35:47 +00:00
parent 2793a8ee87
commit 4bafdacd88

View File

@@ -1,5 +1,5 @@
import json
from typing import Any, Dict, Optional
from typing import Any, Dict, Optional, Union
from pydantic import BaseModel, Field, model_validator
@@ -15,7 +15,7 @@ class TaskOutput(BaseModel):
description="Expected output of the task", default=None
)
summary: Optional[str] = Field(description="Summary of the task", default=None)
raw: str = Field(description="Raw output of the task", default="")
raw: Union[str, Dict[str, Any]] = Field(description="Raw output of the task", default="")
pydantic: Optional[BaseModel] = Field(
description="Pydantic output of task", default=None
)