[PR #685] [MERGED] Refactor handleStream to LLM Classes #3460

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/685
Author: @timothycarambat
Created: 2/6/2024
Status: Merged
Merged: 2/7/2024
Merged by: @timothycarambat

Base: masterHead: 684-refactor-handle-stream


📝 Commits (1)

  • 5f8bbc0 Refactor handleStream to LLM Classes

📊 Changes

12 files changed (+374 additions, -307 deletions)

View changed files

📝 server/utils/AiProviders/azureOpenAi/index.js (+36 -2)
📝 server/utils/AiProviders/gemini/index.js (+32 -2)
📝 server/utils/AiProviders/huggingface/index.js (+111 -2)
📝 server/utils/AiProviders/lmStudio/index.js (+5 -0)
📝 server/utils/AiProviders/localAi/index.js (+5 -0)
📝 server/utils/AiProviders/mistral/index.js (+5 -0)
📝 server/utils/AiProviders/native/index.js (+36 -0)
📝 server/utils/AiProviders/ollama/index.js (+36 -0)
📝 server/utils/AiProviders/openAi/index.js (+5 -0)
📝 server/utils/AiProviders/togetherAi/index.js (+95 -2)
📝 server/utils/chats/embed.js (+3 -3)
📝 server/utils/chats/stream.js (+5 -296)

📄 Description

Pull Request Type

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

Relevant Issues

resolves #684

What is in this change?

Refactors all instances of handleStreamResponses to a single class method on the LLMProvider itself.

Additional Information

Add any other context about the Pull Request here that was not captured above.

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
  • Tested all providers

🔄 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/685 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 2/6/2024 **Status:** ✅ Merged **Merged:** 2/7/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `684-refactor-handle-stream` --- ### 📝 Commits (1) - [`5f8bbc0`](https://github.com/Mintplex-Labs/anything-llm/commit/5f8bbc0f071cd78573c9f8f3e79da1ca519974aa) Refactor handleStream to LLM Classes ### 📊 Changes **12 files changed** (+374 additions, -307 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/AiProviders/azureOpenAi/index.js` (+36 -2) 📝 `server/utils/AiProviders/gemini/index.js` (+32 -2) 📝 `server/utils/AiProviders/huggingface/index.js` (+111 -2) 📝 `server/utils/AiProviders/lmStudio/index.js` (+5 -0) 📝 `server/utils/AiProviders/localAi/index.js` (+5 -0) 📝 `server/utils/AiProviders/mistral/index.js` (+5 -0) 📝 `server/utils/AiProviders/native/index.js` (+36 -0) 📝 `server/utils/AiProviders/ollama/index.js` (+36 -0) 📝 `server/utils/AiProviders/openAi/index.js` (+5 -0) 📝 `server/utils/AiProviders/togetherAi/index.js` (+95 -2) 📝 `server/utils/chats/embed.js` (+3 -3) 📝 `server/utils/chats/stream.js` (+5 -296) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #684 ### What is in this change? Refactors all instances of `handleStreamResponses` to a single class method on the LLMProvider itself. ### Additional Information Add any other context about the Pull Request here that was not captured above. ### 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 - [x] Tested all providers --- <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:49 -05:00
yindo closed this issue 2026-02-22 18:33:50 -05:00
yindo changed title from [PR #685] Refactor handleStream to LLM Classes to [PR #685] [MERGED] Refactor handleStream to LLM Classes 2026-06-05 15:13:31 -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#3460