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:
Laisky.Cai
2024-03-01 02:14:32 +00:00
parent c849292621
commit ba827b95e3
6 changed files with 13 additions and 155 deletions

View File

@@ -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
}