Compare commits

...

22 Commits

Author SHA1 Message Date
Jared Van Bortel
830f698365 attempt to fix Qt 6.4 build 2024-10-21 18:28:19 -04:00
Jared Van Bortel
834ea755f3 Merge branch 'main' into HEAD 2024-10-21 18:27:36 -04:00
Jared Van Bortel
7ed66a6518 set clazy version 2024-10-21 17:58:46 -04:00
Jared Van Bortel
7c575a2ca0 don't install stable ver 2024-10-21 17:53:44 -04:00
Jared Van Bortel
52d35aa49f update sha 2024-10-21 17:51:30 -04:00
Jared Van Bortel
a937aca2ba update sha 2024-10-21 17:46:07 -04:00
Jared Van Bortel
ed3d68436f update sha 2024-10-21 17:43:51 -04:00
Jared Van Bortel
b7d2c85538 update sha 2024-10-21 17:40:22 -04:00
Jared Van Bortel
4f917bcde6 fix sha 2024-10-21 17:37:25 -04:00
Jared Van Bortel
57ccac4888 test forked action 2024-10-21 17:36:40 -04:00
Jared Van Bortel
510b7f38d8 github: try to fix file list
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:52:18 -04:00
Jared Van Bortel
0e794a0e4c github: recursive clone
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:26:39 -04:00
Jared Van Bortel
f7c4bf3fe5 github: add missing dep
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:22:38 -04:00
Jared Van Bortel
eae2b84557 github: add missing dep
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:21:14 -04:00
Jared Van Bortel
b9412318d9 github: fix dep
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:19:42 -04:00
Jared Van Bortel
3187fd04a3 github: add missing dep
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:17:15 -04:00
Jared Van Bortel
cc5f8b2053 github: fix syntax
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:14:03 -04:00
Jared Van Bortel
e75eb1569d github: update lint workflow
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:11:57 -04:00
Jared Van Bortel
6d687885b6 github: update Ubuntu runner
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:08:29 -04:00
Jared Van Bortel
7cda86988c github: attempt to install Qt
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 16:05:54 -04:00
Jared Van Bortel
9bd0644982 github: add clazy to linting workflow
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 15:50:06 -04:00
Jared Van Bortel
25833f4ec3 chatllm: fix use of deprecated '_qs'
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
2024-10-21 15:35:22 -04:00
16 changed files with 104 additions and 34 deletions

View File

@@ -1,19 +0,0 @@
---
name: Codespell
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2

46
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
---
name: Lint
on:
push:
branches: [main]
pull_request: {}
jobs:
codespell:
name: Codespell
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.1
- name: Codespell
uses: codespell-project/actions-codespell@v2.1
clazy:
name: Clazy
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.1
with:
submodules: "recursive"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libopengl-dev qt6-base-private-dev qt6-declarative-dev qt6-httpserver-dev qt6-pdf-dev qt6-svg-dev qt6-tools-dev qt6-websockets-dev
- name: Configure
run: |
cmake -S gpt4all-chat -B gpt4all-chat/build \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLMODEL_CUDA=OFF \
-DLLMODEL_KOMPUTE=OFF
- name: Clazy
uses: nomic-ai/clazy-action@009a6378b899ab6d20f26647e624f3038384378e
with:
version: '1.12'
checks: "level0,no-container-anti-pattern,no-qstring-arg,no-qstring-ref,no-strict-iterators,no-unused-non-trivial-variable"
database: gpt4all-chat/build
path-regex: "gpt4all-(chat|backend)/src"

View File

@@ -14,10 +14,13 @@
#include <QStringList>
#include <QVariant>
#include <Qt>
#include <QtLogging>
#include <utility>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
Chat::Chat(QObject *parent)
: QObject(parent)
, m_id(Network::globalInstance()->generateUniqueId())

View File

@@ -16,10 +16,13 @@
#include <QVariant>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>
#include <iostream>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;
//#define DEBUG

View File

@@ -16,7 +16,10 @@
#include <QVector>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
class ChatsRestoreThread : public QThread
{

View File

@@ -24,7 +24,6 @@
#include <QUrl>
#include <QWaitCondition>
#include <Qt>
#include <QtLogging>
#include <algorithm>
#include <cctype>
@@ -37,6 +36,10 @@
#include <utility>
#include <vector>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;
//#define DEBUG
@@ -198,7 +201,7 @@ bool ChatLLM::loadDefaultModel()
{
ModelInfo defaultModel = ModelList::globalInstance()->defaultModelInfo();
if (defaultModel.filename().isEmpty()) {
emit modelLoadingError(u"Could not find any model to load"_qs);
emit modelLoadingError(u"Could not find any model to load"_s);
return false;
}
return loadModel(defaultModel);

View File

@@ -24,13 +24,16 @@
#include <QUtf8StringView>
#include <QVariant>
#include <Qt>
#include <QtLogging>
#include <algorithm>
#include <cmath>
#include <optional>
#include <stdexcept>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;
namespace ranges = std::ranges;
namespace us = unum::usearch;

View File

@@ -27,13 +27,16 @@
#include <QVariant>
#include <QVector>
#include <Qt>
#include <QtLogging>
#include <algorithm>
#include <compare>
#include <cstddef>
#include <utility>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;
class MyDownload: public Download { };

View File

@@ -22,12 +22,15 @@
#include <QUrl>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>
#include <exception>
#include <utility>
#include <vector>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;
static const QString EMBEDDING_MODEL_NAME = u"nomic-embed-text-v1.5"_s;

View File

@@ -11,7 +11,10 @@
#include <QProcess>
#include <QSettings>
#include <QUrl>
#include <QtLogging>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
#ifdef GPT4ALL_OFFLINE_INSTALLER
# include <QDesktopServices>

View File

@@ -3,7 +3,11 @@
#include <QFile>
#include <QString>
#include <QtLogging>
#include <QtGlobal>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
class Logger
{

View File

@@ -32,7 +32,6 @@
#include <QTextStream>
#include <QTimer>
#include <QUrl>
#include <QtLogging>
#include <algorithm>
#include <cstddef>
@@ -41,6 +40,10 @@
#include <string>
#include <utility>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;
//#define USE_LOCAL_MODELSJSON

View File

@@ -15,13 +15,17 @@
#include <QThread>
#include <QUrl>
#include <QVariant>
#include <QtLogging>
#include <QtGlobal>
#include <algorithm>
#include <string>
#include <thread>
#include <vector>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;
// used only for settings serialization, do not translate

View File

@@ -29,7 +29,6 @@
#include <QSysInfo>
#include <Qt>
#include <QtGlobal>
#include <QtLogging>
#include <QUrl>
#include <QUuid>
@@ -37,6 +36,10 @@
#include <cstring>
#include <utility>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
#ifdef __GLIBC__
# include <gnu/libc-version.h>
#endif

View File

@@ -26,7 +26,6 @@
#include <Qt>
#include <QtCborCommon>
#include <QtGlobal>
#include <QtLogging>
#include <cstdint>
#include <iostream>
@@ -37,6 +36,9 @@
#include <unordered_map>
#include <utility>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
# include <QTcpServer>
#endif

View File

@@ -16,10 +16,13 @@
#include <QStringView>
#include <QVariant>
#include <QtGlobal>
#include <QtLogging>
#include <memory>
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
# include <QtLogging>
#endif
using namespace Qt::Literals::StringLiterals;