mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-01 00:04:26 -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.
|
||||
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:
|
||||
```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"]
|
||||
```
|
||||
LocalDocs currently supports plain text files (`.txt`, `.md`, and `.rst`) and PDF files (`.pdf`).
|
||||
|
||||
#### Troubleshooting and FAQ
|
||||
*My LocalDocs plugin isn't using my documents*
|
||||
|
@ -17,8 +17,8 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
set(APP_VERSION_MAJOR 2)
|
||||
set(APP_VERSION_MINOR 6)
|
||||
set(APP_VERSION_PATCH 3)
|
||||
set(APP_VERSION_MINOR 7)
|
||||
set(APP_VERSION_PATCH 0)
|
||||
set(APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}")
|
||||
|
||||
# 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;
|
||||
#endif
|
||||
|
||||
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" };
|
||||
static const QList<QString> extensions { "txt", "pdf", "md", "rst" };
|
||||
|
||||
QDir dir(folder_path);
|
||||
Q_ASSERT(dir.exists());
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <QResource>
|
||||
#include <QSettings>
|
||||
#include <QUrl>
|
||||
#include <QNetworkInformation>
|
||||
#include <fstream>
|
||||
|
||||
#ifndef GPT4ALL_OFFLINE_INSTALLER
|
||||
@ -39,6 +40,10 @@ LLM::LLM()
|
||||
#endif
|
||||
|
||||
m_compatHardware = minimal;
|
||||
|
||||
QNetworkInformation::loadDefaultBackend();
|
||||
connect(QNetworkInformation::instance(), &QNetworkInformation::reachabilityChanged,
|
||||
this, &LLM::isNetworkOnlineChanged);
|
||||
}
|
||||
|
||||
bool LLM::hasSettingsAccess() const
|
||||
@ -100,3 +105,11 @@ QString LLM::systemTotalRAMInGBString() const
|
||||
{
|
||||
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
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool isNetworkOnline READ isNetworkOnline NOTIFY isNetworkOnlineChanged)
|
||||
|
||||
public:
|
||||
static LLM *globalInstance();
|
||||
|
||||
@ -17,10 +19,10 @@ public:
|
||||
Q_INVOKABLE static bool fileExists(const QString &path);
|
||||
Q_INVOKABLE qint64 systemTotalRAMInGB() const;
|
||||
Q_INVOKABLE QString systemTotalRAMInGBString() const;
|
||||
Q_INVOKABLE bool isNetworkOnline() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void chatListModelChanged();
|
||||
void modelListChanged();
|
||||
void isNetworkOnlineChanged();
|
||||
|
||||
private:
|
||||
bool m_compatHardware;
|
||||
|
@ -369,7 +369,7 @@ Window {
|
||||
highlighted: comboBox.highlightedIndex === index
|
||||
}
|
||||
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")
|
||||
onActivated: function (index) {
|
||||
currentChat.stopGenerating()
|
||||
@ -869,6 +869,7 @@ Window {
|
||||
|
||||
MyButton {
|
||||
id: downloadButton
|
||||
visible: LLM.isNetworkOnline
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: 40
|
||||
text: qsTr("Download models")
|
||||
@ -904,10 +905,7 @@ Window {
|
||||
model: chatModel
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
parent: listView.parent
|
||||
anchors.top: listView.top
|
||||
anchors.left: listView.right
|
||||
anchors.bottom: listView.bottom
|
||||
policy: ScrollBar.AsNeeded
|
||||
}
|
||||
|
||||
Accessible.role: Accessible.List
|
||||
@ -960,7 +958,7 @@ Window {
|
||||
}
|
||||
|
||||
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"
|
||||
|
||||
topPadding: 20
|
||||
|
@ -131,7 +131,7 @@ Drawer {
|
||||
}
|
||||
}
|
||||
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")
|
||||
}
|
||||
Row {
|
||||
|
Loading…
x
Reference in New Issue
Block a user