jproman commited on
Commit
1649601
·
1 Parent(s): 05919ff

duckduckgo test

Browse files
Files changed (2) hide show
  1. requirements.txt +6 -1
  2. utils.py +13 -0
requirements.txt CHANGED
@@ -1,3 +1,8 @@
1
  gradio
2
  requests
3
- gradio[oauth]
 
 
 
 
 
 
1
  gradio
2
  requests
3
+ gradio[oauth]
4
+ langgraph
5
+ langchain_openai
6
+ langchain_huggingface
7
+ langchain-community
8
+ duckduckgo-search
utils.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ from langchain_community.tools import DuckDuckGoSearchRun
3
+
4
+
5
+ def DuckDuckGo(query):
6
+ search_tool = DuckDuckGoSearchRun()
7
+ results = search_tool.invoke(query)
8
+ return results
9
+
10
+
11
+ if __name__ == "__main__":
12
+ response = DuckDuckGo("who is the presindent of France")
13
+ print(response)