As requested, I'm opening this small issue just to show you a simple trick to prevent any IDE warnings from appearing in runInteractive():
static void runInteractive(Llama model, Sampler sampler, Options options) {
...
Scanner in = new Scanner(System.in);
while (true) {
...
}
}
}
The Scanner in isn't being closed- which isn't necessarily a big deal since it'll be closed when the program ends. But for the sake of clean code, you can tweak it to this:
static void runInteractive(Llama model, Sampler sampler, Options options) {
...
try (Scanner in = new Scanner(System.in)) {
while (true) {
...
}
}
}
As requested, I'm opening this small issue just to show you a simple trick to prevent any IDE warnings from appearing in runInteractive():
The Scanner
in
isn't being closed- which isn't necessarily a big deal since it'll be closed when the program ends. But for the sake of clean code, you can tweak it to this: