Closed LarsAC closed 2 months ago
Could you try the tool DirectoryReadTool
This will allow the agent with this tool to read only the directory specified during it's execution tool = DirectoryReadTool(directory='./directory')
That does not seem to do what I want:
Action 'Read file' don't exist, these are the only available Actions: List files in directory: List files in directory() - A tool that can be used to list ./testdocs's content.
Thought:
Given that I only have the 'List files in directory' tool available and not a 'Read file' tool, I am unable to provide detailed, specific information about a new project in the automotive industry. However, I can provide a general structure for the article based on my experience and expertise in the field.
I encountered the same problem. Different files but same output by the FileReadTool, even though by manual inspection they have a completely different content.
Here is a response when attempting to read three different files:
[DEBUG]: Working Agent: Writer
[INFO]: Starting Task: Check if you have received feedback on the previous writing in feedback.txt, and then check if you have a previous writing in article.txt. If there is feedback, update the content in article.txt with the provided feedback. Otherwise, write an engaging and informative article based on the provided research report. Remember to cite your sources using the links provided in the report.
> Entering new CrewAgentExecutor chain...
Action: Read a file's content
Action Input: {"filename": "./article-materials/feedback.txt"}
No feedback here yet.
Thought: Since there's no feedback available in the feedback.txt file, my next step is to check if there's a previous writing in article.txt before I proceed to write a new article based on the provided research report.
Action: Read a file's content
Action Input: {"filename": "./article-materials/article.txt"}
No feedback here yet.
Thought: With no feedback in feedback.txt and a clarification that there is no previous writing in article.txt (as it mirrors the response in feedback.txt), the task is to write an engaging and informative article based on the provided research report. First, I need to read the content of the research findings to understand the details to be included in the article.
Action: Read a file's content
Action Input: {"filename": "./article-materials/research_findings.txt"}
No feedback here yet.
You can see the output here all shows the content of feedback.txt
and not other files.
we have encountered same issue. any plans when will it be fixed?
Why are you assign the two tasks to the same agent? Why not assign to an agent each?
Why are you assign the two tasks to the same agent? Why not assign to an agent each?
What do you mean? There is only one task for each agent, but an agent could access multiple tools (in this case, two file read tools, one for each file)
Sorry I meant tools, so for example each tool gets assigned to its own agent
is there any limit or problem if you assign more than one (fileread) tools in one agent ? to my knowledge, agents to tool mapping is not 1:1 or is it?
Thanks for your clarification in advance.
Hello. I am experiencing the same problem with the DirectoryReadTool
.
> Entering new CrewAgentExecutor chain...
From these variables, it seems like my task is to return the name of all the folders within the directory "output-files". For this, I can use the "List files in directory" tool.
Action: List files in directory
Action Input: {"directory": "./output-files"}
File paths:
-
Thought:
From the above observations, it seems that I am not allowed to use the tool to achieve the task. Without using the tool, I'm unable to gather the information needed to complete the task as I can't list the files in the directory.
Final Answer:
Unable to provide the final answer because the tool needed to perform the task is not allowed to be used.
Check this notebook to reproduce the error. https://colab.research.google.com/drive/1BvUQfXcr-gw-We07xRNpuqF0PgOr0eoP?usp=sharing
I just tested this in version 0.30.0rc3
and it still has problems.
Refer to this notebook for a quick reproduction of the issue: https://colab.research.google.com/drive/1BvUQfXcr-gw-We07xRNpuqF0PgOr0eoP?usp=sharing
I am still seeing the same problem in 0.30.11
Is there a fix or workaround?
1- Use FileReadTool
without any parameters and send it to the agent.
2- on the agent goal
add the files that you want to read like this
goal=f"""
Understand files. from
{path_storyline_01} and {path_toryline_02}
""",
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
I don't understand how can the issue be close without being solved....I have just used the last versions and have exactly the same problem!?
1- Use
FileReadTool
without any parameters and send it to the agent. 2- on the agentgoal
add the files that you want to read like thisgoal=f""" Understand files. from {path_storyline_01} and {path_toryline_02} """,
Imagine you have 20 or more files, this is crazy.....
1- Use
FileReadTool
without any parameters and send it to the agent. 2- on the agentgoal
add the files that you want to read like thisgoal=f""" Understand files. from {path_storyline_01} and {path_toryline_02} """,
This worked for me. Thank you.
Hello,
I have tried to set up a crew where one agent / task uses two FileReadTools with different file arguments:
However, execution of the crew runs into a message, that the two files have the same content, but in fact they are different:
Is this a bug or anything I need to modify on my end to use contents of two files in the same task / agent ?
Lars