-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ feat: support to customize Embedding model with env #5177
Conversation
@cookieY is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
👍 @cookieY Thank you for raising your pull request and contributing to our Community |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5177 +/- ##
==========================================
- Coverage 93.09% 92.98% -0.12%
==========================================
Files 631 634 +3
Lines 55424 55642 +218
Branches 2696 2904 +208
==========================================
+ Hits 51596 51736 +140
- Misses 3828 3906 +78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
支不支持本地部署的embedding模型?例如 api 地址是 http://127.0.0.1/v1 的类 openai 接口? |
Does it support locally deployed embedding models? For example, the api address is an openai-like interface at http://127.0.0.1/v1? |
基于现有的框架设计无法实现这样的自定义需求,本地部署可以使用 ollama |
Such custom requirements cannot be achieved based on the existing framework design. For local deployment, ollama can be used. |
@arvinxx 已根据建议全部进行修改 |
@arvinxx All modifications have been made based on suggestions |
期待尽快合并!! |
Looking forward to merging soon! ! |
looking forward to seeing the change soon |
期待尽快合并!! |
Looking forward to merging soon! ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
再改一轮,就差不多了
- Update the file configuration and standardize the model naming to camel case.
@arvinxx 已修改完毕 |
@arvinxx has been modified |
Can both custom baseurl and embedded model names be supported? |
期待 |
expectations |
Deployment failed with the following error:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
❤️ Great PR @cookieY ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
## [Version 1.46.0](v1.45.17...v1.46.0) <sup>Released on **2025-01-15**</sup> #### ✨ Features - **misc**: Add lm studio provider, support to customize Embedding model with env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add lm studio provider, closes [#4483](#4483) ([0ac5802](0ac5802)) * **misc**: Support to customize Embedding model with env, closes [#5177](#5177) ([eed9357](eed9357)) </details> <div align="right"> [](#readme-top) </div>
🎉 This PR is included in version 1.46.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [Version 1.88.0](v1.87.8...v1.88.0) <sup>Released on **2025-01-15**</sup> #### ✨ Features - **misc**: Add lm studio provider, support to customize Embedding model with env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add lm studio provider, closes [lobehub#4483](https://github.com/bentwnghk/lobe-chat/issues/4483) ([0ac5802](0ac5802)) * **misc**: Support to customize Embedding model with env, closes [lobehub#5177](https://github.com/bentwnghk/lobe-chat/issues/5177) ([eed9357](eed9357)) </details> <div align="right"> [](#readme-top) </div>
great timing on this feature. is the docker images lobehub/lobe-chat-database updated? |
was able to test this out. After figuring out a correct embedding model for ollama: xiaoming/bce-embedding-base_v1 and trying both the proxy OpenAI Url and the ollama url:
I get the following vague errors:
It does appear to be chunking, and takes ~a minute to respond. I'm running everything inside a container and have had to reroute some hosts requests. |
@disarticulate Same here, trying to figure it out but I get always those type of errors. |
I also discovered a ollama error that returns errots based on embedding
ctx. I got it to work wiyh ollama/quentinz/bge-large-zh-v1.5:latest
…On Mon, Jan 20, 2025, 06:47 Henry Yee ***@***.***> wrote:
was able to test this out.
After figuring out a correct embedding model for ollama:
xiaoming/bce-embedding-base_v1 and trying both the proxy OpenAI Url and the
ollama url:
DEFAULT_FILES_CONFIG=embedding_model=ollama/xiaoming/bce-embedding-base_v1
DEFAULT_FILES_CONFIG=embedding_model=openai/xiaoming/bce-embedding-base_v1
I get the following vague errors:
#DEFAULT_FILES_CONFIG=embedding_model=ollama/xiaoming/bce-embedding-base_v1
embeddingChunks error {
2025-01-19 07:47:39 message: '{"error":{"message":"[object Object]","name":"ResponseError","status_code":500},"errorType":"OllamaBizError","provider":"ollama"}',
2025-01-19 07:47:39 name: 'EmbeddingError'
2025-01-19 07:47:39 }
#DEFAULT_FILES_CONFIG=embedding_model=openai/xiaoming/bce-embedding-base_v1
embeddingChunks error {
2025-01-19 07:52:24 message: '{"endpoint":"http://vineyard_ollama:****/v1","error":{"headers":{"content-length":"0","content-type":"application/json; charset=utf-8","date":"Sun, 19 Jan 2025 13:52:24 GMT"},"stack":"Error: 500 status code (no body)\\n at eV.generate (/app/.next/server/chunks/67863.js:41:23151)\\n at r3.makeStatusError (/app/.next/server/chunks/67863.js:41:36093)\\n at r3.makeRequest (/app/.next/server/chunks/67863.js:41:37037)\\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\\n at async Object.embeddings (/app/.next/server/chunks/9992.js:1:7027)\\n at async concurrency (/app/.next/server/app/(backend)/trpc/async/[trpc]/route.js:1:4431)\\n at async /app/.next/server/chunks/42368.js:51:290507","status":500},"errorType":"ProviderBizError","provider":"openai"}',
2025-01-19 07:52:24 name: 'EmbeddingError'
2025-01-19 07:52:24 }
It does appear to be chunking, and takes ~a minute to respond. I'm running
everything inside a container and have had to reroute some hosts requests.
@disarticulate <https://github.com/disarticulate> Same here, trying to
figure it out but I get always those type of errors.
The issue seems to be related to not considering multiple slashes (/) when
parsing configuration data. I will submit a PR to resolve this issue.
—
Reply to this email directly, view it on GitHub
<#5177 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFHWPPWTM2QSHRSZMCIRAL2LTV6FAVCNFSM6AAAAABUF2LTLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBSGMZTSOBUGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Mine is showing this
|
* feat: 添加嵌入模型配置支持,更新相关文档和测试 * feat: 重构文件配置,更新默认设置和相关测试 * ♻ Code Refactoring - Update the file configuration and standardize the model naming to camel case.
## [Version 1.46.0](lobehub/lobe-chat@v1.45.17...v1.46.0) <sup>Released on **2025-01-15**</sup> #### ✨ Features - **misc**: Add lm studio provider, support to customize Embedding model with env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add lm studio provider, closes [lobehub#4483](lobehub#4483) ([0ac5802](lobehub@0ac5802)) * **misc**: Support to customize Embedding model with env, closes [lobehub#5177](lobehub#5177) ([eed9357](lobehub@eed9357)) </details> <div align="right"> [](#readme-top) </div>
* feat: 添加嵌入模型配置支持,更新相关文档和测试 * feat: 重构文件配置,更新默认设置和相关测试 * ♻ Code Refactoring - Update the file configuration and standardize the model naming to camel case.
## [Version 1.46.0](lobehub/lobe-chat@v1.45.17...v1.46.0) <sup>Released on **2025-01-15**</sup> #### ✨ Features - **misc**: Add lm studio provider, support to customize Embedding model with env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Add lm studio provider, closes [lobehub#4483](lobehub#4483) ([0ac5802](lobehub@0ac5802)) * **misc**: Support to customize Embedding model with env, closes [lobehub#5177](lobehub#5177) ([eed9357](lobehub@eed9357)) </details> <div align="right"> [](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information
由于之前代码commit差距过大 重新提交,提交说明参考 #4370