mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-08 11:58:53 +00:00
Fix typo and add new show references setting to localdocs.
This commit is contained in:
@@ -17,6 +17,7 @@ static bool default_forceMetal = false;
|
||||
static QString default_lastVersionStarted = "";
|
||||
static int default_localDocsChunkSize = 256;
|
||||
static int default_localDocsRetrievalSize = 3;
|
||||
static bool default_localDocsShowReferences = true;
|
||||
static QString default_networkAttribution = "";
|
||||
static bool default_networkIsActive = false;
|
||||
static bool default_networkUsageStatsActive = false;
|
||||
@@ -89,6 +90,7 @@ void MySettings::restoreLocalDocsDefaults()
|
||||
{
|
||||
setLocalDocsChunkSize(default_localDocsChunkSize);
|
||||
setLocalDocsRetrievalSize(default_localDocsRetrievalSize);
|
||||
setLocalDocsShowReferences(default_localDocsShowReferences);
|
||||
}
|
||||
|
||||
void MySettings::eraseModel(const ModelInfo &m)
|
||||
@@ -520,6 +522,24 @@ void MySettings::setLocalDocsRetrievalSize(int s)
|
||||
emit localDocsRetrievalSizeChanged();
|
||||
}
|
||||
|
||||
bool MySettings::localDocsShowReferences() const
|
||||
{
|
||||
QSettings setting;
|
||||
setting.sync();
|
||||
return setting.value("localdocs/showReferences", default_localDocsShowReferences).toBool();
|
||||
}
|
||||
|
||||
void MySettings::setLocalDocsShowReferences(bool b)
|
||||
{
|
||||
if (localDocsShowReferences() == b)
|
||||
return;
|
||||
|
||||
QSettings setting;
|
||||
setting.setValue("localdocs/showReferences", b);
|
||||
setting.sync();
|
||||
emit localDocsShowReferencesChanged();
|
||||
}
|
||||
|
||||
QString MySettings::networkAttribution() const
|
||||
{
|
||||
QSettings setting;
|
||||
|
Reference in New Issue
Block a user