|
| 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{}}}: {code:java} // 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()); {code} The chat application's non-streaming parser uses the regex
{code:java} /Sources:([\s\S]*?)(?=\n\n|$)/ {code} to extract the sources block. Without the {{\n\n}} boundary, the regex consumes into the main content and the remainder is dropped. h3. 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
h3. Expected Behavior
Full response is rendered, identical to non-streaming mode. h3. Actual Behavior
Response content is partially or fully missing when sources are returned. |
|