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?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Description
Attach an abort controller to the OpenAI streaming completion call and abort generation when pressing the stop button.
Previously, the request was not aborted or closed, so it would still be streaming in events in the background.
Changelog Entry
Added
[List any new features or additions]
Fixed
[List any fixes or corrections]
Changed
[List any changes or updates]
Removed
[List any removed features or files]
🔄 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/1798
**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:** `feat/abort-openai-responses-on-stop`
---
### 📝 Commits (1)
- [`c095a7c`](https://github.com/open-webui/open-webui/commit/c095a7c2911d8ad7c563e1f30fa589ab1170ead4) feat: abort openai text completion when stopping responses
### 📊 Changes
**4 files changed** (+20 additions, -8 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/apis/openai/index.ts` (+4 -2)
📝 `src/routes/(app)/+page.svelte` (+6 -1)
📝 `src/routes/(app)/c/[id]/+page.svelte` (+6 -1)
📝 `src/routes/(app)/playground/+page.svelte` (+4 -4)
</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
Attach an abort controller to the OpenAI streaming completion call and abort generation when pressing the stop button.
Previously, the request was not aborted or closed, so it would still be streaming in events in the background.
---
### Changelog Entry
### Added
- [List any new features or additions]
### Fixed
- [List any fixes or corrections]
### Changed
- [List any changes or updates]
### Removed
- [List any removed features or files]
---
<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/1798
Author: @cheahjs
Created: 4/27/2024
Status: ✅ Merged
Merged: 4/27/2024
Merged by: @tjbck
Base:
dev← Head:feat/abort-openai-responses-on-stop📝 Commits (1)
c095a7cfeat: abort openai text completion when stopping responses📊 Changes
4 files changed (+20 additions, -8 deletions)
View changed files
📝
src/lib/apis/openai/index.ts(+4 -2)📝
src/routes/(app)/+page.svelte(+6 -1)📝
src/routes/(app)/c/[id]/+page.svelte(+6 -1)📝
src/routes/(app)/playground/+page.svelte(+4 -4)📄 Description
Pull Request Checklist
Description
Attach an abort controller to the OpenAI streaming completion call and abort generation when pressing the stop button.
Previously, the request was not aborted or closed, so it would still be streaming in events in the background.
Changelog Entry
Added
Fixed
Changed
Removed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.