Rimossi TODO e Aggiunto documentazione per metodi aggregated

This commit is contained in:
2025-10-04 01:28:16 +02:00
parent cc3a56cb6d
commit 42ec2e6eef
5 changed files with 22 additions and 4 deletions

View File

@@ -59,6 +59,8 @@ class NewsAPIsTool(NewsWrapper, Toolkit):
limit (int): Maximum number of articles to retrieve from each provider.
Returns:
dict[str, list[Article]]: A dictionary mapping providers names to their list of Articles
Raises:
Exception: If all wrappers fail to provide results.
"""
return self.wrapper_handler.try_call_all(lambda w: w.get_top_headlines(limit))
@@ -70,5 +72,7 @@ class NewsAPIsTool(NewsWrapper, Toolkit):
limit (int): Maximum number of articles to retrieve from each provider.
Returns:
dict[str, list[Article]]: A dictionary mapping providers names to their list of Articles
Raises:
Exception: If all wrappers fail to provide results.
"""
return self.wrapper_handler.try_call_all(lambda w: w.get_latest_news(query, limit))