add "restore defaults" button

This commit is contained in:
Aaron Miller 2023-04-16 02:36:42 -07:00 committed by AT
parent 5bfb3f8229
commit 8204e7d047

View File

@ -65,6 +65,21 @@ Window {
%1 %1
### Response: ### Response:
" "
function restoreDefaults() {
temperature = 0.9;
topP = 0.9;
topK = 40;
maxLength = 4096;
promptBatchSize = 9;
promptTemplate = "Below is a prompt for either a task to complete or a piece of conversation. Decide which and write an appropriate response to the prompt.
### Prompt:
%1
### Response:
";
}
GridLayout { GridLayout {
columns: 2 columns: 2
rowSpacing: 10 rowSpacing: 10
@ -210,6 +225,28 @@ Window {
} }
} }
} }
Button {
Layout.row: 6
Layout.column: 1
Layout.fillWidth: true
padding: 15
contentItem: Text {
text: qsTr("Restore Defaults")
horizontalAlignment: Text.AlignHCenter
color: "#d1d5db"
}
background: Rectangle {
opacity: .5
border.color: "#7d7d8e"
border.width: 1
radius: 10
color: "#343541"
}
onClicked: {
settingsDialog.restoreDefaults()
}
}
} }
} }