new-api/relay/channel/vertex/relay-vertex.go
2024-08-28 18:43:40 +08:00

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
}