Get rid of blocking behavior for regenerate response.

This commit is contained in:
Adam Treat
2023-05-30 18:17:59 -04:00
parent 0e82d87032
commit 26afbde1ae
4 changed files with 4 additions and 12 deletions

View File

@@ -146,7 +146,7 @@ bool ChatLLM::loadModel(const QString &modelName)
// We have a live model, but it isn't the one we want
bool alreadyAcquired = isModelLoaded();
if (alreadyAcquired) {
resetContextProtected();
resetContext();
#if defined(DEBUG_MODEL_LOADING)
qDebug() << "already acquired model deleted" << m_chat->id() << m_modelInfo.model;
#endif
@@ -301,12 +301,6 @@ void ChatLLM::resetResponse()
}
void ChatLLM::resetContext()
{
resetContextProtected();
emit sendResetContext();
}
void ChatLLM::resetContextProtected()
{
regenerateResponse();
m_ctx = LLModel::PromptContext();