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()
else:
reply = answer.removesuffix('<|endoftext|>').strip()
reply.replace("\n{bot_name}: ", " ")
reply.replace("\n<BOT>: ", " ")
reply = reply.replace("\n{bot_name}: ", " ")
reply = reply.replace("\n<BOT>: ", " ")
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<BOT>: ", " ")
reply = reply.replace("\n<BOT>: ", " ")
return reply
else:
return "<ERROR>"

Loading…
Cancel
Save