-
Notifications
You must be signed in to change notification settings - Fork 793
fix(usecase): 修复模型切换时RAG模型更新逻辑错误 #1668
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
base: main
Are you sure you want to change the base?
Conversation
b63251a to
8b2c32c
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.
Pull request overview
This PR fixes a bug in the model switching logic where RAG models were being updated with incorrect settings. The fix ensures that RAG model updates occur before the configuration is persisted, using the old mode settings for proper state transition handling.
Key Changes
- Reordered function calls in
SwitchModeto update RAG models before persisting the new configuration - Refactored
updateRAGModelsByModefunction signature to explicitly pass old and new mode parameters instead of a settings object - Improved parameter clarity by renaming
modetonewModeand extractingoldModeandisManualEmbeddingUpdatedas separate parameters
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
在模型配置组件中,根据模型的is_active状态动态显示不同的背景颜色、文字颜色和状态文本
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.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
当更新RAG模型时,如果找不到活跃模型且模型类型为必需类型(chat/embedding/rerank/analysis),则返回错误
c0e87a1 to
26e4337
Compare
修复模型切换时RAG模型更新逻辑错误
变更类型
请勾选适用的变更类型: