[PR #892] [MERGED] Stop generation button during stream-response #3523

Closed
opened 2026-02-22 18:33:57 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/892
Author: @timothycarambat
Created: 3/11/2024
Status: Merged
Merged: 3/12/2024
Merged by: @timothycarambat

Base: masterHead: 540-stop-generation-button


📝 Commits (4)

  • aab9749 Stop generation button during stream-response
  • ff717be Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into 540-stop-generation-button
  • c54bbd4 add custom stop icon
  • 91eea3a add stop to thread chats

📊 Changes

16 files changed (+236 additions, -27 deletions)

View changed files

frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/StopGenerationButton/index.jsx (+50 -0)
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/StopGenerationButton/stop.svg (+4 -0)
📝 frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx (+13 -13)
📝 frontend/src/components/WorkspaceChat/ChatContainer/index.jsx (+1 -5)
📝 frontend/src/models/workspace.js (+11 -0)
📝 frontend/src/models/workspaceThread.js (+11 -0)
📝 frontend/src/utils/chat/index.js (+18 -0)
📝 server/utils/AiProviders/anthropic/index.js (+12 -1)
📝 server/utils/AiProviders/azureOpenAi/index.js (+13 -1)
📝 server/utils/AiProviders/gemini/index.js (+13 -1)
📝 server/utils/AiProviders/huggingface/index.js (+15 -1)
📝 server/utils/AiProviders/native/index.js (+13 -1)
📝 server/utils/AiProviders/ollama/index.js (+15 -2)
📝 server/utils/AiProviders/openRouter/index.js (+14 -1)
📝 server/utils/AiProviders/togetherAi/index.js (+14 -1)
📝 server/utils/helpers/chat/responses.js (+19 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #540

What is in this change?

Implement stop generation button during pending streaming response that prevents the response from continuing but preserves the already rendered and stored text.

This executes on the client side as well as termination of the connection on express side.

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 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/Mintplex-Labs/anything-llm/pull/892 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 3/11/2024 **Status:** ✅ Merged **Merged:** 3/12/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `540-stop-generation-button` --- ### 📝 Commits (4) - [`aab9749`](https://github.com/Mintplex-Labs/anything-llm/commit/aab97491437ceb8ce80ddec93b31e594e4854ea4) Stop generation button during stream-response - [`ff717be`](https://github.com/Mintplex-Labs/anything-llm/commit/ff717be04acbc03796b3bb024cce28927189fdc2) Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into 540-stop-generation-button - [`c54bbd4`](https://github.com/Mintplex-Labs/anything-llm/commit/c54bbd4848dbd22498d61a045c1e44b1e8cc7bb8) add custom stop icon - [`91eea3a`](https://github.com/Mintplex-Labs/anything-llm/commit/91eea3acfb4d90d5301c1dc440a9feb6a18ee085) add stop to thread chats ### 📊 Changes **16 files changed** (+236 additions, -27 deletions) <details> <summary>View changed files</summary> ➕ `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/StopGenerationButton/index.jsx` (+50 -0) ➕ `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/StopGenerationButton/stop.svg` (+4 -0) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx` (+13 -13) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/index.jsx` (+1 -5) 📝 `frontend/src/models/workspace.js` (+11 -0) 📝 `frontend/src/models/workspaceThread.js` (+11 -0) 📝 `frontend/src/utils/chat/index.js` (+18 -0) 📝 `server/utils/AiProviders/anthropic/index.js` (+12 -1) 📝 `server/utils/AiProviders/azureOpenAi/index.js` (+13 -1) 📝 `server/utils/AiProviders/gemini/index.js` (+13 -1) 📝 `server/utils/AiProviders/huggingface/index.js` (+15 -1) 📝 `server/utils/AiProviders/native/index.js` (+13 -1) 📝 `server/utils/AiProviders/ollama/index.js` (+15 -2) 📝 `server/utils/AiProviders/openRouter/index.js` (+14 -1) 📝 `server/utils/AiProviders/togetherAi/index.js` (+14 -1) 📝 `server/utils/helpers/chat/responses.js` (+19 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #540 ### What is in this change? Implement stop generation button during pending streaming response that prevents the response from continuing but preserves the already rendered and stored text. This executes on the client side as well as termination of the connection on express side. ### Additional Information ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:33:57 -05:00
yindo closed this issue 2026-02-22 18:33:57 -05:00
yindo changed title from [PR #892] Stop generation button during stream-response to [PR #892] [MERGED] Stop generation button during stream-response 2026-06-05 15:13:52 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3523