讯飞响应 sid 错误码提示返回

This commit is contained in:
ybyang 2024-11-25 16:58:08 +08:00
parent e7cc50d8cb
commit 4c395352ff
2 changed files with 5 additions and 3 deletions

View File

@ -39,7 +39,9 @@ func requestOpenAI2Xunfei(request model.GeneralOpenAIRequest, xunfeiAppId string
}
xunfeiRequest := ChatRequest{}
xunfeiRequest.Header.AppId = xunfeiAppId
xunfeiRequest.Header.PatchId = xunfeiPatchId
if xunfeiPatchId != "" {
xunfeiRequest.Header.PatchId = []string{xunfeiPatchId}
}
xunfeiRequest.Parameter.Chat.Domain = domain
xunfeiRequest.Parameter.Chat.Temperature = request.Temperature
xunfeiRequest.Parameter.Chat.TopK = request.N

View File

@ -16,7 +16,7 @@ type Functions struct {
type ChatRequest struct {
Header struct {
AppId string `json:"app_id"`
PatchId string `json:"patch_id,omitempty"`
PatchId []string `json:"patch_id,omitempty"`
} `json:"header"`
Parameter struct {
Chat struct {