Yac1n3 commited on
Commit
ca492e8
·
verified ·
1 Parent(s): fee87b9

duckduckgo

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,4 +1,5 @@
1
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
 
2
  import datetime
3
  import requests
4
  import pytz
@@ -25,7 +26,7 @@ def search_tool(query:str)-> str:
25
  query: A string representing a query
26
  """
27
  try:
28
- search = DuckDuckGoSearchRun()
29
  result = search.invoke(query)
30
  return f"I have found on the internet that {result} "
31
  except Exception as e:
 
1
+ from smolagents import CodeAgent, HfApiModel,load_tool,tool
2
+ from langchain_community.tools import DuckDuckGoSearchRun
3
  import datetime
4
  import requests
5
  import pytz
 
26
  query: A string representing a query
27
  """
28
  try:
29
+ search = DuckDuckGoSearchResults()
30
  result = search.invoke(query)
31
  return f"I have found on the internet that {result} "
32
  except Exception as e: