🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/1795
**Author:** [@cheahjs](https://github.com/cheahjs)
**Created:** 4/27/2024
**Status:** ✅ Merged
**Merged:** 4/27/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `fix/openai-handle-carriage-returns`
---
### 📝 Commits (1)
- [`be038ab`](https://github.com/open-webui/open-webui/commit/be038ab87814a93db238d9b0ebbdfe5e7c6a6317) fix: handle carriage returns in OpenAI streams
### 📊 Changes
**1 file changed** (+5 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/apis/streaming/index.ts` (+5 -1)
</details>
### 📄 Description
## Pull Request Checklist
- [x] **Description:** Briefly describe the changes in this pull request.
- [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation?
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
---
## Description
Trim trailing carriage returns from OpenAI responses. Carriage returns won't break after https://github.com/open-webui/open-webui/pull/1780 was merged, but this will prevent errors from being logged.
We should probably switch to using something that is more spec-compliant, like https://github.com/openai/openai-node/blob/master/src/streaming.ts potentially (licensed under Apache)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/1795
Author: @cheahjs
Created: 4/27/2024
Status: ✅ Merged
Merged: 4/27/2024
Merged by: @tjbck
Base:
dev← Head:fix/openai-handle-carriage-returns📝 Commits (1)
be038abfix: handle carriage returns in OpenAI streams📊 Changes
1 file changed (+5 additions, -1 deletions)
View changed files
📝
src/lib/apis/streaming/index.ts(+5 -1)📄 Description
Pull Request Checklist
Description
Trim trailing carriage returns from OpenAI responses. Carriage returns won't break after https://github.com/open-webui/open-webui/pull/1780 was merged, but this will prevent errors from being logged.
We should probably switch to using something that is more spec-compliant, like https://github.com/openai/openai-node/blob/master/src/streaming.ts potentially (licensed under Apache)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.