Fix bug with resetting context with chatgpt model.

This commit is contained in:
Adam Treat 2023-06-01 17:34:13 -04:00
parent 94633da2d7
commit 031d7149a7

View File

@ -297,6 +297,10 @@ void ChatLLM::resetResponse()
void ChatLLM::resetContext()
{
regenerateResponse();
if (m_isChatGPT && isModelLoaded()) {
ChatGPT *chatGPT = static_cast<ChatGPT*>(m_modelInfo.model);
chatGPT->setContext(QList<QString>());
}
m_ctx = LLModel::PromptContext();
}