2023-04-14 14:44:28 -04:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
2023-04-23 23:56:33 -04:00
|
|
|
import QtQuick.Controls.Basic
|
2023-04-14 14:44:28 -04:00
|
|
|
import QtQuick.Layouts
|
|
|
|
import download
|
|
|
|
import network
|
|
|
|
import llm
|
2023-06-28 20:42:40 -04:00
|
|
|
import mysettings
|
2023-04-14 14:44:28 -04:00
|
|
|
|
2023-07-06 10:53:43 -04:00
|
|
|
MyDialog {
|
2023-04-14 14:44:28 -04:00
|
|
|
id: networkDialog
|
|
|
|
anchors.centerIn: parent
|
|
|
|
modal: true
|
|
|
|
padding: 20
|
|
|
|
|
2023-04-23 09:42:35 -04:00
|
|
|
Theme {
|
|
|
|
id: theme
|
|
|
|
}
|
|
|
|
|
2023-04-14 14:44:28 -04:00
|
|
|
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
|
2024-06-28 17:11:12 -04:00
|
|
|
source: "qrc:/gpt4all/icons/gpt4all.svg"
|
2023-04-14 14:44:28 -04:00
|
|
|
}
|
|
|
|
Text {
|
|
|
|
anchors.left: img.right
|
|
|
|
anchors.leftMargin: 30
|
|
|
|
anchors.verticalCenter: img.verticalCenter
|
|
|
|
text: qsTr("Contribute data to the GPT4All Opensource Datalake.")
|
2023-04-23 09:42:35 -04:00
|
|
|
color: theme.textColor
|
2023-08-07 13:54:13 -04:00
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2023-04-14 14:44:28 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ScrollView {
|
|
|
|
clip: true
|
|
|
|
height: 300
|
|
|
|
width: 1024 - 40
|
|
|
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
|
2024-01-22 14:41:47 -05:00
|
|
|
MyTextArea {
|
2023-04-14 14:44:28 -04:00
|
|
|
id: textOptIn
|
|
|
|
width: 1024 - 40
|
2024-09-19 14:35:53 -04:00
|
|
|
text: qsTr("By enabling this feature, you will be able to participate in the democratic process of "
|
|
|
|
+ "training a large language model by contributing data for future model improvements.\n\n"
|
|
|
|
+ "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.\n\n"
|
|
|
|
+ "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!")
|
2023-04-14 14:44:28 -04:00
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-22 14:41:47 -05:00
|
|
|
MyTextField {
|
2023-04-14 14:44:28 -04:00
|
|
|
id: attribution
|
|
|
|
width: parent.width
|
2023-06-28 20:42:40 -04:00
|
|
|
text: MySettings.networkAttribution
|
2023-04-14 14:44:28 -04:00
|
|
|
placeholderText: qsTr("Please provide a name for attribution (optional)")
|
|
|
|
Accessible.role: Accessible.EditableText
|
|
|
|
Accessible.name: qsTr("Attribution (optional)")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Provide attribution")
|
2023-04-14 14:44:28 -04:00
|
|
|
onEditingFinished: {
|
2023-06-28 20:42:40 -04:00
|
|
|
MySettings.networkAttribution = attribution.text;
|
2023-04-14 14:44:28 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: DialogButtonBox {
|
|
|
|
id: dialogBox
|
|
|
|
padding: 20
|
|
|
|
alignment: Qt.AlignRight
|
|
|
|
spacing: 10
|
2024-01-22 14:41:47 -05:00
|
|
|
MySettingsButton {
|
2023-05-23 09:53:32 -04:00
|
|
|
text: qsTr("Enable")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Enable opt-in")
|
2023-04-14 14:44:28 -04:00
|
|
|
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
|
|
|
}
|
2024-01-22 14:41:47 -05:00
|
|
|
MySettingsButton {
|
2023-05-23 09:53:32 -04:00
|
|
|
text: qsTr("Cancel")
|
2023-10-21 10:38:46 -04:00
|
|
|
Accessible.description: qsTr("Cancel opt-in")
|
2023-04-14 14:44:28 -04:00
|
|
|
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onAccepted: {
|
2024-04-25 13:16:52 -04:00
|
|
|
MySettings.networkIsActive = true
|
2023-04-14 14:44:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
onRejected: {
|
2024-04-25 13:16:52 -04:00
|
|
|
MySettings.networkIsActive = false
|
2023-04-14 14:44:28 -04:00
|
|
|
}
|
|
|
|
}
|