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/gpt4all-chat/server.h

32 lines
524 B
C++

#ifndef SERVER_H
#define SERVER_H
#include "chatllm.h"
#include <QObject>
#include <QtHttpServer/QHttpServer>
class Server : public ChatLLM
{
Q_OBJECT
public:
Server(Chat *parent);
virtual ~Server();
public Q_SLOTS:
void start();
Q_SIGNALS:
void requestServerNewPromptResponsePair(const QString &prompt);
private Q_SLOTS:
QHttpServerResponse handleCompletionRequest(const QHttpServerRequest &request, bool isChat);
private:
Chat *m_chat;
QHttpServer *m_server;
};
#endif // SERVER_H