mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-10 10:33:41 +08:00
revert: Rework text model logic and update dependencies
- Rewrite model name for relay text - Simplify logic and move logging statements - Remove a check that filtered out models by model-mapping - Remove abilities for the model mapping - Lower numeric tolerance for test files
This commit is contained in:
@@ -55,21 +55,6 @@ func (channel *Channel) AddAbilities() error {
|
||||
abilities = append(abilities, ability)
|
||||
}
|
||||
}
|
||||
|
||||
// add keys of model mapping to abilities
|
||||
for model := range channel.GetModelMapping() {
|
||||
for _, group := range groups_ {
|
||||
ability := Ability{
|
||||
Group: group,
|
||||
Model: model,
|
||||
ChannelId: channel.Id,
|
||||
Enabled: channel.Status == common.ChannelStatusEnabled,
|
||||
Priority: channel.Priority,
|
||||
}
|
||||
abilities = append(abilities, ability)
|
||||
}
|
||||
}
|
||||
|
||||
return DB.Create(&abilities).Error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user