generated from JetBrains/intellij-platform-plugin-template
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSEFormatException: Invalid sse format! ': ping #97
Comments
phodal
added a commit
that referenced
this issue
Mar 5, 2024
Previously, the response body callback would crash when encountering an empty line followed by a non-null SSE instance, or when receiving a "ping" event. This commit adds a check to handle both scenarios gracefully by ignoring the "ping" events and resetting the SSE instance when an empty line is received. This ensures the stability and reliability of the response handling logic.
phodal
added a commit
that referenced
this issue
Mar 5, 2024
Refactored the Server Sent Event (SSE) parsing logic to handle edge cases better and make code cleaner. The new approach fixes #16 which involved adding checks on whether incoming events were `"ping":` or just starting with `":"` followed by "ping". It also added functionality to clear chat window before showing new messages while creating a new conversation using NewChatAction component. Made this change because it enhances user experience by providing smoother interaction between server push notifications and client display of those notifications. Modified these files accordingly as per suggestions from SonarLint analysis.
Notes: SSE-Starlette support for ping event |
phodal
added a commit
that referenced
this issue
Mar 5, 2024
Previously, the SSE parser did not correctly handle empty lines and comments, which could lead to parsing errors. This commit addresses the issue by skipping empty lines and treating lines starting with `:` as comments, as per the SSE format specification. This change ensures that the SSE parser is more robust and adheres to the standard.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error message: "2024-03-05 10:07:20,046 [1749283] SEVERE - #cc.unitmesh.devti.util.LLMCoroutineScope - java.io.IOException: com.theokanning.openai.service.SSEFormatException: Invalid sse format! ': ping - 2024-03-05 02:07:20.310586'
java.lang.RuntimeException: java.io.IOException: com.theokanning.openai.service.SSEFormatException: Invalid sse format! ': ping - 2024-03-05 02:07:20.310586'"
Ide version: 232
The text was updated successfully, but these errors were encountered: