mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-03 17:12:49 +00:00
fix test harder (it works now)
This commit is contained in:
parent
e592a5890e
commit
daf48a5adf
@ -8,14 +8,13 @@
|
|||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QLatin1StringView>
|
#include <QLatin1StringView>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
using gpt4all::backend::LLMProvider;
|
using gpt4all::backend::LLMProvider;
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
static void run()
|
||||||
{
|
{
|
||||||
QCoreApplication app(argc, argv);
|
|
||||||
|
|
||||||
fmt::print("Connecting to server at {}\n", OLLAMA_URL);
|
fmt::print("Connecting to server at {}\n", OLLAMA_URL);
|
||||||
LLMProvider provider(OLLAMA_URL);
|
LLMProvider provider(OLLAMA_URL);
|
||||||
auto version = QCoro::waitFor(provider.getVersion());
|
auto version = QCoro::waitFor(provider.getVersion());
|
||||||
@ -23,6 +22,15 @@ int main(int argc, char *argv[])
|
|||||||
fmt::print("Server version: {}\n", *version);
|
fmt::print("Server version: {}\n", *version);
|
||||||
} else {
|
} else {
|
||||||
fmt::print("Network error: {}\n", version.error().errorString);
|
fmt::print("Network error: {}\n", version.error().errorString);
|
||||||
return 1;
|
return QCoreApplication::exit(1);
|
||||||
}
|
}
|
||||||
|
QCoreApplication::exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QCoreApplication app(argc, argv);
|
||||||
|
QTimer::singleShot(0, &run);
|
||||||
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user