[PR #335] [MERGED] Using OpenAI API locally #3302

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/335
Author: @franzbischoff
Created: 11/6/2023
Status: Merged
Merged: 11/9/2023
Merged by: @timothycarambat

Base: masterHead: feature/localai


📝 Commits (10+)

  • 9afeb69 Using OpenAI API locally
  • 3fa0670 Infinite prompt input and compression implementation (#332)
  • 7d4c7c2 disable import on hosted instances (#339)
  • 4ab38d4 Add support for gpt-4-turbo 128K model (#340)
  • 06620f7 315 show citations based on relevancy score (#316)
  • f0f379a Merge branch 'master' into feature/localai
  • 86fd1ec rename localai to lmstudio
  • d3d9064 forgot files that were renamed
  • ecb6cbf normalize model interface
  • d4ac514 add model and context window limits

📊 Changes

11 files changed (+289 additions, -7 deletions)

View changed files

📝 README.md (+5 -4)
📝 docker/.env.example (+4 -0)
frontend/src/components/LLMSelection/LMStudioOptions/index.jsx (+59 -0)
frontend/src/media/llmprovider/lmstudio.png (+0 -0)
📝 frontend/src/pages/GeneralSettings/LLMPreference/index.jsx (+14 -0)
📝 frontend/src/pages/OnboardingFlow/OnboardingModal/Steps/LLMSelection/index.jsx (+16 -0)
📝 server/.env.example (+5 -1)
📝 server/models/systemSettings.js (+13 -0)
server/utils/AiProviders/lmStudio/index.js (+139 -0)
📝 server/utils/helpers/index.js (+6 -1)
📝 server/utils/helpers/updateENV.js (+28 -1)

📄 Description

This PR implements the basics for using the OpenAI API for connecting to a locally compatible server like gpt4all or lmstudio.ai while keeping separate configurations for the embedding model.

the apps mentioned above are just those I used by chance. Both work very well, but lmstudio.ai allows you to use your GPU along with the CPU. It has a nice browser look that allows you to discover models published on Huggingface.

Refer to issue #313


🔄 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/335 **Author:** [@franzbischoff](https://github.com/franzbischoff) **Created:** 11/6/2023 **Status:** ✅ Merged **Merged:** 11/9/2023 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `feature/localai` --- ### 📝 Commits (10+) - [`9afeb69`](https://github.com/Mintplex-Labs/anything-llm/commit/9afeb69311277ba17df04648fe83c40ff560beb3) Using OpenAI API locally - [`3fa0670`](https://github.com/Mintplex-Labs/anything-llm/commit/3fa06703d079c410b1c5c8737141fd742057113c) Infinite prompt input and compression implementation (#332) - [`7d4c7c2`](https://github.com/Mintplex-Labs/anything-llm/commit/7d4c7c273c4d004ea60523e2d22bb7f4f238a95a) disable import on hosted instances (#339) - [`4ab38d4`](https://github.com/Mintplex-Labs/anything-llm/commit/4ab38d44cef780652848e919a0498156af9223f9) Add support for gpt-4-turbo 128K model (#340) - [`06620f7`](https://github.com/Mintplex-Labs/anything-llm/commit/06620f7a7ae11525a0155477ee0a6d89f471b4c3) 315 show citations based on relevancy score (#316) - [`f0f379a`](https://github.com/Mintplex-Labs/anything-llm/commit/f0f379a08ed4c3f1a446d6e74c1b0b982fd6d511) Merge branch 'master' into feature/localai - [`86fd1ec`](https://github.com/Mintplex-Labs/anything-llm/commit/86fd1ec6a707338e0fa503871914727763178036) rename localai to lmstudio - [`d3d9064`](https://github.com/Mintplex-Labs/anything-llm/commit/d3d906423209cba5d66d1421307990b4818c5b36) forgot files that were renamed - [`ecb6cbf`](https://github.com/Mintplex-Labs/anything-llm/commit/ecb6cbf139cab1391f8cdc915d8f33e4127fe213) normalize model interface - [`d4ac514`](https://github.com/Mintplex-Labs/anything-llm/commit/d4ac5142aafb5347f49a21e6642f0276853afabf) add model and context window limits ### 📊 Changes **11 files changed** (+289 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+5 -4) 📝 `docker/.env.example` (+4 -0) ➕ `frontend/src/components/LLMSelection/LMStudioOptions/index.jsx` (+59 -0) ➕ `frontend/src/media/llmprovider/lmstudio.png` (+0 -0) 📝 `frontend/src/pages/GeneralSettings/LLMPreference/index.jsx` (+14 -0) 📝 `frontend/src/pages/OnboardingFlow/OnboardingModal/Steps/LLMSelection/index.jsx` (+16 -0) 📝 `server/.env.example` (+5 -1) 📝 `server/models/systemSettings.js` (+13 -0) ➕ `server/utils/AiProviders/lmStudio/index.js` (+139 -0) 📝 `server/utils/helpers/index.js` (+6 -1) 📝 `server/utils/helpers/updateENV.js` (+28 -1) </details> ### 📄 Description This PR implements the basics for using the OpenAI API for connecting to a locally compatible server like gpt4all or lmstudio.ai while keeping separate configurations for the embedding model. the apps mentioned above are just those I used by chance. Both work very well, but lmstudio.ai allows you to use your GPU along with the CPU. It has a nice browser look that allows you to discover models published on Huggingface. Refer to issue #313 --- <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:30 -05:00
yindo closed this issue 2026-02-22 18:33:30 -05: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#3302