No need for wrap user input into a json any more

This commit is contained in:
fiatrete
2023-06-16 15:58:57 +08:00
parent 0f3c1c187a
commit 947ed233c5
@@ -65,9 +65,6 @@ class GptAgent(BaseAgent):
# Send message to AI, get response
logger.debug(f"Trigger: {prompt}")
reply: Dict = None
# It seems that after the message is wrapped in JSON format,
# the probability that GPT will reply to the message in JSON format is much higher
prompt = json.dumps({"message": prompt})
for i in range(3):
try:
if i == 0: