From 421a3ed8e78d71c92f04daf42770376e15935fc0 Mon Sep 17 00:00:00 2001 From: Aaron Miller Date: Sun, 16 Apr 2023 02:36:42 -0700 Subject: [PATCH] add "restore defaults" button --- main.qml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/main.qml b/main.qml index 1cc6f0fb..160acf8a 100644 --- a/main.qml +++ b/main.qml @@ -65,6 +65,21 @@ Window { %1 ### 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 { columns: 2 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() + } + } } }