Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
ConsoleOutputStreamHandler.java
Go to the documentation of this file.
1
package
io.github.ollama4j.impl;
2
3
import
io.github.ollama4j.models.generate.OllamaStreamHandler;
4
5
public
class
ConsoleOutputStreamHandler
implements
OllamaStreamHandler
{
6
private
final
StringBuffer response =
new
StringBuffer();
7
8
@Override
9
public
void
accept
(String message) {
10
String substr = message.substring(response.length());
11
response.append(substr);
12
System.out.print(substr);
13
}
14
}
io.github.ollama4j.impl.ConsoleOutputStreamHandler
Definition
ConsoleOutputStreamHandler.java:5
io.github.ollama4j.impl.ConsoleOutputStreamHandler.accept
void accept(String message)
Definition
ConsoleOutputStreamHandler.java:9
io.github.ollama4j.models.generate.OllamaStreamHandler
Definition
OllamaStreamHandler.java:5
src
main
java
io
github
ollama4j
impl
ConsoleOutputStreamHandler.java
Generated by
1.12.0