更新百度模型名称,并保留旧版兼容以及修正单价

This commit is contained in:
ManJieqi
2024-04-01 20:06:21 +08:00
parent 6aebabbd7c
commit 3cf5ec9e6f
2 changed files with 29 additions and 11 deletions

View File

@@ -34,6 +34,18 @@ func (a *Adaptor) GetRequestURL(meta *util.RelayMeta) (string, error) {
suffix = "embeddings/"
}
switch meta.ActualModelName {
case "ERNIE-4.0":
suffix += "completions_pro" //旧版兼容
case "ERNIE-Bot-4":
suffix += "completions_pro" //旧版兼容
case "ERNIE-Bot":
suffix += "completions" //旧版兼容
case "ERNIE-Bot-turbo":
suffix += "eb-instant" //旧版兼容
case "ERNIE-Speed":
suffix += "ernie_speed" //旧版兼容
case "ERNIE-Bot-8K":
suffix += "ernie_bot_8k" //即将弃用
case "ERNIE-4.0-8K":
suffix += "completions_pro"
case "ERNIE-3.5-8K":