add returns
Browse files
app.py
CHANGED
@@ -31,6 +31,8 @@ def get_habr_news(query: str = "") -> str:
|
|
31 |
"""Searches for news on Habr based on the given query. If no query is provided, it returns the latest news.
|
32 |
Args:
|
33 |
query: A string representing the search query for news on Habr.
|
|
|
|
|
34 |
"""
|
35 |
try:
|
36 |
if not query:
|
@@ -44,8 +46,6 @@ def get_habr_news(query: str = "") -> str:
|
|
44 |
else:
|
45 |
return "Error retrieving data from Habr. Please try again later."
|
46 |
except Exception as e:
|
47 |
-
return f"Error performing request: {str(e)}"
|
48 |
-
|
49 |
|
50 |
final_answer = FinalAnswerTool()
|
51 |
|
|
|
31 |
"""Searches for news on Habr based on the given query. If no query is provided, it returns the latest news.
|
32 |
Args:
|
33 |
query: A string representing the search query for news on Habr.
|
34 |
+
Returns:
|
35 |
+
str: A URL with the latest news or search results from Habr, or an error message in case of failure.
|
36 |
"""
|
37 |
try:
|
38 |
if not query:
|
|
|
46 |
else:
|
47 |
return "Error retrieving data from Habr. Please try again later."
|
48 |
except Exception as e:
|
|
|
|
|
49 |
|
50 |
final_answer = FinalAnswerTool()
|
51 |
|