dmChatbotBackend / src /tools /web_tools.py
github-actions
Auto deploy from GitHub
76962bf
Raw
History Blame Contribute Delete
332 Bytes
from langchain_community.tools import DuckDuckGoSearchRun
def search_web(query: str) -> str:
"""Useful for searching the web for medical information or nutritional data."""
search = DuckDuckGoSearchRun()
return search.run(query)
# We can also use it as a standalone tool object
web_search_tool = DuckDuckGoSearchRun()