crewAI
crewAI copied to clipboard
Update task.py: try to find json in task output using regex
Sometimes the model replies with a valid and additional text, let's try to extract and validate it first. It's cheaper than calling LLM for that.
I think we could even replace the code above with only this one, the regex will match both.