feat: 支持文心4.0模型,不同的用户可以订阅不同的AI模型

This commit is contained in:
RockYang
2023-10-26 13:41:49 +08:00
parent e5fb986463
commit 9be6755f65
30 changed files with 193 additions and 47 deletions

View File

@@ -393,7 +393,7 @@ func (h *ChatHandler) doRequest(ctx context.Context, req types.ApiRequest, platf
req.Messages = nil
break
case types.Baidu:
apiURL = h.App.ChatConfig.Baidu.ApiURL
apiURL = strings.Replace(h.App.ChatConfig.Baidu.ApiURL, "{model}", req.Model, 1)
break
default:
apiURL = h.App.ChatConfig.OpenAI.ApiURL