diff --git a/common/model-ratio.go b/common/model-ratio.go index 24ff6c5f..c8c3afe9 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -72,23 +72,22 @@ var ModelRatio = map[string]float64{ "claude-3-sonnet-20240229": 3.0 / 1000 * USD, "claude-3-opus-20240229": 15.0 / 1000 * USD, // https://cloud.baidu.com/doc/WENXINWORKSHOP/s/hlrk4akp7 - "ERNIE-4.0": 0.120 * RMB, //旧版兼容 使用completions_pro 等同于ERNIE-4.0-8K - "ERNIE-Bot-4": 0.120 * RMB, //旧版兼容 使用completions_pro 等同于ERNIE-4.0-8K - "ERNIE-Bot": 0.012 * RMB, //旧版兼容 使用completions 等同于ERNIE-3.5-8K - "ERNIE-Bot-turbo": 0.003 * RMB, //旧版兼容 使用eb-instant 等同于ERNIE-Lite-8K - "ERNIE-Bot-8K": 0.024 * RMB, //即将弃用 使用ernie_bot_8k - - "ERNIE-4.0-8K": 0.120 * RMB, - "ERNIE-3.5-8K": 0.012 * RMB, - "ERNIE-Speed-8K": 0.004 * RMB, - "ERNIE-Speed-128K": 0.004 * RMB, - "ERNIE-Lite-8K": 0.003 * RMB, - "ERNIE-Tiny-8K": 0.001 * RMB, - "BLOOMZ-7B": 0.004 * RMB, - "Embedding-V1": 0.002 * RMB, - "bge-large-zh": 0.002 * RMB, - "bge-large-en": 0.002 * RMB, - "tao-8k": 0.002 * RMB, + "ERNIE-4.0-8K": 0.120 * RMB, + "ERNIE-Bot-8K-0922": 0.024 * RMB, + "ERNIE-3.5-8K": 0.012 * RMB, + "ERNIE-Lite-8K-0922": 0.008 * RMB, + "ERNIE-Speed-8K": 0.004 * RMB, + "ERNIE-3.5-4K-0205": 0.012 * RMB, + "ERNIE-3.5-8K-0205": 0.024 * RMB, + "ERNIE-3.5-8K-1222": 0.012 * RMB, + "ERNIE-Lite-8K": 0.003 * RMB, + "ERNIE-Speed-128K": 0.004 * RMB, + "ERNIE-Tiny-8K": 0.001 * RMB, + "BLOOMZ-7B": 0.004 * RMB, + "Embedding-V1": 0.002 * RMB, + "bge-large-zh": 0.002 * RMB, + "bge-large-en": 0.002 * RMB, + "tao-8k": 0.002 * RMB, // https://ai.google.dev/pricing "PaLM-2": 1, "gemini-pro": 1, // $0.00025 / 1k characters -> $0.001 / 1k tokens diff --git a/relay/channel/baidu/adaptor.go b/relay/channel/baidu/adaptor.go index d9b7aafa..72302fdf 100644 --- a/relay/channel/baidu/adaptor.go +++ b/relay/channel/baidu/adaptor.go @@ -35,17 +35,17 @@ func (a *Adaptor) GetRequestURL(meta *util.RelayMeta) (string, error) { } switch meta.ActualModelName { case "ERNIE-4.0": - suffix += "completions_pro" //旧版兼容 + suffix += "completions_pro" case "ERNIE-Bot-4": - suffix += "completions_pro" //旧版兼容 + suffix += "completions_pro" case "ERNIE-Bot": - suffix += "completions" //旧版兼容 + suffix += "completions" case "ERNIE-Bot-turbo": - suffix += "eb-instant" //旧版兼容 + suffix += "eb-instant" case "ERNIE-Speed": - suffix += "ernie_speed" //旧版兼容 + suffix += "ernie_speed" case "ERNIE-Bot-8K": - suffix += "ernie_bot_8k" //即将弃用 + suffix += "ernie_bot_8k" case "ERNIE-4.0-8K": suffix += "completions_pro" case "ERNIE-3.5-8K": @@ -69,7 +69,7 @@ func (a *Adaptor) GetRequestURL(meta *util.RelayMeta) (string, error) { case "tao-8k": suffix += "tao_8k" default: - suffix += meta.ActualModelName + suffix += strings.ToLower(meta.ActualModelName) } fullRequestURL := fmt.Sprintf("%s/rpc/2.0/ai_custom/v1/wenxinworkshop/%s", meta.BaseURL, suffix) var accessToken string diff --git a/relay/channel/baidu/constants.go b/relay/channel/baidu/constants.go index d5a36612..ccdc25c3 100644 --- a/relay/channel/baidu/constants.go +++ b/relay/channel/baidu/constants.go @@ -2,14 +2,19 @@ package baidu var ModelList = []string{ "ERNIE-4.0-8K", + "ERNIE-Bot-8K-0922", "ERNIE-3.5-8K", + "ERNIE-Lite-8K-0922", "ERNIE-Speed-8K", - "ERNIE-Speed-128K", + "ERNIE-3.5-4K-0205", + "ERNIE-3.5-8K-0205", + "ERNIE-3.5-8K-1222", "ERNIE-Lite-8K", + "ERNIE-Speed-128K", "ERNIE-Tiny-8K", "BLOOMZ-7B", "Embedding-V1", "bge-large-zh", "bge-large-en", "tao-8k", -} \ No newline at end of file +}