mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-11-04 18:40:40 +01:00
Optimizes ChatStreamObserver to use only the last message instead of parsing all messages again
This commit is contained in:
@@ -183,7 +183,7 @@ class TestRealAPIs {
|
||||
|
||||
OllamaChatResult chatResult = ollamaAPI.chat(requestModel,(s) -> {
|
||||
LOG.info(s);
|
||||
String substring = s.substring(sb.toString().length(), s.length()-1);
|
||||
String substring = s.substring(sb.toString().length(), s.length());
|
||||
LOG.info(substring);
|
||||
sb.append(substring);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user