You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt4all/gptj.h

29 lines
664 B
C++

#ifndef GPTJ_H
#define GPTJ_H
#include <string>
#include <functional>
#include <vector>
#include "llmodel.h"
class GPTJPrivate;
class GPTJ : public LLModel {
public:
GPTJ();
~GPTJ();
bool loadModel(const std::string &modelPath) override;
bool loadModel(const std::string &modelPath, std::istream &fin) override;
bool isModelLoaded() const override;
void prompt(const std::string &prompt,
std::function<bool(int32_t, const std::string&)> response,
PromptContext &ctx) override;
void setThreadCount(int32_t n_threads) override;
int32_t threadCount() override;
private:
GPTJPrivate *d_ptr;
};
#endif // GPTJ_H