Target branch: Pull requests should target the dev branch.
Description: Briefly describe the changes in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for the changes?
Code Review: Have you self-reviewed your code and addressed any coding standard issues?
Description
Extract error fields from SSE messages if they are present
Add the error message to the chat instead of only having it in the toast:
Changelog Entry
Fixed
OpenAI Error Handling: Improved handling of OpenAI errors, providing more informative error messages within the chat interface.
🔄 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/2183
**Author:** [@cheahjs](https://github.com/cheahjs)
**Created:** 5/11/2024
**Status:** ✅ Merged
**Merged:** 5/13/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `fix/streaming-error`
---
### 📝 Commits (1)
- [`3113825`](https://github.com/open-webui/open-webui/commit/311382589568dc3d504095ec8c69086590a9fab0) feat: better handle openai errors, add error message to message
### 📊 Changes
**3 files changed** (+320 additions, -278 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/apis/streaming/index.ts` (+7 -0)
📝 `src/routes/(app)/+page.svelte` (+157 -139)
📝 `src/routes/(app)/c/[id]/+page.svelte` (+156 -139)
</details>
### 📄 Description
## Pull Request Checklist
- [x] **Target branch:** Pull requests should target the `dev` branch.
- [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 [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests for the changes?
- [ ] **Code Review:** Have you self-reviewed your code and addressed any coding standard issues?
---
## Description
1. Extract `error` fields from SSE messages if they are present
2. Add the error message to the chat instead of only having it in the toast:


---
### Changelog Entry
### Fixed
- **OpenAI Error Handling**: Improved handling of OpenAI errors, providing more informative error messages within the chat interface.
---
<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/2183
Author: @cheahjs
Created: 5/11/2024
Status: ✅ Merged
Merged: 5/13/2024
Merged by: @tjbck
Base:
dev← Head:fix/streaming-error📝 Commits (1)
3113825feat: better handle openai errors, add error message to message📊 Changes
3 files changed (+320 additions, -278 deletions)
View changed files
📝
src/lib/apis/streaming/index.ts(+7 -0)📝
src/routes/(app)/+page.svelte(+157 -139)📝
src/routes/(app)/c/[id]/+page.svelte(+156 -139)📄 Description
Pull Request Checklist
devbranch.Description
errorfields from SSE messages if they are presentChangelog Entry
Fixed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.