From 5ba682c6f96df59c522bac032480494f22439bfc Mon Sep 17 00:00:00 2001 From: ThomasTaroni Date: Mon, 11 Aug 2025 13:21:27 +0200 Subject: [PATCH] Fix response keys in server API handlers Corrected the response to include 'article_url' and fixed a typo in 'related_organizations' mapping. These updates ensure accurate and complete API responses. --- src/phoenix_technologies/smd/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/phoenix_technologies/smd/server.py b/src/phoenix_technologies/smd/server.py index b42881c..9af07ae 100644 --- a/src/phoenix_technologies/smd/server.py +++ b/src/phoenix_technologies/smd/server.py @@ -75,7 +75,8 @@ async def smd_detail_article(article_id): logger.info(f"smd_article_summarization {summarized_content}") return { "message": summarized_content, - "article_id": article_id + "article_id": article_id, + "article_url": data.get("online"), } else: return { @@ -152,7 +153,7 @@ async def smd_research(search_query: str = "Bundesrat", date_from: str = "2024-0 logger.info(f"detailed_articles {detailed_articles}") return { "related_persons": facets.get("persons", []), - "related_organizations": facets.get("persons", []), + "related_organizations": facets.get("organization", []), "detailed_articles": detailed_articles } else: