Problem while using duckduck go as a search tool

searcher = Agent(
role = “Content Searcher”,
goal = “Search for online content about AI Agents”,
backstory = "You will be working on creating articles for LinkedIn about AI agents. ",
llm = my_llm,
verbose=True,
allow_delegate=False,
tools = [search_tool]
)
the error
ValidationError Traceback (most recent call last)
in <cell line: 0>()
----> 1 searcher = Agent(
2 role = “Content Searcher”,
3 goal = “Search for online content about AI Agents”,
4 backstory = "You will be working on creating articles for LinkedIn about AI agents. ",
5 llm = my_llm,

/usr/local/lib/python3.11/dist-packages/pydantic/main.py in init(self, **data)
251 # tracebackhide tells pytest and some other tools to omit this function from tracebacks
252 tracebackhide = True
→ 253 validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
254 if self is not validated_self:
255 warnings.warn(

ValidationError: 1 validation error for Agent
tools.0

Guys it fixed now just did a few changes as read from the community page
added this:
searcher = Agent(
role = “Content Searcher”,
goal = “Search for online content about AI Agents”,
backstory = "You will be working on creating articles for LinkedIn about AI agents. ",
llm = my_llm,
verbose=True,
allow_delegate=False,
tools=[MyCustomDuckDuckGoTool()]
)

instead of tools = [search_tool]
replaced it with tools=[MyCustomDuckDuckGoTool()]

1 Like