mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-27 10:15:58 +08:00
feat: support DeepL's model (close #1126)
This commit is contained in:
11
relay/adaptor/deepl/helper.go
Normal file
11
relay/adaptor/deepl/helper.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package deepl
|
||||
|
||||
import "strings"
|
||||
|
||||
func parseLangFromModelName(modelName string) string {
|
||||
parts := strings.Split(modelName, "-")
|
||||
if len(parts) == 1 {
|
||||
return "ZH"
|
||||
}
|
||||
return parts[1]
|
||||
}
|
||||
Reference in New Issue
Block a user