// This is here just to stretch out the third column
Rectangle{
Layout.row:3
Layout.column:2
Layout.fillWidth:true
height:1
color:theme.dialogBorder
}
Label{
id: chunkLabel
Layout.row:1
Layout.column:0
color:theme.textColor
text:qsTr("Document snippet size (characters):")
}
MyTextField{
id: chunkSizeTextField
Layout.row:1
Layout.column:1
ToolTip.text:qsTr("Number of characters per document snippet.\nNOTE: larger numbers increase likelihood of factual responses, but also result in slower generation.")
ToolTip.visible:hovered
text:MySettings.localDocsChunkSize
validator:IntValidator{
bottom:1
}
onEditingFinished:{
varval=parseInt(text)
if(!isNaN(val)){
MySettings.localDocsChunkSize=val
focus=false
}else{
text=MySettings.localDocsChunkSize
}
}
}
Label{
id: contextItemsPerPrompt
Layout.row:2
Layout.column:0
color:theme.textColor
text:qsTr("Document snippets per prompt:")
}
MyTextField{
Layout.row:2
Layout.column:1
ToolTip.text:qsTr("Best N matches of retrieved document snippets to add to the context for prompt.\nNOTE: larger numbers increase likelihood of factual responses, but also result in slower generation.")
ToolTip.visible:hovered
text:MySettings.localDocsRetrievalSize
validator:IntValidator{
bottom:1
}
onEditingFinished:{
varval=parseInt(text)
if(!isNaN(val)){
MySettings.localDocsRetrievalSize=val
focus=false
}else{
text=MySettings.localDocsRetrievalSize
}
}
}
Label{
id: warningLabel
Layout.row:1
Layout.column:2
Layout.rowSpan:2
Layout.maximumWidth:520
Layout.alignment:Qt.AlignTop
color:theme.textErrorColor
wrapMode:Text.WordWrap
text:qsTr("Warning: Advanced usage only. Values too large may cause localdocs failure, extremely slow responses or failure to respond at all. Roughly speaking, the {N chars x N snippets} are added to the model's context window. More info <a href=\"https://docs.gpt4all.io/gpt4all_chat.html#localdocs-beta-plugin-chat-with-your-data\">here.</a>")