diff --git a/matrix_pygmalion_bot/ai/runpod_pygmalion.py b/matrix_pygmalion_bot/ai/runpod_pygmalion.py index 3e0db14..8883b62 100644 --- a/matrix_pygmalion_bot/ai/runpod_pygmalion.py +++ b/matrix_pygmalion_bot/ai/runpod_pygmalion.py @@ -56,8 +56,8 @@ async def generate_sync( reply = answer[:idx].strip() else: reply = answer.removesuffix('<|endoftext|>').strip() - reply.replace("\n{bot_name}: ", " ") - reply.replace("\n: ", " ") + reply = reply.replace("\n{bot_name}: ", " ") + reply = reply.replace("\n: ", " ") return reply elif status == 'IN_PROGRESS' or status == 'IN_QUEUE': job_id = r_json["id"] @@ -84,7 +84,7 @@ async def generate_sync( else: reply = answer.removesuffix('<|endoftext|>').strip() reply = reply.replace("\n{bot_name}: ", " ") - reply.replace("\n: ", " ") + reply = reply.replace("\n: ", " ") return reply else: return ""