Trying to strip out Reginald: deliberately

This commit is contained in:
AllfatherHatt 2025-02-20 21:55:25 +01:00
parent 2c897fbc9f
commit aaad4a6ead

View File

@ -144,7 +144,13 @@ class ReginaldCog(commands.Cog):
if not response.choices:
return "I fear I have no words to offer at this time."
return response.choices[0].message.content.strip()
response_text = response.choices[0].message.content.strip()
# ✅ Ensure Reginald does not preface responses with "Reginald:"
if response_text.startswith("Reginald:"):
response_text = response_text[len("Reginald:"):].strip()
return response_text
except OpenAIError as e:
error_message = f"OpenAI Error: {e}"