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
Stanislav Mykhailenko 1842b50139
Add Lesson 8 Task 1
2024-07-30 02:17:43 +03:00

36 lines
686 B
C++

#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