RichardHu commited on
Commit
7fce2c7
Β·
verified Β·
1 Parent(s): 7606a74

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +6 -0
tools.py CHANGED
@@ -59,6 +59,12 @@ from langchain.tools import Tool
59
  from huggingface_hub import list_models
60
  import random
61
 
 
 
 
 
 
 
62
  def get_weather_info(location: str) -> str:
63
  """Fetches dummy weather information for a given location."""
64
  # Dummy weather data
 
59
  from huggingface_hub import list_models
60
  import random
61
 
62
+ from langchain_community.tools import DuckDuckGoSearchRun
63
+
64
+ search_tool = DuckDuckGoSearchRun()
65
+ results = search_tool.invoke("Who's the current President of France?")
66
+ print(results)
67
+
68
  def get_weather_info(location: str) -> str:
69
  """Fetches dummy weather information for a given location."""
70
  # Dummy weather data