LocalDocs version 2 with text embeddings.

This commit is contained in:
Adam Treat
2023-10-24 12:13:32 -04:00
committed by AT
parent d4ce9f4a7c
commit 371e2a5cbc
30 changed files with 3540 additions and 164 deletions

27
gpt4all-chat/embllm.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef EMBLLM_H
#define EMBLLM_H
#include <QObject>
#include <QThread>
#include "../gpt4all-backend/llmodel.h"
class EmbeddingLLM : public QObject
{
Q_OBJECT
public:
EmbeddingLLM();
virtual ~EmbeddingLLM();
bool hasModel() const;
public Q_SLOTS:
std::vector<float> generateEmbeddings(const QString &text);
private:
bool loadModel();
private:
LLModel *m_model = nullptr;
};
#endif // EMBLLM_H