mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Fix this correctly?
This commit is contained in:
parent
07a5405618
commit
71449bbc4b
@ -93,6 +93,7 @@ Dialog {
|
||||
settings.maxLength = defaultMaxLength
|
||||
settings.promptBatchSize = defaultPromptBatchSize
|
||||
settings.promptTemplate = defaultPromptTemplate
|
||||
templateTextArea.text = defaultPromptTemplate
|
||||
settings.repeatPenalty = defaultRepeatPenalty
|
||||
settings.repeatPenaltyTokens = defaultRepeatPenaltyTokens
|
||||
settings.sync()
|
||||
@ -535,7 +536,7 @@ Dialog {
|
||||
Label {
|
||||
id: promptTemplateLabelHelp
|
||||
Layout.maximumWidth: promptTemplateLabel.width
|
||||
visible: settings.promptTemplate.indexOf(
|
||||
visible: templateTextArea.text.indexOf(
|
||||
"%1") === -1
|
||||
color: theme.textErrorColor
|
||||
text: qsTr("Must contain the string \"%1\" to be replaced with the user's input.")
|
||||
@ -556,6 +557,7 @@ Dialog {
|
||||
id: templateScrollView
|
||||
anchors.fill: parent
|
||||
TextArea {
|
||||
id: templateTextArea
|
||||
text: settings.promptTemplate
|
||||
color: theme.textColor
|
||||
background: Rectangle {
|
||||
@ -566,11 +568,11 @@ Dialog {
|
||||
padding: 10
|
||||
wrapMode: TextArea.Wrap
|
||||
onTextChanged: {
|
||||
if (settings.promptTemplate.indexOf("%1") === -1)
|
||||
return;
|
||||
if (templateTextArea.text.indexOf("%1") !== -1) {
|
||||
settings.promptTemplate = text
|
||||
settings.sync()
|
||||
}
|
||||
}
|
||||
bottomPadding: 10
|
||||
Accessible.role: Accessible.EditableText
|
||||
Accessible.name: promptTemplateLabel.text
|
||||
|
Loading…
Reference in New Issue
Block a user