mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
Disable ssl handshake for now.
This commit is contained in:
parent
9dbeffc888
commit
fa9f4cca62
@ -87,6 +87,9 @@ void Download::downloadModel(const QString &modelFile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QNetworkRequest request("http://gpt4all.io/models/" + modelFile);
|
QNetworkRequest request("http://gpt4all.io/models/" + modelFile);
|
||||||
|
QSslConfiguration conf = request.sslConfiguration();
|
||||||
|
conf.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(conf);
|
||||||
QNetworkReply *modelReply = m_networkManager.get(request);
|
QNetworkReply *modelReply = m_networkManager.get(request);
|
||||||
connect(modelReply, &QNetworkReply::downloadProgress, this, &Download::handleDownloadProgress);
|
connect(modelReply, &QNetworkReply::downloadProgress, this, &Download::handleDownloadProgress);
|
||||||
connect(modelReply, &QNetworkReply::finished, this, &Download::handleModelDownloadFinished);
|
connect(modelReply, &QNetworkReply::finished, this, &Download::handleModelDownloadFinished);
|
||||||
|
@ -80,6 +80,9 @@ bool Network::packageAndSendJson(const QString &ingestId, const QString &json)
|
|||||||
#endif
|
#endif
|
||||||
QUrl jsonUrl("https://api.gpt4all.io/v1/ingest/chat");
|
QUrl jsonUrl("https://api.gpt4all.io/v1/ingest/chat");
|
||||||
QNetworkRequest request(jsonUrl);
|
QNetworkRequest request(jsonUrl);
|
||||||
|
QSslConfiguration conf = request.sslConfiguration();
|
||||||
|
conf.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(conf);
|
||||||
QByteArray body(newDoc.toJson());
|
QByteArray body(newDoc.toJson());
|
||||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||||
QNetworkReply *jsonReply = m_networkManager.post(request, body);
|
QNetworkReply *jsonReply = m_networkManager.post(request, body);
|
||||||
@ -132,6 +135,9 @@ void Network::sendHealth()
|
|||||||
{
|
{
|
||||||
QUrl healthUrl("https://api.gpt4all.io/v1/health");
|
QUrl healthUrl("https://api.gpt4all.io/v1/health");
|
||||||
QNetworkRequest request(healthUrl);
|
QNetworkRequest request(healthUrl);
|
||||||
|
QSslConfiguration conf = request.sslConfiguration();
|
||||||
|
conf.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||||
|
request.setSslConfiguration(conf);
|
||||||
QNetworkReply *healthReply = m_networkManager.get(request);
|
QNetworkReply *healthReply = m_networkManager.get(request);
|
||||||
connect(healthReply, &QNetworkReply::finished, this, &Network::handleHealthFinished);
|
connect(healthReply, &QNetworkReply::finished, this, &Network::handleHealthFinished);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user