mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 11:57:12 +02:00
Fixes currently not working code snippet for ask-async doc
This commit is contained in:
parent
02bf769188
commit
d969c7ad46
@ -24,8 +24,8 @@ public class Main {
|
|||||||
while (!callback.isComplete() || !callback.getStream().isEmpty()) {
|
while (!callback.isComplete() || !callback.getStream().isEmpty()) {
|
||||||
// poll for data from the response stream
|
// poll for data from the response stream
|
||||||
String result = callback.getStream().poll();
|
String result = callback.getStream().poll();
|
||||||
if (response != null) {
|
if (result != null) {
|
||||||
System.out.print(result.getResponse());
|
System.out.print(result);
|
||||||
}
|
}
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user