Using dynamic path in FileRead Tool Path

Hello, I want to pass an input from a flow into a crew which is a file path to a text file. In the crew, I cannot work out how to add this input into a correctly instantiated FileReadTool(file_path=)

I tried doing it in before_kickoff() but it throws errors, and it cannot be called outside the class in the normal use way with a pre-loaded fixed string. Any help please?

1 Like

I’m trying to use a dynamic path in FileReadTool as well.
In my crew, I have 2 agents and 2 tasks. The output of task 1 would compose the path, and the task 2 uses the tool, something like:
´FileReadTool(file_path=f"docs/{task1_output}.txt")´