Team Ai
Apppublic

Sam2425/langgraphproject

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
search_tool.py17 linesDownload Raw Back to tools
1from langchain_community.tools.tavily_search import TavilySearchResults2from langgraph.prebuilt import ToolNode3 4def get_tools():5    """6    Get the tools for the agent.7    """8    tools = TavilySearchResults(max_results=5,include_answer=True,9    include_raw_content=True,10    include_images=True)11    return[tools]12 13def create_tool_node(tools):14    """15    Create the tool node for the agent.16    """17    return ToolNode(tools=tools)