hi bros
my problem is that the crew.kickoff(..)
result does not have pydantic model when I properly define output_pydantic on my tasks…
splitter_agent = Agent(**splitter_agent_params)
splitter_task = Task(
**splitter_task_params,
agent=splitter_agent,
output_pydantic=SplitterOutput,
)
sanitizer_agent = Agent(**sanitizer_agent_params)
sanitizer_task = Task(
**sanitizer_task_params,
agent=sanitizer_agent,
contexts=[splitter_task],
output_pydantic=SanitizerOutput,
)
crew = Crew(
agents=[splitter_agent, sanitizer_agent],
tasks=[splitter_task, sanitizer_task],
verbose=True,
)
its gpt-4o-mini model and sometimes return value is right formatted pydantic model or sometimes returns just string raw return, not pydantic model.
how can I enhance this… workers to produce always right formatted result?
editted *
I lookup pydantic result related topics and I found a message implies ‘using open ai model’ is maybe problematic. … really? If yes, what should I do?