Compare commits

..

No commits in common. "ec13ba28189bd8affa651e25a988aba8339ecf69" and "78a26cc5e4c7b6a41c0bd12271da0ceefcc68a17" have entirely different histories.

7 changed files with 31 additions and 26 deletions

View File

@ -61,7 +61,17 @@ 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 currently supports plain text files (`.txt`, `.md`, and `.rst`) and PDF files (`.pdf`). LocalDocs supports the following file types:
```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*

View File

@ -17,8 +17,8 @@ if(APPLE)
endif() endif()
set(APP_VERSION_MAJOR 2) set(APP_VERSION_MAJOR 2)
set(APP_VERSION_MINOR 7) set(APP_VERSION_MINOR 6)
set(APP_VERSION_PATCH 0) set(APP_VERSION_PATCH 3)
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

View File

@ -890,7 +890,15 @@ 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", "pdf", "md", "rst" }; static const QList<QString> extensions { "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" };
QDir dir(folder_path); QDir dir(folder_path);
Q_ASSERT(dir.exists()); Q_ASSERT(dir.exists());

View File

@ -9,7 +9,6 @@
#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
@ -40,10 +39,6 @@ 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
@ -105,11 +100,3 @@ 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;
}

View File

@ -6,8 +6,6 @@
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();
@ -19,10 +17,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 isNetworkOnlineChanged(); void chatListModelChanged();
void modelListChanged();
private: private:
bool m_compatHardware; bool m_compatHardware;

View File

@ -369,7 +369,7 @@ Window {
highlighted: comboBox.highlightedIndex === index highlighted: comboBox.highlightedIndex === index
} }
Accessible.role: Accessible.ComboBox Accessible.role: Accessible.ComboBox
Accessible.name: comboBox.currentModelName Accessible.name: qsTr("List of available models")
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,7 +869,6 @@ 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")
@ -905,7 +904,10 @@ Window {
model: chatModel model: chatModel
ScrollBar.vertical: ScrollBar { ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded parent: listView.parent
anchors.top: listView.top
anchors.left: listView.right
anchors.bottom: listView.bottom
} }
Accessible.role: Accessible.List Accessible.role: Accessible.List
@ -958,7 +960,7 @@ Window {
} }
Accessible.role: Accessible.Paragraph Accessible.role: Accessible.Paragraph
Accessible.name: text Accessible.name: name
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

View File

@ -131,7 +131,7 @@ Drawer {
} }
} }
Accessible.role: Accessible.Button Accessible.role: Accessible.Button
Accessible.name: text Accessible.name: qsTr("Select the current chat")
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 {