-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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: 允许用户自行定义 Embedding 模型 #4370
Conversation
@cookieY is attempting to deploy a commit to the LobeChat Community 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4370 +/- ##
==========================================
- Coverage 92.53% 92.21% -0.32%
==========================================
Files 522 571 +49
Lines 37335 43419 +6084
Branches 3664 2519 -1145
==========================================
+ Hits 34547 40040 +5493
- Misses 2788 3379 +591
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
d730ee0
to
f60b6f6
Compare
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.
rag_evals 这部分先不要改,目前暂时没有什么人用的,这个 PR 先把最基础的自定义逻辑理顺加上
另外 rebase 下 main? |
Also rebase main? |
@arvinxx 已根据建议重新更改,解构我会在另提一个 pr |
@arvinxx has changed it according to the suggestion. I will submit another PR to deconstruct it. |
src/config/llm.ts
Outdated
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.
这几个格式化是不是可以先拆出来 merge 掉
模型卡片里面是不是要加 |
Do I need to add |
嗯,后续是要加的。不过这个还不着急,我们这个月有计划会全量改造一下现在的语言模型那块,会分成供应商配置、语言模型、向量化模型、文生图模型、语音模型等等。 |
Well, it will be added later. But don’t worry about it yet. We have plans to completely transform the current language model this month, which will be divided into supplier configuration, language model, vectorization model, Vincentian graph model, speech model, etc. |
### [Version 1.35.2](lobehub/lobe-chat@v1.35.1...v1.35.2) <sup>Released on **2024-12-01**</sup> #### 💄 Styles - **misc**: Improve i18n. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Styles * **misc**: Improve i18n, closes [lobehub#4857](lobehub#4857) ([4b7dbc0](lobehub@4b7dbc0)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
@escapeWu Well, we can move forward. |
### [Version 1.39.2](lobehub/lobe-chat@v1.39.1...v1.39.2) <sup>Released on **2024-12-25**</sup> #### ♻ Code Refactoring - **misc**: Refactor sensenova provider with LobeOpenAICompatibleFactory. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Refactor sensenova provider with LobeOpenAICompatibleFactory, closes [lobehub#5116](lobehub#5116) ([5656f39](lobehub@5656f39)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
* 测试 ppr * fix * fix loading on home * fix style * fix * fix * fix type * try to fix * fix * Delete src/app/(main)/chat/@session/loading.tsx * refactor * fix setting layout * fix loading style * fix import * Update loading.tsx * fix lint
### [Version 1.39.3](lobehub/lobe-chat@v1.39.2...v1.39.3) <sup>Released on **2024-12-25**</sup> #### 💄 Styles - **misc**: Improve loading brand. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Styles * **misc**: Improve loading brand, closes [lobehub#5165](lobehub#5165) ([9684c98](lobehub@9684c98)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
本次变更主要实现了embedding 模型可配置性
通过新增环境变量DEFAULT_FILES_CONFIG实现可自主配置embedding 模型, provider基于现有模型供应商列表
示例:
以 / 为分隔符 openai 为模型提供商, text-embedding-3-small为 embedding 模型
📝 补充信息 | Additional Information
目前已支持 zhipu/github/openai/bedrock/ollama模型提供商的embedding 模型
可在agent-runtime下对各模型提供商实现 embeddings 方法从而增加 embedding 模型支持
为后续检索策略预留 rerank 模型以及查询模式变量入口