Streaming end is not fully OpenAI compatible. [DONE\n] message missing newline #144

Open
opened 2026-02-15 19:16:15 -05:00 by yindo · 0 comments
Owner

Originally created by @AlexanderZhk on GitHub (Oct 14, 2024).

Noticed this behaviour in the CodeGPT plugin (https://github.com/appleboy/CodeGPT) when using with pipelines:
image

The issue is that the openai implementation "newlines" the final bracket ("]") in the [DONE\n] message.
Like this:
image

However, in the pipelines implementation, the [DONE\n] message does not have the newline character:
https://github.com/open-webui/pipelines/blob/c1dd8987d4d538d27d46f747f7f6c138f73937ae/main.py#L734

Changing this line to yield f"data: [DONE\n]" would increase the openai compatibility of Pipelines.

Tested with the CodeGPT plugin - works correctly with this change.

Originally created by @AlexanderZhk on GitHub (Oct 14, 2024). Noticed this behaviour in the CodeGPT plugin ([https://github.com/appleboy/CodeGPT](https://github.com/appleboy/CodeGPT)) when using with pipelines: ![image](https://github.com/user-attachments/assets/9af9d5a7-c98a-4d07-a060-b01f083d2749) The issue is that the openai implementation "newlines" the final bracket ("]") in the `[DONE\n]` message. Like this: ![image](https://github.com/user-attachments/assets/6b81f5ae-b674-42d8-86fd-7d30ab17fa7c) However, in the pipelines implementation, the `[DONE\n]` message does not have the newline character: https://github.com/open-webui/pipelines/blob/c1dd8987d4d538d27d46f747f7f6c138f73937ae/main.py#L734 Changing this line to `yield f"data: [DONE\n]"` would increase the openai compatibility of Pipelines. Tested with the CodeGPT plugin - works correctly with this change.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/pipelines#144