-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
♻️ refactor: improve model fetch behavior #6055
Conversation
@hezhijie0327 is attempting to deploy a commit to the LobeChat Community Team on Vercel. A member of the Team first needs to authorize it. |
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 #6055 +/- ##
==========================================
- Coverage 92.47% 91.77% -0.70%
==========================================
Files 661 660 -1
Lines 60005 60495 +490
Branches 4212 2840 -1372
==========================================
+ Hits 55488 55520 +32
- Misses 4517 4975 +458
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
有一个唯一的问题。Model List 那个导入最好是在 model() 拉取方法中异步获取。
const { LOBE_DEFAULT_MODEL_LIST } = await import('@/config/aiModels');
原因是后续随着 provider 数量增加,这部分的数据体积也会很大,这部分要做成按需导入的形式会比较好,未来能降低产物的体积
改好了 |
Improved |
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.
LGTM.
留个思考,目前每个 provider 都几乎等于重写了 models 方法,后续有没有可能把 models 的拉取方法弄一版内置到 openaiFactory 里,然后在外部用配置式的方式完成细节调整?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
❤️ Great PR @hezhijie0327 ❤️ 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.53.12](v1.53.11...v1.53.12) <sup>Released on **2025-02-14**</sup> #### ♻ Code Refactoring - **misc**: Improve model fetch behavior. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Improve model fetch behavior, closes [#6055](#6055) ([4c2aaf6](4c2aaf6)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 1.53.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* ♻️ refactor: refactor model fetch behavior * 🐛 fix: fix gemini thinking model set functionCall tag * 🐛 fix: fix Spark fc tag missing * ✨ feat: add model fetch support for Tencent Cloud * ♻️ refactor: refactor import `LOBE_DEFAULT_MODEL_LIST` with async method - Part 1 * ♻️ refactor: refactor import LOBE_DEFAULT_MODEL_LIST with async method - Part 2 * 🔨 chore: add vision, reasoning, fc default value * ♻️ refactor: improve knownModel matching * 🐛 fix: fix ci error
### [Version 1.53.12](lobehub/lobe-chat@v1.53.11...v1.53.12) <sup>Released on **2025-02-14**</sup> #### ♻ Code Refactoring - **misc**: Improve model fetch behavior. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Improve model fetch behavior, closes [lobehub#6055](lobehub#6055) ([4c2aaf6](lobehub@4c2aaf6)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
### [Version 1.95.5](v1.95.4...v1.95.5) <sup>Released on **2025-02-14**</sup> #### ♻ Code Refactoring - **misc**: Improve model fetch behavior. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Improve model fetch behavior, closes [lobehub#6055](https://github.com/bentwnghk/lobe-chat/issues/6055) ([4c2aaf6](4c2aaf6)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
Perfect,点个大大的赞,成功修复问题了 |
Perfect, please give me a big thumbs up and successfully fixed the problem |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
LOBE_DEFAULT_MODEL_LIST
[TODO]📝 补充信息 | Additional Information
close #5887