#ifndef SERVER_H #define SERVER_H #include "chatllm.h" #include "database.h" #include #include #include #include class Chat; class QHttpServer; class QHttpServerRequest; 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); void handleDatabaseResultsChanged(const QList &results) { m_databaseResults = results; } void handleCollectionListChanged(const QList &collectionList) { m_collections = collectionList; } private: Chat *m_chat; QHttpServer *m_server; QList m_databaseResults; QList m_collections; }; #endif // SERVER_H