crewAI-tools
crewAI-tools copied to clipboard
Calling Directory Tool and File Tool together fails due to errant ", needs extra output validation (or input validation)
guidance_dir = (ROOT / "." / "data" / "guidance").as_posix()
docs_tool = DirectoryReadTool(directory=guidance_dir) file_tool = FileReadTool()
By default these tools don't work together and give Error 2 File not found.
I fixed this by creating a custom variant of filetool which calls
file_path = file_path.strip().strip('"').strip("'")
before reading the file.