|
|
@ -76,8 +76,10 @@ async def generate_sync( |
|
|
|
reply = answer[:idx].strip() |
|
|
|
else: |
|
|
|
reply = answer.removesuffix('<|endoftext|>').strip() |
|
|
|
reply = reply.replace("\n{bot.name}: ", " ") |
|
|
|
reply = reply.replace("\n<BOT>: ", " ") |
|
|
|
reply = reply.replace("\\n{bot.name}: ", " ") |
|
|
|
reply = reply.replace("\\n<BOT>: ", " ") |
|
|
|
reply = reply.replace("<BOT>", "{bot.name}") |
|
|
|
reply = reply.replace("<USER>", "You") |
|
|
|
return reply |
|
|
|
else: |
|
|
|
err_msg = r_json["error"] if "error" in r_json else "" |
|
|
|