diff --git a/src/phoenix_technologies/smd/server.py b/src/phoenix_technologies/smd/server.py index d86704e..45b89a8 100644 --- a/src/phoenix_technologies/smd/server.py +++ b/src/phoenix_technologies/smd/server.py @@ -49,7 +49,8 @@ async def summarize_to_words(text: str, title: str, target_word_count: int = 100 async with aiohttp.ClientSession() as session: async with session.post(url, headers=headers, json=payload) as response: if response.status == 200: - return await response.text() + data = await response.json() + return data.get("choices")[0].get("message").get("content") else: return await response.text()