mirror of
https://github.com/open-webui/pipelines.git
synced 2026-07-20 15:38:19 -04:00
Streaming end is not fully OpenAI compatible. [DONE\n] message missing newline
#144
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:

The issue is that the openai implementation "newlines" the final bracket ("]") in the

[DONE\n]message.Like this:
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.