mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-17 17:16:38 +08:00
13 lines
278 B
Go
13 lines
278 B
Go
package util
|
|
|
|
func GetMappedModelName(modelName string, mapping map[string]string) (string, bool) {
|
|
if mapping == nil {
|
|
return modelName, false
|
|
}
|
|
mappedModelName := mapping[modelName]
|
|
if mappedModelName != "" {
|
|
return mappedModelName, true
|
|
}
|
|
return modelName, false
|
|
}
|