From da5faeb45117e043b22c76d95414d39e549bb628 Mon Sep 17 00:00:00 2001 From: Salman Faroz Date: Fri, 19 Jul 2024 10:07:24 +0530 Subject: [PATCH] Update Crews.md (#889) To solve : I encountered an error while trying to use the tool. This was the error: DuckDuckGoSearchRun._run() got an unexpected keyword argument 'q'. Tool duckduckgo_search accepts these inputs: A wrapper around DuckDuckGo Search. Useful for when you need to answer questions about current events. Input should be a search query. refer : https://github.com/joaomdmoura/crewAI/issues/316 --- docs/core-concepts/Crews.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/core-concepts/Crews.md b/docs/core-concepts/Crews.md index 5464f0f5e..ae658cb2f 100644 --- a/docs/core-concepts/Crews.md +++ b/docs/core-concepts/Crews.md @@ -46,6 +46,12 @@ When assembling a crew, you combine agents with complementary roles and tools, a ```python from crewai import Crew, Agent, Task, Process from langchain_community.tools import DuckDuckGoSearchRun +from crewai_tools import tool + +@tool('DuckDuckGoSearch') +def search(search_query: str): + """Search the web for information on a given topic""" + return DuckDuckGoSearchRun().run(search_query) # Define agents with specific roles and tools researcher = Agent( @@ -56,7 +62,7 @@ researcher = Agent( to the business. You're currently working on a project to analyze the trends and innovations in the space of artificial intelligence.""", - tools=[DuckDuckGoSearchRun()] + tools=[search] ) writer = Agent(