|
|
@ -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>" |
|
|
|