From ef92492d8c1bd42ca3955335f34d16751d935db9 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Mon, 26 Jun 2023 13:37:18 -0400 Subject: [PATCH] Add better warnings and links. --- gpt4all-chat/main.qml | 5 ++-- gpt4all-chat/qml/LocalDocs.qml | 5 ++-- gpt4all-chat/qml/PopupDialog.qml | 2 +- gpt4all-chat/qml/SettingsDialog.qml | 46 ++++++++++++++++++++++++++++- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/gpt4all-chat/main.qml b/gpt4all-chat/main.qml index 37a9dea4..3f35258a 100644 --- a/gpt4all-chat/main.qml +++ b/gpt4all-chat/main.qml @@ -125,8 +125,8 @@ Window { + qsTr("this program. In particular, it does not support AVX intrinsics which this ") + qsTr("program requires to successfully run a modern large language model. ") + qsTr("The only solution at this time is to upgrade your hardware to a more modern CPU.") - + qsTr("

See here for more information: ") - + qsTr("https://en.wikipedia.org/wiki/Advanced_Vector_Extensions") + + qsTr("

See here for more information: ") + + qsTr("https://en.wikipedia.org/wiki/Advanced_Vector_Extensions") } StartupDialog { @@ -165,6 +165,7 @@ Window { + "
  • Check the model file is complete in the download folder" + "
  • You can find the download folder in the settings dialog" + "
  • If you've sideloaded the model ensure the file is not corrupt by checking md5sum" + + "
  • Read more about what models are supported in our documentation for the gui" + "
  • Check out our discord channel for help") } diff --git a/gpt4all-chat/qml/LocalDocs.qml b/gpt4all-chat/qml/LocalDocs.qml index d62ddc82..1fd2dfd9 100644 --- a/gpt4all-chat/qml/LocalDocs.qml +++ b/gpt4all-chat/qml/LocalDocs.qml @@ -292,11 +292,12 @@ Item { Layout.row: 1 Layout.column: 2 Layout.rowSpan: 2 - Layout.maximumWidth: 330 + Layout.maximumWidth: 520 Layout.alignment: Qt.AlignTop color: theme.textErrorColor wrapMode: Text.WordWrap - text: qsTr("Warning: Advanced users only. Values too large may cause localdocs to fail or result in extremely slow responses.") + text: qsTr("Warning: Advanced usage only. Values too large may cause localdocs failure, extremely slow responses or failure to respond at all. Roughly speaking, the {N chars x N snippets} are added to the model's context window. More info here.") + onLinkActivated: function(link) { Qt.openUrlExternally(link) } } MyButton { diff --git a/gpt4all-chat/qml/PopupDialog.qml b/gpt4all-chat/qml/PopupDialog.qml index cda30d1a..6c67bdb2 100644 --- a/gpt4all-chat/qml/PopupDialog.qml +++ b/gpt4all-chat/qml/PopupDialog.qml @@ -37,7 +37,7 @@ Dialog { Accessible.role: Accessible.HelpBalloon Accessible.name: text Accessible.description: qsTr("Reveals a shortlived help balloon") - onLinkActivated: { Qt.openUrlExternally("https://discord.gg/4M2QFmTt2k") } + onLinkActivated: function(link) { Qt.openUrlExternally(link) } } MyBusyIndicator { diff --git a/gpt4all-chat/qml/SettingsDialog.qml b/gpt4all-chat/qml/SettingsDialog.qml index eb0b9601..7d9c18d3 100644 --- a/gpt4all-chat/qml/SettingsDialog.qml +++ b/gpt4all-chat/qml/SettingsDialog.qml @@ -782,9 +782,53 @@ Dialog { ToolTip.text: qsTr("WARNING: This enables the gui to act as a local REST web server(OpenAI API compliant) for API requests and will increase your RAM usage as well") ToolTip.visible: hovered } - MyButton { + Rectangle { Layout.row: 7 + Layout.column: 0 + Layout.columnSpan: 3 + Layout.fillWidth: true + height: 1 + color: theme.dialogBorder + } + Rectangle { + Layout.row: 9 + Layout.column: 0 + Layout.fillWidth: true + Layout.columnSpan: 3 + height: 1 + color: theme.dialogBorder + } + Label { + id: gpuOverrideLabel + text: qsTr("Force GPU if detected:") + color: theme.textColor + Layout.row: 8 + Layout.column: 0 + } + RowLayout { + Layout.row: 8 Layout.column: 1 + Layout.columnSpan: 2 + MyCheckBox { + id: gpuOverrideBox + checked: false + onClicked: { + // fixme + } + } + Label { + id: warningLabel + Layout.maximumWidth: 730 + Layout.alignment: Qt.AlignTop + color: theme.textErrorColor + wrapMode: Text.WordWrap + text: qsTr("WARNING: This setting forces usage of the GPU if it is detected. Can cause a crash if the model requires more RAM than the OS + GPU supports.") + } + } + MyButton { + Layout.row: 10 + Layout.column: 1 + Layout.columnSpan: 2 Layout.fillWidth: true text: qsTr("Restore Defaults") Accessible.description: qsTr("Restores the settings dialog to a default state")