From 1217bfae674f6aafd9014c27db5c6a8754d50b28 Mon Sep 17 00:00:00 2001 From: Kingston-SCYD Date: Sun, 16 Aug 2026 23:26:13 -0500 Subject: [PATCH] Debug: show raw API response when empty --- assistant/assistant.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assistant/assistant.py b/assistant/assistant.py index 62eefaf..ce43901 100644 --- a/assistant/assistant.py +++ b/assistant/assistant.py @@ -172,7 +172,10 @@ class Assistant(commands.Cog): try: reply = data["choices"][0]["message"]["content"] except (KeyError, IndexError): - return "Unexpected API response." + return f"Unexpected API response: {str(data)[:300]}" + + if not reply: + return f"Empty response. Raw: {str(data)[:300]}" self.history[key].append({"role": "assistant", "content": reply})