File size: 292 Bytes
1649601
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13

from langchain_community.tools import DuckDuckGoSearchRun


def DuckDuckGo(query):
    search_tool = DuckDuckGoSearchRun()
    results = search_tool.invoke(query)
    return results


if __name__ == "__main__":
    response = DuckDuckGo("who is the presindent of France")
    print(response)