mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-10 00:04:22 -04:00
Compare commits
6 Commits
78a26cc5e4
...
ec13ba2818
Author | SHA1 | Date | |
---|---|---|---|
|
ec13ba2818 | ||
|
2020c23edf | ||
|
260a56c748 | ||
|
4258bb1f8a | ||
|
490404dbb2 | ||
|
513a214eca |
@ -61,17 +61,7 @@ The general technique this plugin uses is called [Retrieval Augmented Generation
|
|||||||
These document chunks help your LLM respond to queries with knowledge about the contents of your data.
|
These document chunks help your LLM respond to queries with knowledge about the contents of your data.
|
||||||
The number of chunks and the size of each chunk can be configured in the LocalDocs plugin settings tab.
|
The number of chunks and the size of each chunk can be configured in the LocalDocs plugin settings tab.
|
||||||
|
|
||||||
LocalDocs supports the following file types:
|
LocalDocs currently supports plain text files (`.txt`, `.md`, and `.rst`) and PDF files (`.pdf`).
|
||||||
```json
|
|
||||||
["txt", "doc", "docx", "pdf", "rtf", "odt", "html", "htm", "xls", "xlsx", "csv", "ods", "ppt", "pptx", "odp", "xml", "json", "log", "md", "org", "tex", "asc", "wks",
|
|
||||||
"wpd", "wps", "wri", "xhtml", "xht", "xslt", "yaml", "yml", "dtd", "sgml", "tsv", "strings", "resx",
|
|
||||||
"plist", "properties", "ini", "config", "bat", "sh", "ps1", "cmd", "awk", "sed", "vbs", "ics", "mht",
|
|
||||||
"mhtml", "epub", "djvu", "azw", "azw3", "mobi", "fb2", "prc", "lit", "lrf", "tcr", "pdb", "oxps",
|
|
||||||
"xps", "pages", "numbers", "key", "keynote", "abw", "zabw", "123", "wk1", "wk3", "wk4", "wk5", "wq1",
|
|
||||||
"wq2", "xlw", "xlr", "dif", "slk", "sylk", "wb1", "wb2", "wb3", "qpw", "wdb", "wks", "wku", "wr1",
|
|
||||||
"wrk", "xlk", "xlt", "xltm", "xltx", "xlsm", "xla", "xlam", "xll", "xld", "xlv", "xlw", "xlc", "xlm",
|
|
||||||
"xlt", "xln"]
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Troubleshooting and FAQ
|
#### Troubleshooting and FAQ
|
||||||
*My LocalDocs plugin isn't using my documents*
|
*My LocalDocs plugin isn't using my documents*
|
||||||
|
@ -17,8 +17,8 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(APP_VERSION_MAJOR 2)
|
set(APP_VERSION_MAJOR 2)
|
||||||
set(APP_VERSION_MINOR 6)
|
set(APP_VERSION_MINOR 7)
|
||||||
set(APP_VERSION_PATCH 3)
|
set(APP_VERSION_PATCH 0)
|
||||||
set(APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}")
|
set(APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}")
|
||||||
|
|
||||||
# Include the binary directory for the generated header file
|
# Include the binary directory for the generated header file
|
||||||
|
@ -890,15 +890,7 @@ void Database::scanDocuments(int folder_id, const QString &folder_path)
|
|||||||
qDebug() << "scanning folder for documents" << folder_path;
|
qDebug() << "scanning folder for documents" << folder_path;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const QList<QString> extensions { "txt", "doc", "docx", "pdf", "rtf", "odt", "html", "htm",
|
static const QList<QString> extensions { "txt", "pdf", "md", "rst" };
|
||||||
"xls", "xlsx", "csv", "ods", "ppt", "pptx", "odp", "xml", "json", "log", "md", "org", "tex", "asc", "wks",
|
|
||||||
"wpd", "wps", "wri", "xhtml", "xht", "xslt", "yaml", "yml", "dtd", "sgml", "tsv", "strings", "resx",
|
|
||||||
"plist", "properties", "ini", "config", "bat", "sh", "ps1", "cmd", "awk", "sed", "vbs", "ics", "mht",
|
|
||||||
"mhtml", "epub", "djvu", "azw", "azw3", "mobi", "fb2", "prc", "lit", "lrf", "tcr", "pdb", "oxps",
|
|
||||||
"xps", "pages", "numbers", "key", "keynote", "abw", "zabw", "123", "wk1", "wk3", "wk4", "wk5", "wq1",
|
|
||||||
"wq2", "xlw", "xlr", "dif", "slk", "sylk", "wb1", "wb2", "wb3", "qpw", "wdb", "wks", "wku", "wr1",
|
|
||||||
"wrk", "xlk", "xlt", "xltm", "xltx", "xlsm", "xla", "xlam", "xll", "xld", "xlv", "xlw", "xlc", "xlm",
|
|
||||||
"xlt", "xln" };
|
|
||||||
|
|
||||||
QDir dir(folder_path);
|
QDir dir(folder_path);
|
||||||
Q_ASSERT(dir.exists());
|
Q_ASSERT(dir.exists());
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <QResource>
|
#include <QResource>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QNetworkInformation>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#ifndef GPT4ALL_OFFLINE_INSTALLER
|
#ifndef GPT4ALL_OFFLINE_INSTALLER
|
||||||
@ -39,6 +40,10 @@ LLM::LLM()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_compatHardware = minimal;
|
m_compatHardware = minimal;
|
||||||
|
|
||||||
|
QNetworkInformation::loadDefaultBackend();
|
||||||
|
connect(QNetworkInformation::instance(), &QNetworkInformation::reachabilityChanged,
|
||||||
|
this, &LLM::isNetworkOnlineChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LLM::hasSettingsAccess() const
|
bool LLM::hasSettingsAccess() const
|
||||||
@ -100,3 +105,11 @@ QString LLM::systemTotalRAMInGBString() const
|
|||||||
{
|
{
|
||||||
return QString::fromStdString(getSystemTotalRAMInGBString());
|
return QString::fromStdString(getSystemTotalRAMInGBString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LLM::isNetworkOnline() const
|
||||||
|
{
|
||||||
|
if (!QNetworkInformation::instance())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return QNetworkInformation::instance()->reachability() == QNetworkInformation::Reachability::Online;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
class LLM : public QObject
|
class LLM : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(bool isNetworkOnline READ isNetworkOnline NOTIFY isNetworkOnlineChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static LLM *globalInstance();
|
static LLM *globalInstance();
|
||||||
|
|
||||||
@ -17,10 +19,10 @@ public:
|
|||||||
Q_INVOKABLE static bool fileExists(const QString &path);
|
Q_INVOKABLE static bool fileExists(const QString &path);
|
||||||
Q_INVOKABLE qint64 systemTotalRAMInGB() const;
|
Q_INVOKABLE qint64 systemTotalRAMInGB() const;
|
||||||
Q_INVOKABLE QString systemTotalRAMInGBString() const;
|
Q_INVOKABLE QString systemTotalRAMInGBString() const;
|
||||||
|
Q_INVOKABLE bool isNetworkOnline() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void chatListModelChanged();
|
void isNetworkOnlineChanged();
|
||||||
void modelListChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_compatHardware;
|
bool m_compatHardware;
|
||||||
|
@ -369,7 +369,7 @@ Window {
|
|||||||
highlighted: comboBox.highlightedIndex === index
|
highlighted: comboBox.highlightedIndex === index
|
||||||
}
|
}
|
||||||
Accessible.role: Accessible.ComboBox
|
Accessible.role: Accessible.ComboBox
|
||||||
Accessible.name: qsTr("List of available models")
|
Accessible.name: comboBox.currentModelName
|
||||||
Accessible.description: qsTr("The top item is the current model")
|
Accessible.description: qsTr("The top item is the current model")
|
||||||
onActivated: function (index) {
|
onActivated: function (index) {
|
||||||
currentChat.stopGenerating()
|
currentChat.stopGenerating()
|
||||||
@ -869,6 +869,7 @@ Window {
|
|||||||
|
|
||||||
MyButton {
|
MyButton {
|
||||||
id: downloadButton
|
id: downloadButton
|
||||||
|
visible: LLM.isNetworkOnline
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: 40
|
Layout.topMargin: 40
|
||||||
text: qsTr("Download models")
|
text: qsTr("Download models")
|
||||||
@ -904,10 +905,7 @@ Window {
|
|||||||
model: chatModel
|
model: chatModel
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
parent: listView.parent
|
policy: ScrollBar.AsNeeded
|
||||||
anchors.top: listView.top
|
|
||||||
anchors.left: listView.right
|
|
||||||
anchors.bottom: listView.bottom
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessible.role: Accessible.List
|
Accessible.role: Accessible.List
|
||||||
@ -960,7 +958,7 @@ Window {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Accessible.role: Accessible.Paragraph
|
Accessible.role: Accessible.Paragraph
|
||||||
Accessible.name: name
|
Accessible.name: text
|
||||||
Accessible.description: name === qsTr("Response: ") ? "The response by the model" : "The prompt by the user"
|
Accessible.description: name === qsTr("Response: ") ? "The response by the model" : "The prompt by the user"
|
||||||
|
|
||||||
topPadding: 20
|
topPadding: 20
|
||||||
|
@ -131,7 +131,7 @@ Drawer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
Accessible.name: qsTr("Select the current chat")
|
Accessible.name: text
|
||||||
Accessible.description: qsTr("Select the current chat or edit the chat when in edit mode")
|
Accessible.description: qsTr("Select the current chat or edit the chat when in edit mode")
|
||||||
}
|
}
|
||||||
Row {
|
Row {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user