Skip to content

Commit

Permalink
fix: test all channel error (close #206)
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Apr 17, 2024
1 parent 9dfd405 commit a4defe6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion relay/channel/xunfei/relay-xunfei.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ func xunfeiHandler(c *gin.Context, textRequest dto.GeneralOpenAIRequest, appId s
case stop = <-stopChan:
}
}

if len(xunfeiResponse.Payload.Choices.Text) == 0 {
xunfeiResponse.Payload.Choices.Text = []XunfeiChatResponseTextItem{
{
Content: "",
},
}
}
xunfeiResponse.Payload.Choices.Text[0].Content = content

response := responseXunfei2OpenAI(&xunfeiResponse)
Expand Down

0 comments on commit a4defe6

Please sign in to comment.