Spaces:
Build error
Build error
Download src/langgraph_agenticai/tools/search_tool.py from msaifee/Agentic-AI: direct link, hf CLI and curl.
- Browser
- Download file 413 Bytes
-
https://huggingface.co/spaces/msaifee/Agentic-AI/resolve/main/src/langgraph_agenticai/tools/search_tool.py
- Command line
-
hf download hf://spaces/msaifee/Agentic-AI/src/langgraph_agenticai/tools/search_tool.py
-
curl -L -o search_tool.py https://huggingface.co/spaces/msaifee/Agentic-AI/resolve/main/src/langgraph_agenticai/tools/search_tool.py
413 Bytes
| from langchain_community.tools.tavily_search import TavilySearchResults | |
| from langgraph.prebuilt import ToolNode | |
| def get_tools(): | |
| """ | |
| Returls list of tolls 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) | |