-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeepseekclient.h
More file actions
42 lines (32 loc) · 835 Bytes
/
Copy pathdeepseekclient.h
File metadata and controls
42 lines (32 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef DEEPSEEKCLIENT_H
#define DEEPSEEKCLIENT_H
#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QJsonDocument>
#include <QJsonObject>
#include<QJsonArray>
#include <QSslSocket>
namespace Ui {
class DeepSeekClient;
}
class DeepSeekClient : public QWidget
{
Q_OBJECT
public:
explicit DeepSeekClient(QWidget *parent = nullptr);
~DeepSeekClient();
void sendRequest(const QString &prompt);
void handleResponse(QNetworkReply *reply);
signals:
void responseReceived(const QString &response);
private slots:
void on_pushButton_clicked();
private:
QNetworkAccessManager *manager;
QString api_key = "sk-4028d337980f4681b36e7b0a77c3b511"; // 替换为你的API Key
private:
Ui::DeepSeekClient *ui;
};
#endif // DEEPSEEKCLIENT_H