Details
-
Bug
-
Resolution: Fixed
-
Major
-
0.8
-
None
-
Unknown
-
Description
When streaming mode is enabled, the chat widget drops a portion of the assistant's response. In non-streaming mode, full responses are returned correctly.
Root cause:
RAGChatRequestFilter.processStreaming() builds the sources ChatMessage without appending a trailing \n\n:
// Streaming path — missing delimiter new ChatMessage("assistant", SOURCES_STRING2 + sources, searchResults); // Non-streaming path — delimiter present message.setContent(SOURCES_STRING2 + extractURLsAndformat(searchResults) + NL2 + message.getContent());
The chat application's non-streaming parser uses the regex
/Sources:([\s\S]*?)(?=\n\n|$)/
to extract the sources block. Without the \n\n boundary, the regex consumes into the main content and the
remainder is dropped.
Steps to Reproduce
- Enable streaming mode in the AI-LLM main chat application window
- Ask a question that triggers RAG (collection search)
- Observe that the response content is truncated or empty
Expected Behavior
Full response is rendered, identical to non-streaming mode.
Actual Behavior
Response content is partially or fully missing when sources are returned.