Hello there,
I have an Writer Agent.
I have two tasks,
A content generation task, a output pydantic is:
class WriteContentOutput(BaseModel):
title: str
meta_description: str
short_description: str
product_image_metadata: Dict[str, str]
content: str
@field_validator('content')
@classmethod
def validate_html(cls, v: str) -> str:
if check_html(v):
return v
raise ValueError("Invalid HTML")
And a review task. This task should validate if html(content) is correct. I want here fix and put the content in pydantic or regenerate content generation task. I might add another validations in future. But I didnt succeed.