|
| Description: |
Environment: Update: Fixed in version 0.10
- XWiki on Debian 13 / Tomcat 11 - LLM Application (BETA) 0.9 + Index for the LLM Application 0.9 - Backend: Ollama 0.34.0 (OpenAI-compatible /v1 API) behind a Caddy reverse proxy with flush_interval -1 (no buffering) - Model: gemma3:12b, RAG context enabled (8 chunks, ~2000 chars each) - "Can Stream" enabled on the server configuration
Steps to reproduce: 1. Ask a question that produces a long streamed response (RAG context included, total response body roughly 12-17 KB) 2. Intermittently, the chat shows: "An error occurred: Unterminated string in JSON at position 13303 (line 1 column 13304)"
Observed on multiple occasions at different positions (12363, 13303, 17438), always mid-string, always on longer responses. Short responses stream fine.
Workaround: unchecking "Can Stream" on the server configuration makes the problem disappear entirely, so the response content itself is valid. This suggests the client-side parser fails when a JSON string is split across SSE chunk boundaries. |
|