Simplify server response handling by returning raw data.

Replaced the summarized content processing with direct data return. This improves efficiency by skipping the summarization step and ensures the full response data is available to the caller for further use.
This commit is contained in:
ThomasTaroni 2025-06-21 21:43:51 +02:00
parent 6f9f74dae0
commit 0d532d147b

View file

@ -65,8 +65,8 @@ async def smd_detail_article(article_id):
async with session.post(url, headers=headers, json=payload) as response:
if response.status == 200:
data = await response.json()
summarized_content = await summarize_to_words(title=data.get("title"), text=data.get("text"), target_word_count=10000)
return summarized_content
# summarized_content = await summarize_to_words(title=data.get("title"), text=data.get("text"), target_word_count=10000)
return data
else:
return {
"message": await response.text(),