Llama-Chat-Example-AliA / search_agent.py
AliA1997
Integrated multi-agent workflow from llama index.
5dde853
raw
history blame contribute delete
298 Bytes
from llama_index.core.tools import FunctionTool
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
def init_search_tool():
search_tool_spec = DuckDuckGoSearchToolSpec()
search_tool = FunctionTool.from_defaults(search_tool_spec.duckduckgo_full_search)
return search_tool