gpt4all

Форк
0
/
NetworkDialog.qml 
115 строк · 4.1 Кб
1
import QtCore
2
import QtQuick
3
import QtQuick.Controls
4
import QtQuick.Controls.Basic
5
import QtQuick.Layouts
6
import download
7
import network
8
import llm
9
import mysettings
10

11
MyDialog {
12
    id: networkDialog
13
    anchors.centerIn: parent
14
    modal: true
15
    padding: 20
16

17
    Theme {
18
        id: theme
19
    }
20

21
    Column {
22
        id: column
23
        spacing: 20
24
        Item {
25
            width: childrenRect.width
26
            height: childrenRect.height
27
            Image {
28
                id: img
29
                anchors.top: parent.top
30
                anchors.left: parent.left
31
                width: 60
32
                height: 60
33
                source: "qrc:/gpt4all/icons/logo.svg"
34
            }
35
            Text {
36
                anchors.left: img.right
37
                anchors.leftMargin: 30
38
                anchors.verticalCenter: img.verticalCenter
39
                text: qsTr("Contribute data to the GPT4All Opensource Datalake.")
40
                color: theme.textColor
41
                font.pixelSize: theme.fontSizeLarge
42
            }
43
        }
44

45
        ScrollView {
46
            clip: true
47
            height: 300
48
            width: 1024 - 40
49
            ScrollBar.vertical.policy: ScrollBar.AlwaysOn
50
            ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
51

52
            MyTextArea {
53
                id: textOptIn
54
                width: 1024 - 40
55
                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.
56

57
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.
58

59
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!")
60
                focus: false
61
                readOnly: true
62
                Accessible.role: Accessible.Paragraph
63
                Accessible.name: qsTr("Terms for opt-in")
64
                Accessible.description: qsTr("Describes what will happen when you opt-in")
65
            }
66
        }
67

68
        MyTextField {
69
            id: attribution
70
            width: parent.width
71
            text: MySettings.networkAttribution
72
            placeholderText: qsTr("Please provide a name for attribution (optional)")
73
            Accessible.role: Accessible.EditableText
74
            Accessible.name: qsTr("Attribution (optional)")
75
            Accessible.description: qsTr("Provide attribution")
76
            onEditingFinished: {
77
                MySettings.networkAttribution = attribution.text;
78
            }
79
        }
80
    }
81

82
    footer: DialogButtonBox {
83
        id: dialogBox
84
        padding: 20
85
        alignment: Qt.AlignRight
86
        spacing: 10
87
        MySettingsButton {
88
            text: qsTr("Enable")
89
            Accessible.description: qsTr("Enable opt-in")
90
            DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
91
        }
92
        MySettingsButton {
93
            text: qsTr("Cancel")
94
            Accessible.description: qsTr("Cancel opt-in")
95
            DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
96
        }
97
        background: Rectangle {
98
            color: "transparent"
99
        }
100
    }
101

102
    onAccepted: {
103
        if (MySettings.networkIsActive)
104
            return
105
        MySettings.networkIsActive = true;
106
        Network.sendNetworkToggled(true);
107
    }
108

109
    onRejected: {
110
        if (!MySettings.networkIsActive)
111
            return
112
        MySettings.networkIsActive = false;
113
        Network.sendNetworkToggled(false);
114
    }
115
}
116

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.