From ffe52fc5cf09250483b27a270a87df04c85dc8b7 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 11 Apr 2023 08:36:30 -0400 Subject: [PATCH] Disable input until model is loaded. --- main.qml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main.qml b/main.qml index e5251297..d1cfb1fd 100644 --- a/main.qml +++ b/main.qml @@ -379,6 +379,7 @@ Window { anchors.margins: 30 color: "#dadadc" padding: 20 + enabled: LLM.isModelLoaded font.pixelSize: 24 placeholderText: qsTr("Send a message...") placeholderTextColor: "#7d7d8e" @@ -398,12 +399,6 @@ Window { var prompt = textInput.text + "\n" chatModel.append({"name": qsTr("Prompt: "), "currentResponse": false, "value": textInput.text}) chatModel.append({"name": qsTr("Response: "), "currentResponse": true, "value": "", "prompt": prompt}) - - // var contextPrompt; - // for (var i = 0; i < chatModel.count; ++i) - // contextPrompt += chatModel.get(i).value + "\n"; - // prompt = contextPrompt + textInput.text + "\n" - LLM.resetResponse() LLM.prompt(prompt) textInput.text = ""