Spaces:
Runtime error
Runtime error
Update tools.py
Browse files
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
|