Fix GPU Cache

This commit is contained in:
Raven Scott 2023-05-23 14:56:21 +02:00
parent 099dbf908b
commit 7102bf32f0
2 changed files with 12 additions and 2 deletions

View File

@ -51,4 +51,6 @@ REPEAT_PENALTY=1
GPU=1 GPU=1
N_GPU_LAYERS=32 N_GPU_LAYERS=32
PYTHONUNBUFFERED=1

View File

@ -347,6 +347,7 @@ async function generateResponse(conversation, message) {
// if the message object doesn't exist, create it // if the message object doesn't exist, create it
if (!botMessage) { if (!botMessage) {
(async () => { (async () => {
//if (time == 0) return
botMessage = await message.channel.send({ embeds: [embedData] }); botMessage = await message.channel.send({ embeds: [embedData] });
})(); })();
} else { } else {
@ -408,10 +409,17 @@ async function generateResponse(conversation, message) {
// if the message object doesn't exist, create it // if the message object doesn't exist, create it
if (!botMessage) { if (!botMessage) {
(async () => { (async () => {
//if (time == 0) return
botMessage = await message.channel.send({ embeds: [embedData] }); botMessage = await message.channel.send({ embeds: [embedData] });
})(); })();
} else { } else {
botMessage.edit({ embeds: [embedData] }); // otherwise, update the message (async () => {
if (!isAnyConversationBusy()) {
botMessage.delete()
} else {
await botMessage.edit({ embeds: [embedData] }); // otherwise, update the message
}
})();
} }
}) })
} }