Spaces:
Build error
Build error
Download src/langgraphagenticai/tools/search_tool.py from Techiiot/sandeep_basic_chatbot: direct link, hf CLI and curl.
- Browser
- Download file 483 Bytes
-
https://huggingface.co/spaces/Techiiot/sandeep_basic_chatbot/resolve/main/src/langgraphagenticai/tools/search_tool.py
- Command line
-
hf download hf://spaces/Techiiot/sandeep_basic_chatbot/src/langgraphagenticai/tools/search_tool.py
-
curl -L -o search_tool.py https://huggingface.co/spaces/Techiiot/sandeep_basic_chatbot/resolve/main/src/langgraphagenticai/tools/search_tool.py
483 Bytes
| from langchain_community.tools.tavily_search import TavilySearchResults | |
| from langgraph.prebuilt import ToolNode | |
| ## create a new search tool if u want to add more tools u can add them in tools [] list | |
| 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) |