Add a reset context feature to clear the chat history and the context for now.

This commit is contained in:
Adam Treat
2023-04-10 17:13:22 -04:00
parent bbc00a5ea8
commit b1b7744241
4 changed files with 43 additions and 4 deletions

3
llm.h
View File

@@ -18,6 +18,7 @@ public:
bool loadModel();
bool isModelLoaded() const;
void resetResponse();
void resetContext();
void stopGenerating() { m_stopGenerating = true; }
QString response() const;
@@ -53,6 +54,7 @@ public:
Q_INVOKABLE bool isModelLoaded() const;
Q_INVOKABLE void prompt(const QString &prompt);
Q_INVOKABLE void resetContext();
Q_INVOKABLE void resetResponse();
Q_INVOKABLE void stopGenerating();
@@ -65,6 +67,7 @@ Q_SIGNALS:
void responseInProgressChanged();
void promptRequested(const QString &prompt);
void resetResponseRequested();
void resetContextRequested();
private Q_SLOTS:
void responseStarted();