Spaces:
Runtime error
Runtime error
added missing docstrings to gather_news_doctor() in crew.py
Browse files
crew.py
CHANGED
|
@@ -301,7 +301,7 @@ def explain_dementia_risk_lifestyle(docID: str) -> str:
|
|
| 301 |
@tool("gather_news_patient")
|
| 302 |
def gather_news_patient(count: int = 5) -> dict: # ← Change return type to dict
|
| 303 |
"""
|
| 304 |
-
Gathers recent dementia news articles
|
| 305 |
"""
|
| 306 |
from webscraper import search_dementia_news, scrape_article_content
|
| 307 |
articles = search_dementia_news(audience="patient", max_results=min(count, 10))
|
|
@@ -320,7 +320,10 @@ def gather_news_patient(count: int = 5) -> dict: # ← Change return type to di
|
|
| 320 |
return {"articles": clean_articles} # ← Return dict, not JSON string
|
| 321 |
|
| 322 |
@tool("gather_news_doctor")
|
| 323 |
-
def gather_news_doctor(count: int = 5) -> dict:
|
|
|
|
|
|
|
|
|
|
| 324 |
from webscraper import search_dementia_news, scrape_article_content
|
| 325 |
articles = search_dementia_news(audience="doctor", max_results=min(count, 10))
|
| 326 |
clean_articles = []
|
|
|
|
| 301 |
@tool("gather_news_patient")
|
| 302 |
def gather_news_patient(count: int = 5) -> dict: # ← Change return type to dict
|
| 303 |
"""
|
| 304 |
+
Gathers recent dementia news articles which are relevant patients. Returns structured dict.
|
| 305 |
"""
|
| 306 |
from webscraper import search_dementia_news, scrape_article_content
|
| 307 |
articles = search_dementia_news(audience="patient", max_results=min(count, 10))
|
|
|
|
| 320 |
return {"articles": clean_articles} # ← Return dict, not JSON string
|
| 321 |
|
| 322 |
@tool("gather_news_doctor")
|
| 323 |
+
def gather_news_doctor(count: int = 5) -> dict:
|
| 324 |
+
"""
|
| 325 |
+
Gathers recent dementia news articles which are relevant doctors. Returns structured dict.
|
| 326 |
+
"""
|
| 327 |
from webscraper import search_dementia_news, scrape_article_content
|
| 328 |
articles = search_dementia_news(audience="doctor", max_results=min(count, 10))
|
| 329 |
clean_articles = []
|