aibtcdev / crew-generator

Crew Generator is a powerful tool that helps you create your own crew without any programming knowledge.
1 stars 0 forks source link

Use CrewAI BaseTool class #11

Open whoabuddy opened 1 day ago

whoabuddy commented 1 day ago

The errors you are getting with your crew are related to how you've defined BaseTool - it's actually something provided by the framework and formatted a little different from what you created here.

To create new tools for agents you can either subclass BaseTool (similar to what you've done now), or use the @tool decorator, both from CrewAI's pacakages.

  1. Install crewai_tools with your package manager
  2. Use from crewai_tools import BaseTool (and/or the tool decorator)

The documentation gives some examples on creating custom tools and the ai-agent-crew repo uses the @tool decorator, either way is acceptable.

biwasbhandari commented 1 day ago

I tried both methods and still got some errors. For now we'll use the tools defined in the docs only. I might need a little help and debugging from you in order to create custom tools.