Add Logs
This commit is contained in:
parent
cf88959576
commit
db19c4f4f8
1 changed files with 2 additions and 0 deletions
|
@ -72,6 +72,7 @@ async def smd_detail_article(article_id):
|
||||||
summarized_content = await summarize_to_words(title=data.get("title"), text=data.get("text"), target_word_count=10000)
|
summarized_content = await summarize_to_words(title=data.get("title"), text=data.get("text"), target_word_count=10000)
|
||||||
execution_time = time.perf_counter() - start_time
|
execution_time = time.perf_counter() - start_time
|
||||||
logger.info(f"smd_detail_article executed in {execution_time:.2f} seconds.")
|
logger.info(f"smd_detail_article executed in {execution_time:.2f} seconds.")
|
||||||
|
logger.info(f"smd_article_summarization {summarized_content}")
|
||||||
return {
|
return {
|
||||||
"message": summarized_content,
|
"message": summarized_content,
|
||||||
"article_id": article_id
|
"article_id": article_id
|
||||||
|
@ -148,6 +149,7 @@ async def smd_research(search_query: str = "Bundesrat", date_from: str = "2024-0
|
||||||
if article_id:
|
if article_id:
|
||||||
tasks.append(smd_detail_article(article_id))
|
tasks.append(smd_detail_article(article_id))
|
||||||
detailed_articles = await asyncio.gather(*tasks)
|
detailed_articles = await asyncio.gather(*tasks)
|
||||||
|
logger.info(f"detailed_articles {detailed_articles}")
|
||||||
return {
|
return {
|
||||||
"related_persons": facets.get("persons", []),
|
"related_persons": facets.get("persons", []),
|
||||||
"related_organizations": facets.get("persons", []),
|
"related_organizations": facets.get("persons", []),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue