diff --git a/gpt4all-chat/CHANGELOG.md b/gpt4all-chat/CHANGELOG.md index a3119d0c5597..ee952b38f31f 100644 --- a/gpt4all-chat/CHANGELOG.md +++ b/gpt4all-chat/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [3.6.1] - 2024-12-20 + +### Fixed +- Fix the stop generation button no longer working in v3.6.0 ([#3336](https://github.com/nomic-ai/gpt4all/pull/3336)) +- Fix the copy entire conversation button no longer working in v3.6.0 ([#3336](https://github.com/nomic-ai/gpt4all/pull/3336)) + ## [3.6.0] - 2024-12-19 ### Added @@ -239,6 +245,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Fix several Vulkan resource management issues ([#2694](https://github.com/nomic-ai/gpt4all/pull/2694)) - Fix crash/hang when some models stop generating, by showing special tokens ([#2701](https://github.com/nomic-ai/gpt4all/pull/2701)) +[3.6.1]: https://github.com/nomic-ai/gpt4all/compare/v3.6.0...v3.6.1 [3.6.0]: https://github.com/nomic-ai/gpt4all/compare/v3.5.3...v3.6.0 [3.5.3]: https://github.com/nomic-ai/gpt4all/compare/v3.5.2...v3.5.3 [3.5.2]: https://github.com/nomic-ai/gpt4all/compare/v3.5.1...v3.5.2 diff --git a/gpt4all-chat/CMakeLists.txt b/gpt4all-chat/CMakeLists.txt index 6a0ba02aeaf4..281a3672fc5b 100644 --- a/gpt4all-chat/CMakeLists.txt +++ b/gpt4all-chat/CMakeLists.txt @@ -6,7 +6,7 @@ set(APP_VERSION_MAJOR 3) set(APP_VERSION_MINOR 6) set(APP_VERSION_PATCH 1) set(APP_VERSION_BASE "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}") -set(APP_VERSION "${APP_VERSION_BASE}-dev0") +set(APP_VERSION "${APP_VERSION_BASE}") project(gpt4all VERSION ${APP_VERSION_BASE} LANGUAGES CXX C) diff --git a/gpt4all-chat/qml/ChatView.qml b/gpt4all-chat/qml/ChatView.qml index 431d63986f23..dfeeb18c2f29 100644 --- a/gpt4all-chat/qml/ChatView.qml +++ b/gpt4all-chat/qml/ChatView.qml @@ -37,10 +37,11 @@ Rectangle { Connections { target: currentChat - function onResponseInProgressChanged() { - if (MySettings.networkIsActive && !currentChat.responseInProgress) - Network.sendConversation(currentChat.id, getConversationJson()); - } + // FIXME: https://github.com/nomic-ai/gpt4all/issues/3334 + // function onResponseInProgressChanged() { + // if (MySettings.networkIsActive && !currentChat.responseInProgress) + // Network.sendConversation(currentChat.id, getConversationJson()); + // } function onModelLoadingErrorChanged() { if (currentChat.modelLoadingError !== "") modelLoadingErrorPopup.open() @@ -116,42 +117,44 @@ Rectangle { } } - function getConversation() { - var conversation = ""; - for (var i = 0; i < chatModel.count; i++) { - var item = chatModel.get(i) - var string = item.name; - var isResponse = item.name === "Response: " - string += chatModel.get(i).value - if (isResponse && item.stopped) - string += " " - string += "\n" - conversation += string - } - return conversation - } - - function getConversationJson() { - var str = "{\"conversation\": ["; - for (var i = 0; i < chatModel.count; i++) { - var item = chatModel.get(i) - var isResponse = item.name === "Response: " - str += "{\"content\": "; - str += JSON.stringify(item.value) - str += ", \"role\": \"" + (isResponse ? "assistant" : "user") + "\""; - if (isResponse && item.thumbsUpState !== item.thumbsDownState) - str += ", \"rating\": \"" + (item.thumbsUpState ? "positive" : "negative") + "\""; - if (isResponse && item.newResponse !== "") - str += ", \"edited_content\": " + JSON.stringify(item.newResponse); - if (isResponse && item.stopped) - str += ", \"stopped\": \"true\"" - if (!isResponse) - str += "}," - else - str += ((i < chatModel.count - 1) ? "}," : "}") - } - return str + "]}" - } + // FIXME: https://github.com/nomic-ai/gpt4all/issues/3334 + // function getConversation() { + // var conversation = ""; + // for (var i = 0; i < chatModel.count; i++) { + // var item = chatModel.get(i) + // var string = item.name; + // var isResponse = item.name === "Response: " + // string += chatModel.get(i).value + // if (isResponse && item.stopped) + // string += " " + // string += "\n" + // conversation += string + // } + // return conversation + // } + + // FIXME: https://github.com/nomic-ai/gpt4all/issues/3334 + // function getConversationJson() { + // var str = "{\"conversation\": ["; + // for (var i = 0; i < chatModel.count; i++) { + // var item = chatModel.get(i) + // var isResponse = item.name === "Response: " + // str += "{\"content\": "; + // str += JSON.stringify(item.value) + // str += ", \"role\": \"" + (isResponse ? "assistant" : "user") + "\""; + // if (isResponse && item.thumbsUpState !== item.thumbsDownState) + // str += ", \"rating\": \"" + (item.thumbsUpState ? "positive" : "negative") + "\""; + // if (isResponse && item.newResponse !== "") + // str += ", \"edited_content\": " + JSON.stringify(item.newResponse); + // if (isResponse && item.stopped) + // str += ", \"stopped\": \"true\"" + // if (!isResponse) + // str += "}," + // else + // str += ((i < chatModel.count - 1) ? "}," : "}") + // } + // return str + "]}" + // } ChatDrawer { id: chatDrawer @@ -932,10 +935,7 @@ Rectangle { visible: false } onClicked: { - var conversation = getConversation() - copyEdit.text = conversation - copyEdit.selectAll() - copyEdit.copy() + chatModel.copyToClipboard() copyMessage.open() } ToolTip.visible: copyChatButton.hovered @@ -1354,9 +1354,10 @@ Rectangle { ToolTip.text: Accessible.description onClicked: { - var index = Math.max(0, chatModel.count - 1); - var listElement = chatModel.get(index); - listElement.stopped = true + // FIXME: This no longer sets a 'stopped' field so conversations that + // are copied to clipboard or to datalake don't indicate if the user + // has prematurely stopped the response. This has been broken since + // v3.0.0 at least. currentChat.stopGenerating() } } diff --git a/gpt4all-chat/src/chatmodel.h b/gpt4all-chat/src/chatmodel.h index 82dbc68fdc7f..da898e965c75 100644 --- a/gpt4all-chat/src/chatmodel.h +++ b/gpt4all-chat/src/chatmodel.h @@ -982,6 +982,20 @@ class ChatModel : public QAbstractListModel emit hasErrorChanged(value); } + Q_INVOKABLE void copyToClipboard() + { + QMutexLocker locker(&m_mutex); + QString conversation; + for (ChatItem *item : m_chatItems) { + QString string = item->name; + string += item->clipboardContent(); + string += "\n"; + conversation += string; + } + QClipboard *clipboard = QGuiApplication::clipboard(); + clipboard->setText(conversation, QClipboard::Clipboard); + } + Q_INVOKABLE void copyToClipboard(int index) { QMutexLocker locker(&m_mutex);