agenticAI / src /langgraph_agenticAI /Tools /search_tools.py
Shivi14321's picture
FInal changes2
375e7cf
Raw
History Blame Contribute Delete
434 Bytes
from langchain_community.tools.tavily_search import TavilySearchResults #also user serper api for search engine
from langgraph.prebuilt import ToolNode
def get_tools():
"""
Return the list of tools to be used in the chatbot
"""
tools=[TavilySearchResults(max_results=2)]
return tools
def create_tool_node(tools):
"""
creates and returns a tool node for the graph
"""
return ToolNode(tools=tools)