crewAI-tools icon indicating copy to clipboard operation
crewAI-tools copied to clipboard

Update csv_search_tool.py with support to use MultiCSV Search

Open amjadraza opened this issue 1 year ago • 4 comments

Extended the original feature of CSVSearchTool to MultiCSVSearchTool.

Use:

from crewai_tools import CSVSearchTool

# Initialize the tool with a specific CSV file. This setup allows the agent to search over given CSV files.
multi_csv_tool = CSVSearchTool(csv_list=['path/to/your/csvfile1.csv', 'path/to/your/csvfile2.csv'] )

amjadraza avatar Mar 19 '24 06:03 amjadraza

Hey @amjadraza! Thanks for the PR! It does make sense and we understand the use case.

I'm about to push a PR that's going to allow follow up adds to any rag tool, like so:

tool = CSVSearchTool()
tool.add("path/to/your/csvfile1.csv")
tool.add("path/to/your/csvfile2.csv")

Do you think it would be useful for you?

gvieira avatar Mar 19 '24 16:03 gvieira

Hey @amjadraza! Thanks for the PR! It does make sense and we understand the use case.

I'm about to push a PR that's going to allow follow up adds to any rag tool, like so:

tool = CSVSearchTool()
tool.add("path/to/your/csvfile1.csv")
tool.add("path/to/your/csvfile2.csv")

Do you think it would be useful for you?

Yes, it will have many use cases. I am using one right now.

Moreover, the RAG system may have a tool that can Ingest, any type of file format. e.g. csv, pdf, youtube, HTML, and txt. This is very well possible with embedchain anyway.

Would love to help if needed. Thanks

amjadraza avatar Mar 20 '24 00:03 amjadraza

Great to know, @amjadraza! The PR is live here https://github.com/joaomdmoura/crewAI-tools/pull/16, if you are curious.

Also, you could potentially use the generic RagTool. When my PR goes live you'll be able to simply call the add method like you would normally do for embedchain.

gvieira avatar Mar 20 '24 12:03 gvieira

Hey @amjadraza! The PR is live, although I'm still working on docs. Feel free to take a look at that and let me know if it's enough for you.

gvieira avatar Mar 21 '24 17:03 gvieira

@gvieira given your changes we probably don't want to merge this any longer?

joaomdmoura avatar May 02 '24 05:05 joaomdmoura

@joaomdmoura Yeah, I think this is now not needed anymore. Still, we appreciate the suggestion. Closing it.

gvieira avatar May 07 '24 15:05 gvieira