From f1b97cecce72ee06acafcf19de19ac34024f3ac8 Mon Sep 17 00:00:00 2001 From: MartialBE Date: Wed, 22 May 2024 02:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20chore:=20Update=20baidu=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/baidu/base.go | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/providers/baidu/base.go b/providers/baidu/base.go index 2117dd27..1a872458 100644 --- a/providers/baidu/base.go +++ b/providers/baidu/base.go @@ -68,15 +68,18 @@ func errorHandle(baiduError *BaiduError) *types.OpenAIError { // 获取完整请求 URL func (p *BaiduProvider) GetFullRequestURL(requestURL string, modelName string) string { var modelNameMap = map[string]string{ - "ERNIE-Bot": "completions", - "ERNIE-Bot-turbo": "eb-instant", - "ERNIE-Bot-4": "completions_pro", - "BLOOMZ-7B": "bloomz_7b1", - "Embedding-V1": "embedding-v1", - "ERNIE-4.0": "completions_pro", - "ERNIE-3.5-8K": "completions", - "ERNIE-Bot-8K": "ernie_bot_8k", - "ERNIE-Speed": "ernie_speed", + "ERNIE-Bot": "completions", + "ERNIE-Bot-turbo": "eb-instant", + "ERNIE-Bot-4": "completions_pro", + "BLOOMZ-7B": "bloomz_7b1", + "Embedding-V1": "embedding-v1", + "ERNIE-4.0": "completions_pro", + "ERNIE-3.5-8K": "completions", + "ERNIE-Speed": "ernie_speed", + "ERNIE-Speed-128K": "ernie_speed_128k", + "ERNIE-Lite-8K": "eb-instant", + "ERNIE-Tiny-8K": "ernie-tiny-8k", + "ERNIE-Functions-8K": "ernie-func-8k", } if modelNameConvert, ok := modelNameMap[modelName]; ok {