Consolidate these into single api from qml to backend.

pull/520/head
Adam Treat 1 year ago
parent 4d87c46948
commit ed59190e48

@ -32,7 +32,10 @@ Chat::Chat(QObject *parent)
void Chat::reset()
{
stopGenerating();
emit resetContextRequested(); // blocking queued connection
m_id = Network::globalInstance()->generateUniqueId();
emit idChanged();
m_chatModel->clear();
}
@ -57,11 +60,6 @@ void Chat::resetResponse()
emit resetResponseRequested(); // blocking queued connection
}
void Chat::resetContext()
{
emit resetContextRequested(); // blocking queued connection
}
void Chat::stopGenerating()
{
m_llmodel->stopGenerating();

@ -35,7 +35,6 @@ public:
float temp, int32_t n_batch, float repeat_penalty, int32_t repeat_penalty_tokens);
Q_INVOKABLE void regenerateResponse();
Q_INVOKABLE void resetResponse();
Q_INVOKABLE void resetContext();
Q_INVOKABLE void stopGenerating();
Q_INVOKABLE void syncThreadCount();
Q_INVOKABLE void setThreadCount(int32_t n_threads);

@ -472,8 +472,6 @@ Window {
}
onClicked: {
LLM.currentChat.stopGenerating()
LLM.currentChat.resetContext()
LLM.currentChat.reset();
}
}

Loading…
Cancel
Save