🐛 fix: hunyuan request failed (#102)

This commit is contained in:
Buer 2024-03-11 18:09:17 +08:00 committed by GitHub
parent b70378148e
commit d599283366
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ func (p *TencentProvider) parseTencentConfig(config string) (appId int64, secret
return
}
func (p *TencentProvider) getTencentSign(req TencentChatRequest) string {
func (p *TencentProvider) getTencentSign(req *TencentChatRequest) string {
apiKey := p.Channel.Key
appId, secretId, secretKey, err := p.parseTencentConfig(apiKey)
if err != nil {

View File

@ -61,7 +61,7 @@ func (p *TencentProvider) getChatRequest(request *types.ChatCompletionRequest) (
tencentRequest := convertFromChatOpenai(request)
sign := p.getTencentSign(*tencentRequest)
sign := p.getTencentSign(tencentRequest)
if sign == "" {
return nil, common.ErrorWrapper(errors.New("get tencent sign failed"), "get_tencent_sign_failed", http.StatusInternalServerError)
}