crewAI
crewAI copied to clipboard
Add conditional check for output file directory creation
This PR adds a conditional check to ensure that the output file directory exists before attempting to create it. This ensures that the code does not fail in cases where the directory does not exist and needs to be created.
The condition is added in the _save_file method of the Task class, ensuring that the correct behavior is maintained for saving results to a file.