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:
parent
6f9f74dae0
commit
0d532d147b
1 changed files with 2 additions and 2 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue