Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,17 +34,17 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
@tool
|
| 37 |
-
def
|
| 38 |
"""A tool that fetches the search queries to a search engine
|
| 39 |
Args:
|
| 40 |
-
|
| 41 |
"""
|
| 42 |
try:
|
| 43 |
# Create timezone object
|
| 44 |
-
ans = DuckDuckGoSearchTool(
|
| 45 |
-
return f"The answer for {
|
| 46 |
except Exception as e:
|
| 47 |
-
return f"Error fetching time for the online answer for': {
|
| 48 |
|
| 49 |
final_answer = FinalAnswerTool()
|
| 50 |
|
|
|
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
@tool
|
| 37 |
+
def search(query:str)->str:
|
| 38 |
"""A tool that fetches the search queries to a search engine
|
| 39 |
Args:
|
| 40 |
+
query: A string representing the search queries (e.g., 'Who is the name of Indonesian third president)'
|
| 41 |
"""
|
| 42 |
try:
|
| 43 |
# Create timezone object
|
| 44 |
+
ans = DuckDuckGoSearchTool(query)
|
| 45 |
+
return f"The answer for {query} is: {ans}"
|
| 46 |
except Exception as e:
|
| 47 |
+
return f"Error fetching time for the online answer for': {query}"
|
| 48 |
|
| 49 |
final_answer = FinalAnswerTool()
|
| 50 |
|