mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-06 11:00:48 +00:00
Add Nomic Embed model for atlas with localdocs.
This commit is contained in:
@@ -94,11 +94,13 @@ MyDialog {
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 20
|
||||
anchors.leftMargin: 40
|
||||
visible: model.indexing
|
||||
value: (model.totalBytesToIndex - model.currentBytesToIndex) / model.totalBytesToIndex
|
||||
visible: model.indexing || model.currentEmbeddingsToIndex !== model.totalEmbeddingsToIndex || model.error !== ""
|
||||
value: model.error !== "" ? 0 : model.indexing ?
|
||||
(model.totalBytesToIndex - model.currentBytesToIndex) / model.totalBytesToIndex :
|
||||
(model.currentEmbeddingsToIndex / model.totalEmbeddingsToIndex)
|
||||
background: Rectangle {
|
||||
implicitHeight: 45
|
||||
color: theme.progressBackground
|
||||
color: model.error ? theme.textErrorColor : theme.progressBackground
|
||||
radius: 3
|
||||
}
|
||||
contentItem: Item {
|
||||
@@ -114,16 +116,18 @@ MyDialog {
|
||||
Accessible.role: Accessible.ProgressBar
|
||||
Accessible.name: qsTr("Indexing progressBar")
|
||||
Accessible.description: qsTr("Shows the progress made in the indexing")
|
||||
ToolTip.text: model.error
|
||||
ToolTip.visible: hovered && model.error !== ""
|
||||
}
|
||||
Label {
|
||||
id: speedLabel
|
||||
color: theme.textColor
|
||||
visible: model.indexing
|
||||
visible: model.indexing || model.currentEmbeddingsToIndex !== model.totalEmbeddingsToIndex
|
||||
anchors.verticalCenter: itemProgressBar.verticalCenter
|
||||
anchors.left: itemProgressBar.left
|
||||
anchors.right: itemProgressBar.right
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: qsTr("indexing...")
|
||||
text: model.error !== "" ? qsTr("error...") : (model.indexing ? qsTr("indexing...") : qsTr("embeddings..."))
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: theme.fontSizeLarge
|
||||
}
|
||||
|
@@ -135,10 +135,10 @@ MyDialog {
|
||||
font.pixelSize: theme.fontSizeLarge
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
Layout.minimumWidth: openaiKey.width
|
||||
Layout.minimumWidth: apiKey.width
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||
visible: !isChatGPT && !installed && !calcHash && downloadError === ""
|
||||
visible: !isOnline && !installed && !calcHash && downloadError === ""
|
||||
Accessible.description: qsTr("Stop/restart/start the download")
|
||||
onClicked: {
|
||||
if (!isDownloading) {
|
||||
@@ -154,7 +154,7 @@ MyDialog {
|
||||
text: qsTr("Remove")
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
Layout.minimumWidth: openaiKey.width
|
||||
Layout.minimumWidth: apiKey.width
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||
visible: installed || downloadError !== ""
|
||||
@@ -166,23 +166,23 @@ MyDialog {
|
||||
|
||||
MySettingsButton {
|
||||
id: installButton
|
||||
visible: !installed && isChatGPT
|
||||
visible: !installed && isOnline
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
Layout.minimumWidth: openaiKey.width
|
||||
Layout.minimumWidth: apiKey.width
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||
text: qsTr("Install")
|
||||
font.pixelSize: theme.fontSizeLarge
|
||||
onClicked: {
|
||||
if (openaiKey.text === "")
|
||||
openaiKey.showError();
|
||||
if (apiKey.text === "")
|
||||
apiKey.showError();
|
||||
else
|
||||
Download.installModel(filename, openaiKey.text);
|
||||
Download.installModel(filename, apiKey.text);
|
||||
}
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: qsTr("Install")
|
||||
Accessible.description: qsTr("Install chatGPT model")
|
||||
Accessible.description: qsTr("Install online model")
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
@@ -238,7 +238,7 @@ MyDialog {
|
||||
visible: LLM.systemTotalRAMInGB() < ramrequired
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
Layout.maximumWidth: openaiKey.width
|
||||
Layout.maximumWidth: apiKey.width
|
||||
textFormat: Text.StyledText
|
||||
text: qsTr("<strong><font size=\"2\">WARNING: Not recommended for your hardware.")
|
||||
+ qsTr(" Model requires more memory (") + ramrequired
|
||||
@@ -261,7 +261,7 @@ MyDialog {
|
||||
visible: isDownloading && !calcHash
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
Layout.minimumWidth: openaiKey.width
|
||||
Layout.minimumWidth: apiKey.width
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||
spacing: 20
|
||||
@@ -269,7 +269,7 @@ MyDialog {
|
||||
ProgressBar {
|
||||
id: itemProgressBar
|
||||
Layout.fillWidth: true
|
||||
width: openaiKey.width
|
||||
width: apiKey.width
|
||||
value: bytesReceived / bytesTotal
|
||||
background: Rectangle {
|
||||
implicitHeight: 45
|
||||
@@ -307,7 +307,7 @@ MyDialog {
|
||||
visible: calcHash
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
Layout.minimumWidth: openaiKey.width
|
||||
Layout.minimumWidth: apiKey.width
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||
|
||||
@@ -331,8 +331,8 @@ MyDialog {
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: openaiKey
|
||||
visible: !installed && isChatGPT
|
||||
id: apiKey
|
||||
visible: !installed && isOnline
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
Layout.minimumWidth: 150
|
||||
@@ -340,19 +340,19 @@ MyDialog {
|
||||
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||
wrapMode: Text.WrapAnywhere
|
||||
function showError() {
|
||||
openaiKey.placeholderTextColor = theme.textErrorColor
|
||||
apiKey.placeholderTextColor = theme.textErrorColor
|
||||
}
|
||||
onTextChanged: {
|
||||
openaiKey.placeholderTextColor = theme.mutedTextColor
|
||||
apiKey.placeholderTextColor = theme.mutedTextColor
|
||||
}
|
||||
placeholderText: qsTr("enter $OPENAI_API_KEY")
|
||||
placeholderText: qsTr("enter $API_KEY")
|
||||
Accessible.role: Accessible.EditableText
|
||||
Accessible.name: placeholderText
|
||||
Accessible.description: qsTr("Whether the file hash is being calculated")
|
||||
TextMetrics {
|
||||
id: textMetrics
|
||||
font: openaiKey.font
|
||||
text: openaiKey.placeholderText
|
||||
font: apiKey.font
|
||||
text: apiKey.placeholderText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user