mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
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
This commit is contained in:
@@ -46,6 +46,12 @@ When assembling a crew, you combine agents with complementary roles and tools, a
|
|||||||
```python
|
```python
|
||||||
from crewai import Crew, Agent, Task, Process
|
from crewai import Crew, Agent, Task, Process
|
||||||
from langchain_community.tools import DuckDuckGoSearchRun
|
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
|
# Define agents with specific roles and tools
|
||||||
researcher = Agent(
|
researcher = Agent(
|
||||||
@@ -56,7 +62,7 @@ researcher = Agent(
|
|||||||
to the business.
|
to the business.
|
||||||
You're currently working on a project to analyze the
|
You're currently working on a project to analyze the
|
||||||
trends and innovations in the space of artificial intelligence.""",
|
trends and innovations in the space of artificial intelligence.""",
|
||||||
tools=[DuckDuckGoSearchRun()]
|
tools=[search]
|
||||||
)
|
)
|
||||||
|
|
||||||
writer = Agent(
|
writer = Agent(
|
||||||
|
|||||||
Reference in New Issue
Block a user