Spaces:
Runtime error
Runtime error
File size: 362 Bytes
d9b1770 |
1 2 3 4 5 6 7 8 9 10 11 |
from crewai_tools import BaseTool
from langchain_community.tools import DuckDuckGoSearchRun
class SearchDuckDuckGo(BaseTool):
name: str = "SearchDuckDuckGo"
description: str = "use DuckDuckGo to fetch some news"
def _run(self, question: str) -> str:
search = DuckDuckGoSearchRun()
result = search.run(question)
return result |