Browse Source

fix name replacements

master
Hendrik Langer 2 years ago
parent
commit
8e9bbb1379
  1. 6
      matrix_pygmalion_bot/ai/runpod_pygmalion.py

6
matrix_pygmalion_bot/ai/runpod_pygmalion.py

@ -56,8 +56,8 @@ async def generate_sync(
reply = answer[:idx].strip() reply = answer[:idx].strip()
else: else:
reply = answer.removesuffix('<|endoftext|>').strip() reply = answer.removesuffix('<|endoftext|>').strip()
reply.replace("\n{bot_name}: ", " ") reply = reply.replace("\n{bot_name}: ", " ")
reply.replace("\n<BOT>: ", " ") reply = reply.replace("\n<BOT>: ", " ")
return reply return reply
elif status == 'IN_PROGRESS' or status == 'IN_QUEUE': elif status == 'IN_PROGRESS' or status == 'IN_QUEUE':
job_id = r_json["id"] job_id = r_json["id"]
@ -84,7 +84,7 @@ async def generate_sync(
else: else:
reply = answer.removesuffix('<|endoftext|>').strip() reply = answer.removesuffix('<|endoftext|>').strip()
reply = reply.replace("\n{bot_name}: ", " ") reply = reply.replace("\n{bot_name}: ", " ")
reply.replace("\n<BOT>: ", " ") reply = reply.replace("\n<BOT>: ", " ")
return reply return reply
else: else:
return "<ERROR>" return "<ERROR>"

Loading…
Cancel
Save