🐛 fix: hunyuan request failed (#102)
This commit is contained in:
parent
b70378148e
commit
d599283366
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user