mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-22 13:41:08 +00:00
Consolidate these into single api from qml to backend.
This commit is contained in:
parent
4d87c46948
commit
ed59190e48
8
chat.cpp
8
chat.cpp
@ -32,7 +32,10 @@ Chat::Chat(QObject *parent)
|
|||||||
|
|
||||||
void Chat::reset()
|
void Chat::reset()
|
||||||
{
|
{
|
||||||
|
stopGenerating();
|
||||||
|
emit resetContextRequested(); // blocking queued connection
|
||||||
m_id = Network::globalInstance()->generateUniqueId();
|
m_id = Network::globalInstance()->generateUniqueId();
|
||||||
|
emit idChanged();
|
||||||
m_chatModel->clear();
|
m_chatModel->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,11 +60,6 @@ void Chat::resetResponse()
|
|||||||
emit resetResponseRequested(); // blocking queued connection
|
emit resetResponseRequested(); // blocking queued connection
|
||||||
}
|
}
|
||||||
|
|
||||||
void Chat::resetContext()
|
|
||||||
{
|
|
||||||
emit resetContextRequested(); // blocking queued connection
|
|
||||||
}
|
|
||||||
|
|
||||||
void Chat::stopGenerating()
|
void Chat::stopGenerating()
|
||||||
{
|
{
|
||||||
m_llmodel->stopGenerating();
|
m_llmodel->stopGenerating();
|
||||||
|
1
chat.h
1
chat.h
@ -35,7 +35,6 @@ public:
|
|||||||
float temp, int32_t n_batch, float repeat_penalty, int32_t repeat_penalty_tokens);
|
float temp, int32_t n_batch, float repeat_penalty, int32_t repeat_penalty_tokens);
|
||||||
Q_INVOKABLE void regenerateResponse();
|
Q_INVOKABLE void regenerateResponse();
|
||||||
Q_INVOKABLE void resetResponse();
|
Q_INVOKABLE void resetResponse();
|
||||||
Q_INVOKABLE void resetContext();
|
|
||||||
Q_INVOKABLE void stopGenerating();
|
Q_INVOKABLE void stopGenerating();
|
||||||
Q_INVOKABLE void syncThreadCount();
|
Q_INVOKABLE void syncThreadCount();
|
||||||
Q_INVOKABLE void setThreadCount(int32_t n_threads);
|
Q_INVOKABLE void setThreadCount(int32_t n_threads);
|
||||||
|
Loading…
Reference in New Issue
Block a user