mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-08 07:10:32 +00:00
28 lines
428 B
C++
28 lines
428 B
C++
#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
|