2023-04-28 10:54:05 -04:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Basic
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import download
|
|
|
|
import network
|
|
|
|
import llm
|
2023-06-28 20:42:40 -04:00
|
|
|
import mysettings
|
2023-04-28 10:54:05 -04:00
|
|
|
|
2023-07-06 10:53:43 -04:00
|
|
|
MyDialog {
|
2023-04-28 10:54:05 -04:00
|
|
|
id: startupDialog
|
|
|
|
anchors.centerIn: parent
|
2023-04-29 03:55:06 -04:00
|
|
|
modal: true
|
2023-07-06 10:53:43 -04:00
|
|
|
padding: 10
|
2023-04-28 10:54:05 -04:00
|
|
|
width: 1024
|
2023-07-06 10:53:43 -04:00
|
|
|
height: column.height + 20
|
2023-04-29 03:55:06 -04:00
|
|
|
closePolicy: !optInStatisticsRadio.choiceMade || !optInNetworkRadio.choiceMade ? Popup.NoAutoClose : (Popup.CloseOnEscape | Popup.CloseOnPressOutside)
|
2023-04-28 10:54:05 -04:00
|
|
|
|
|
|
|
Theme {
|
|
|
|
id: theme
|
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
|
|
id: column
|
|
|
|
spacing: 20
|
|
|
|
Item {
|
|
|
|
width: childrenRect.width
|
|
|
|
height: childrenRect.height
|
|
|
|
Image {
|
|
|
|
id: img
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
width: 60
|
|
|
|
height: 60
|
|
|
|
source: "qrc:/gpt4all/icons/logo.svg"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
anchors.left: img.right
|
|
|
|
anchors.leftMargin: 30
|
|
|
|
anchors.verticalCenter: img.verticalCenter
|
|
|
|
text: qsTr("Welcome!")
|
|
|
|
color: theme.textColor
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-28 10:54:05 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
clip: true
|
|
|
|
height: 200
|
|
|
|
width: 1024 - 40
|
|
|
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
|
2024-01-22 14:41:47 -05:00
|
|
|
MyTextArea {
|
2023-04-28 10:54:05 -04:00
|
|
|
id: welcome
|
|
|
|
width: 1024 - 40
|
|
|
|
textFormat: TextEdit.MarkdownText
|
|
|
|
text: qsTr("### Release notes\n")
|
|
|
|
+ Download.releaseInfo.notes
|
|
|
|
+ qsTr("### Contributors\n")
|
|
|
|
+ Download.releaseInfo.contributors
|
|
|
|
focus: false
|
|
|
|
readOnly: true
|
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Release notes")
|
|
|
|
Accessible.description: qsTr("Release notes for this version")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
clip: true
|
|
|
|
height: 150
|
|
|
|
width: 1024 - 40
|
|
|
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
|
2024-01-22 14:41:47 -05:00
|
|
|
MyTextArea {
|
2023-04-28 10:54:05 -04:00
|
|
|
id: optInTerms
|
|
|
|
width: 1024 - 40
|
|
|
|
textFormat: TextEdit.MarkdownText
|
|
|
|
text: qsTr(
|
|
|
|
"### Opt-ins for anonymous usage analytics and datalake
|
|
|
|
By enabling these features, you will be able to participate in the democratic process of training a
|
|
|
|
large language model by contributing data for future model improvements.
|
|
|
|
|
2023-05-03 07:54:45 -04:00
|
|
|
When a GPT4All model responds to you and you have opted-in, your conversation will be sent to the GPT4All
|
|
|
|
Open Source Datalake. Additionally, you can like/dislike its response. If you dislike a response, you
|
|
|
|
can suggest an alternative response. This data will be collected and aggregated in the GPT4All Datalake.
|
2023-04-28 10:54:05 -04:00
|
|
|
|
|
|
|
NOTE: By turning on this feature, you will be sending your data to the GPT4All Open Source Datalake.
|
|
|
|
You should have no expectation of chat privacy when this feature is enabled. You should; however, have
|
|
|
|
an expectation of an optional attribution if you wish. Your chat data will be openly available for anyone
|
|
|
|
to download and will be used by Nomic AI to improve future GPT4All models. Nomic AI will retain all
|
|
|
|
attribution information attached to your data and you will be credited as a contributor to any GPT4All
|
|
|
|
model release that uses your data!")
|
|
|
|
|
|
|
|
focus: false
|
|
|
|
readOnly: true
|
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Terms for opt-in")
|
|
|
|
Accessible.description: qsTr("Describes what will happen when you opt-in")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
columns: 2
|
|
|
|
rowSpacing: 10
|
|
|
|
columnSpacing: 10
|
|
|
|
anchors.right: parent.right
|
|
|
|
Label {
|
|
|
|
id: optInStatistics
|
|
|
|
text: "Opt-in to anonymous usage analytics used to improve GPT4All"
|
|
|
|
Layout.row: 0
|
|
|
|
Layout.column: 0
|
2023-04-28 22:46:01 -04:00
|
|
|
color: theme.textColor
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-28 10:54:05 -04:00
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Opt-in for anonymous usage statistics")
|
|
|
|
}
|
|
|
|
|
2023-04-29 03:55:06 -04:00
|
|
|
ButtonGroup {
|
|
|
|
buttons: optInStatisticsRadio.children
|
|
|
|
onClicked: {
|
2023-06-28 20:42:40 -04:00
|
|
|
MySettings.networkUsageStatsActive = optInStatisticsRadio.checked
|
2023-07-11 10:53:19 -04:00
|
|
|
if (!optInStatisticsRadio.checked)
|
|
|
|
Network.sendOptOut();
|
2023-04-29 03:55:06 -04:00
|
|
|
if (optInNetworkRadio.choiceMade && optInStatisticsRadio.choiceMade)
|
|
|
|
startupDialog.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: optInStatisticsRadio
|
2023-04-28 10:54:05 -04:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
Layout.row: 0
|
|
|
|
Layout.column: 1
|
2023-04-29 03:55:06 -04:00
|
|
|
property alias checked: optInStatisticsRadioYes.checked
|
|
|
|
property bool choiceMade: optInStatisticsRadioYes.checked || optInStatisticsRadioNo.checked
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
id: optInStatisticsRadioYes
|
2023-06-26 09:35:29 -04:00
|
|
|
checked: false
|
2023-04-29 03:55:06 -04:00
|
|
|
text: qsTr("Yes")
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-29 03:55:06 -04:00
|
|
|
Accessible.role: Accessible.RadioButton
|
|
|
|
Accessible.name: qsTr("Opt-in for anonymous usage statistics")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Allow opt-in for anonymous usage statistics")
|
2023-04-29 04:06:26 -04:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 26
|
|
|
|
implicitHeight: 26
|
|
|
|
x: optInStatisticsRadioYes.leftPadding
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: 13
|
|
|
|
border.color: theme.dialogBorder
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 14
|
|
|
|
height: 14
|
|
|
|
x: 6
|
|
|
|
y: 6
|
|
|
|
radius: 7
|
|
|
|
color: theme.textColor
|
|
|
|
visible: optInStatisticsRadioYes.checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: Text {
|
|
|
|
text: optInStatisticsRadioYes.text
|
|
|
|
font: optInStatisticsRadioYes.font
|
|
|
|
opacity: enabled ? 1.0 : 0.3
|
|
|
|
color: theme.textColor
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
leftPadding: optInStatisticsRadioYes.indicator.width + optInStatisticsRadioYes.spacing
|
|
|
|
}
|
2023-04-29 03:55:06 -04:00
|
|
|
}
|
|
|
|
RadioButton {
|
|
|
|
id: optInStatisticsRadioNo
|
|
|
|
text: qsTr("No")
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-29 03:55:06 -04:00
|
|
|
Accessible.role: Accessible.RadioButton
|
|
|
|
Accessible.name: qsTr("Opt-out for anonymous usage statistics")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Allow opt-out for anonymous usage statistics")
|
2023-04-29 04:06:26 -04:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 26
|
|
|
|
implicitHeight: 26
|
|
|
|
x: optInStatisticsRadioNo.leftPadding
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: 13
|
|
|
|
border.color: theme.dialogBorder
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 14
|
|
|
|
height: 14
|
|
|
|
x: 6
|
|
|
|
y: 6
|
|
|
|
radius: 7
|
|
|
|
color: theme.textColor
|
|
|
|
visible: optInStatisticsRadioNo.checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: Text {
|
|
|
|
text: optInStatisticsRadioNo.text
|
|
|
|
font: optInStatisticsRadioNo.font
|
|
|
|
opacity: enabled ? 1.0 : 0.3
|
|
|
|
color: theme.textColor
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
leftPadding: optInStatisticsRadioNo.indicator.width + optInStatisticsRadioNo.spacing
|
|
|
|
}
|
2023-04-28 10:54:05 -04:00
|
|
|
}
|
|
|
|
}
|
2023-04-29 03:55:06 -04:00
|
|
|
|
2023-04-28 10:54:05 -04:00
|
|
|
Label {
|
|
|
|
id: optInNetwork
|
|
|
|
text: "Opt-in to anonymous sharing of chats to the GPT4All Datalake"
|
|
|
|
Layout.row: 1
|
|
|
|
Layout.column: 0
|
2023-04-28 22:46:01 -04:00
|
|
|
color: theme.textColor
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-28 10:54:05 -04:00
|
|
|
Accessible.role: Accessible.Paragraph
|
|
|
|
Accessible.name: qsTr("Opt-in for network")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Allow opt-in for network")
|
2023-04-28 10:54:05 -04:00
|
|
|
}
|
|
|
|
|
2023-04-29 03:55:06 -04:00
|
|
|
ButtonGroup {
|
|
|
|
buttons: optInNetworkRadio.children
|
|
|
|
onClicked: {
|
2023-06-28 20:42:40 -04:00
|
|
|
MySettings.networkIsActive = optInNetworkRadio.checked
|
2023-04-29 03:55:06 -04:00
|
|
|
if (optInNetworkRadio.choiceMade && optInStatisticsRadio.choiceMade)
|
|
|
|
startupDialog.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: optInNetworkRadio
|
2023-04-28 10:54:05 -04:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
Layout.row: 1
|
|
|
|
Layout.column: 1
|
2023-04-29 03:55:06 -04:00
|
|
|
property alias checked: optInNetworkRadioYes.checked
|
|
|
|
property bool choiceMade: optInNetworkRadioYes.checked || optInNetworkRadioNo.checked
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
id: optInNetworkRadioYes
|
2023-06-26 09:35:29 -04:00
|
|
|
checked: false
|
2023-04-29 03:55:06 -04:00
|
|
|
text: qsTr("Yes")
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-29 03:55:06 -04:00
|
|
|
Accessible.role: Accessible.RadioButton
|
|
|
|
Accessible.name: qsTr("Opt-in for network")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Allow opt-in anonymous sharing of chats to the GPT4All Datalake")
|
2023-04-29 04:06:26 -04:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 26
|
|
|
|
implicitHeight: 26
|
|
|
|
x: optInNetworkRadioYes.leftPadding
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: 13
|
|
|
|
border.color: theme.dialogBorder
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 14
|
|
|
|
height: 14
|
|
|
|
x: 6
|
|
|
|
y: 6
|
|
|
|
radius: 7
|
|
|
|
color: theme.textColor
|
|
|
|
visible: optInNetworkRadioYes.checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: Text {
|
|
|
|
text: optInNetworkRadioYes.text
|
|
|
|
font: optInNetworkRadioYes.font
|
|
|
|
opacity: enabled ? 1.0 : 0.3
|
|
|
|
color: theme.textColor
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
leftPadding: optInNetworkRadioYes.indicator.width + optInNetworkRadioYes.spacing
|
|
|
|
}
|
2023-04-29 03:55:06 -04:00
|
|
|
}
|
|
|
|
RadioButton {
|
|
|
|
id: optInNetworkRadioNo
|
|
|
|
text: qsTr("No")
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-29 03:55:06 -04:00
|
|
|
Accessible.role: Accessible.RadioButton
|
|
|
|
Accessible.name: qsTr("Opt-out for network")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Allow opt-out anonymous sharing of chats to the GPT4All Datalake")
|
2023-04-29 04:06:26 -04:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
|
|
|
|
indicator: Rectangle {
|
|
|
|
implicitWidth: 26
|
|
|
|
implicitHeight: 26
|
|
|
|
x: optInNetworkRadioNo.leftPadding
|
|
|
|
y: parent.height / 2 - height / 2
|
|
|
|
radius: 13
|
|
|
|
border.color: theme.dialogBorder
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 14
|
|
|
|
height: 14
|
|
|
|
x: 6
|
|
|
|
y: 6
|
|
|
|
radius: 7
|
|
|
|
color: theme.textColor
|
|
|
|
visible: optInNetworkRadioNo.checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contentItem: Text {
|
|
|
|
text: optInNetworkRadioNo.text
|
|
|
|
font: optInNetworkRadioNo.font
|
|
|
|
opacity: enabled ? 1.0 : 0.3
|
|
|
|
color: theme.textColor
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
leftPadding: optInNetworkRadioNo.indicator.width + optInNetworkRadioNo.spacing
|
|
|
|
}
|
2023-04-28 10:54:05 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|