mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 07:56:38 +08:00
17 lines
330 B
Go
17 lines
330 B
Go
package vertex
|
|
|
|
import "one-api/common"
|
|
|
|
func GetModelRegion(other string, localModelName string) string {
|
|
// if other is json string
|
|
if common.IsJsonStr(other) {
|
|
m := common.StrToMap(other)
|
|
if m[localModelName] != nil {
|
|
return m[localModelName].(string)
|
|
} else {
|
|
return m["default"].(string)
|
|
}
|
|
}
|
|
return other
|
|
}
|