feat(database): add repairSmokeAIAdviceIndexes function and corresponding tests
- Implemented repairSmokeAIAdviceIndexes to manage the unique index for fa_smoke_ai_advice. - Added unit tests for the new function to ensure correct index recreation and validation. - Updated AutoMigrate to include the new index repair function.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package service
|
||||
|
||||
import "strings"
|
||||
|
||||
// preferredSmokeAIModel 避免把高延迟 reasoning 模型用于首页/计划类交互接口。
|
||||
func preferredSmokeAIModel(model string) string {
|
||||
normalized := strings.TrimSpace(model)
|
||||
lower := strings.ToLower(normalized)
|
||||
if strings.Contains(lower, "deepseek") && strings.Contains(lower, "reasoner") {
|
||||
return "deepseek-chat"
|
||||
}
|
||||
return normalized
|
||||
}
|
||||
Reference in New Issue
Block a user