[PR #1021] [MERGED] feat: add LocalAI local embedding model support #22841

Closed
opened 2026-02-21 20:19:52 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/1021
Author: @takatost
Created: 8/25/2023
Status: Merged
Merged: 8/29/2023
Merged by: @takatost

Base: mainHead: feat/localai-embedding-support


📝 Commits (6)

  • cf5590e feat: add localai local embedding model support
  • 39edc56 feat: add tests
  • efd791f feat: frontend add localai
  • 3592cfd feat: add localai text generation support
  • 08ed0b0 feat: embedding model name customize
  • 773b3b0 fix: localai field

📊 Changes

24 files changed (+1144 additions, -7 deletions)

View changed files

📝 api/core/model_providers/model_provider_factory.py (+3 -0)
api/core/model_providers/models/embedding/localai_embedding.py (+29 -0)
api/core/model_providers/models/llm/localai_model.py (+131 -0)
api/core/model_providers/providers/localai_provider.py (+164 -0)
📝 api/core/model_providers/rules/_providers.json (+2 -1)
api/core/model_providers/rules/localai.json (+7 -0)
📝 api/core/third_party/langchain/llms/chat_open_ai.py (+2 -1)
📝 api/core/third_party/langchain/llms/open_ai.py (+32 -3)
📝 api/tests/integration_tests/.env.example (+4 -1)
api/tests/integration_tests/models/embedding/test_localai_embedding.py (+61 -0)
api/tests/integration_tests/models/llm/test_localai_model.py (+68 -0)
api/tests/unit_tests/model_providers/test_localai_provider.py (+116 -0)
web/app/components/base/icons/assets/public/llm/localai-text.svg (+22 -0)
web/app/components/base/icons/assets/public/llm/localai.svg (+15 -0)
web/app/components/base/icons/src/public/llm/Localai.json (+107 -0)
web/app/components/base/icons/src/public/llm/Localai.tsx (+14 -0)
web/app/components/base/icons/src/public/llm/LocalaiText.json (+170 -0)
web/app/components/base/icons/src/public/llm/LocalaiText.tsx (+14 -0)
📝 web/app/components/base/icons/src/public/llm/index.ts (+2 -0)
📝 web/app/components/header/account-setting/model-page/configs/index.ts (+2 -0)

...and 4 more files

📄 Description

No description provided


🔄 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/langgenius/dify/pull/1021 **Author:** [@takatost](https://github.com/takatost) **Created:** 8/25/2023 **Status:** ✅ Merged **Merged:** 8/29/2023 **Merged by:** [@takatost](https://github.com/takatost) **Base:** `main` ← **Head:** `feat/localai-embedding-support` --- ### 📝 Commits (6) - [`cf5590e`](https://github.com/langgenius/dify/commit/cf5590e9be06f14be8e349d57a1307af39cee5af) feat: add localai local embedding model support - [`39edc56`](https://github.com/langgenius/dify/commit/39edc5623fe2791d3e1fe633e452333187e6dc8a) feat: add tests - [`efd791f`](https://github.com/langgenius/dify/commit/efd791facb27dc193eb1d14fba03a66735c6aeed) feat: frontend add localai - [`3592cfd`](https://github.com/langgenius/dify/commit/3592cfda5526746a90f0fcc4da54d5ef5665d0e6) feat: add localai text generation support - [`08ed0b0`](https://github.com/langgenius/dify/commit/08ed0b04e9282fc269e8cb5655356ea39ebbdcd6) feat: embedding model name customize - [`773b3b0`](https://github.com/langgenius/dify/commit/773b3b0023696225b490ce3b58288752a6e6dc77) fix: localai field ### 📊 Changes **24 files changed** (+1144 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `api/core/model_providers/model_provider_factory.py` (+3 -0) ➕ `api/core/model_providers/models/embedding/localai_embedding.py` (+29 -0) ➕ `api/core/model_providers/models/llm/localai_model.py` (+131 -0) ➕ `api/core/model_providers/providers/localai_provider.py` (+164 -0) 📝 `api/core/model_providers/rules/_providers.json` (+2 -1) ➕ `api/core/model_providers/rules/localai.json` (+7 -0) 📝 `api/core/third_party/langchain/llms/chat_open_ai.py` (+2 -1) 📝 `api/core/third_party/langchain/llms/open_ai.py` (+32 -3) 📝 `api/tests/integration_tests/.env.example` (+4 -1) ➕ `api/tests/integration_tests/models/embedding/test_localai_embedding.py` (+61 -0) ➕ `api/tests/integration_tests/models/llm/test_localai_model.py` (+68 -0) ➕ `api/tests/unit_tests/model_providers/test_localai_provider.py` (+116 -0) ➕ `web/app/components/base/icons/assets/public/llm/localai-text.svg` (+22 -0) ➕ `web/app/components/base/icons/assets/public/llm/localai.svg` (+15 -0) ➕ `web/app/components/base/icons/src/public/llm/Localai.json` (+107 -0) ➕ `web/app/components/base/icons/src/public/llm/Localai.tsx` (+14 -0) ➕ `web/app/components/base/icons/src/public/llm/LocalaiText.json` (+170 -0) ➕ `web/app/components/base/icons/src/public/llm/LocalaiText.tsx` (+14 -0) 📝 `web/app/components/base/icons/src/public/llm/index.ts` (+2 -0) 📝 `web/app/components/header/account-setting/model-page/configs/index.ts` (+2 -0) _...and 4 more files_ </details> ### 📄 Description _No description provided_ --- <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-21 20:19:52 -05:00
yindo closed this issue 2026-02-21 20:19:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22841