Download src/langgraphagenticai/tools/serach_tool.py from Krish9494/AgenticAI: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/spaces/Krish9494/AgenticAI/resolve/main/src/langgraphagenticai/tools/serach_tool.py
- Command line
-
hf download hf://spaces/Krish9494/AgenticAI/src/langgraphagenticai/tools/serach_tool.py
-
curl -L -o serach_tool.py https://huggingface.co/spaces/Krish9494/AgenticAI/resolve/main/src/langgraphagenticai/tools/serach_tool.py
393 Bytes
| from langchain_community.tools.tavily_search import TavilySearchResults | |
| 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) |