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