-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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 displaying model description #4503
Conversation
@mushan0x0 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4503 +/- ##
==========================================
- Coverage 92.30% 92.29% -0.01%
==========================================
Files 496 496
Lines 36207 36194 -13
Branches 3440 2178 -1262
==========================================
- Hits 33420 33407 -13
Misses 2787 2787
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
自定义模型如何显示自定义内容呢? |
How does a custom model display custom content? |
自定义显示不了,否则自定义规则就有点复杂了 |
Customization cannot be displayed, otherwise the customization rules would be a bit complicated. |
@mushan0x0 这个样式不是我预期的。之前是计划准备做成类似这样的: |
那到时候应该这个组件都会重构掉吧,要不合了先过渡?或者直接关了这个 PR 吧 |
Then this component should be refactored by then. How about transitioning first? Or just close this PR. |
不会啊,只要单个 RenderItem 外层包一个 Popup ,然后里面写个自定义组件就好了,不需要重构。 如果要合的话,你可以改成 RenderItem 包一个 Tooltip ,然后在右侧展示文本,这样一来倒是渐进式的方案。 |
No, as long as a single RenderItem wraps a Popup in the outer layer, and then writes a custom component inside, there is no need to refactor. If you want to combine it, you can change RenderItem to include a Tooltip, and then display the text on the right side. This is a progressive solution. |
https://github.com/lobehub/lobe-chat/pull/4503/files#diff-6463c8191b7210b5b255fb32837c723b05aedeb63fb181ea9f1a09d57275f3b7R108-R118 这一块逻辑抽为 RenderItem 吗,是的话那我后面改一下 |
https://github.com/lobehub/lobe-chat/pull/4503/files#diff-6463c8191b7210b5b255fb32837c723b05aedeb63fb181ea9f1a09d57275f3b7R108-R118 Is this logic extracted as RenderItem? If so, I will change it later. |
https://github.com/lobehub/lobe-chat/pull/4503/files#diff-6463c8191b7210b5b255fb32837c723b05aedeb63fb181ea9f1a09d57275f3b7R145 这个不就是 RenderItem 嘛,后面升级直接改这个就行了 |
https://github.com/lobehub/lobe-chat/pull/4503/files#diff-6463c8191b7210b5b255fb32837c723b05aedeb63fb181ea9f1a09d57275f3b7R145 Isn’t this just RenderItem? You can just change this when you upgrade later. |
What I mean is to change it in this area instead of putting it in ModelInfoTags. |
噢,这个效果简直棒极了 |
Oh, this effect is amazing |
等你正式实现的时候你就可以改 ModelItemRender 吧,因为现在是复用的是 ModelInfoTags 的代码,过渡的话是不是就这样就行了,这一段代码都是类似的 https://github.com/lobehub/lobe-chat/pull/4503/files#diff-6463c8191b7210b5b255fb32837c723b05aedeb63fb181ea9f1a09d57275f3b7R86-R119 ,放在 ModelItemRender 有些别扭,而且 ModelInfoTags 也是别的地方通用的组件,这样就都有这个详情展示了 |
When you officially implement it, you can change the ModelItemRender, because now the code of ModelInfoTags is reused. If you want to make the transition, just leave it like this. This piece of code is similar https://github.com/lobehub/ lobe-chat/pull/4503/files#diff-6463c8191b7210b5b255fb32837c723b05aedeb63fb181ea9f1a09d57275f3b7R86-R119, it is a bit awkward to put it in ModelItemRender, and ModelInfoTags is also a common component in other places, so this detail is displayed Got it |
这个展示不符合我的预期,后续准备把 cache、video、files 都作为模型能力的 tag 进行展示的,info 那个图标太占位置了。 另外我不觉得应该在配置模型那边加 info。对话那边加是合理的,因为用户第一次来不一定知道不同模型的能力差异,但是在设置里面是不需要的,因为只有进阶一些的用户才会去那边做配置,这个时候再展示这个信息反而是个操作干扰项。 |
This display does not meet my expectations. I plan to display cache, video, and files as model capabilities in the future. The info icon takes up too much space. In addition, I don’t think you should add info to the configuration model. It is reasonable to add it in the dialogue, because the user may not know the difference in capabilities of different models for the first time, but it is not needed in the settings, because only more advanced users will go there to do the configuration. At this time, it is not necessary Displaying this information is an operational distraction. |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
close: #3897
在模型设置的显示
在模型选择的显示
国际化支持
📝 补充信息 | Additional Information