This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2024_Stanislav_Mykhailenko/Lesson_8/Task_1/llmmathquiz.h

37 lines
686 B
C
Raw Normal View History

2024-07-29 23:17:43 +00:00
#ifndef LLMMATHQUIZ_H
#define LLMMATHQUIZ_H
#include <QMainWindow>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonObject>
#include <QJsonDocument>
QT_BEGIN_NAMESPACE
namespace Ui {
class LlmMathQuiz;
}
QT_END_NAMESPACE
class LlmMathQuiz : public QMainWindow
{
Q_OBJECT
public:
LlmMathQuiz(QWidget *parent = nullptr);
~LlmMathQuiz();
private slots:
void submit();
void generate();
void newAnswer(QNetworkReply *);
private:
void sendPrompt(QString);
Ui::LlmMathQuiz *ui;
QNetworkAccessManager *m_manager = new QNetworkAccessManager();
bool m_taskReceived = false;
QString m_llmAnswer;
};
#endif // LLMMATHQUIZ_H