diff --git a/src/main/java/org/myrobotlab/service/LLM.java b/src/main/java/org/myrobotlab/service/LLM.java index 9e0b48f358..e2bef5500c 100644 --- a/src/main/java/org/myrobotlab/service/LLM.java +++ b/src/main/java/org/myrobotlab/service/LLM.java @@ -255,7 +255,13 @@ public Response getResponseStream(String text) { userTextMessages.clear(); } - String finalText = systemContent + " " + text; + StringBuilder userText = new StringBuilder(""); + for (String t : userTextMessages) { + userText.append(t); + userText.append(" "); + } + + String finalText = systemContent + " " + text; // sentence chunking stream processing final StringBuilder[] sentenceBuilder = { new StringBuilder() };