chore: rewrite 429 prompt text (close #96)

This commit is contained in:
JustSong 2023-05-18 15:27:15 +08:00
parent 09c2e3bcec
commit ced89398a5

View File

@ -75,6 +75,9 @@ func countToken(text string) int {
func Relay(c *gin.Context) {
err := relayHelper(c)
if err != nil {
if err.StatusCode == http.StatusTooManyRequests {
err.OpenAIError.Message = "负载已满,请稍后再试,或升级账户以提升服务质量。"
}
c.JSON(err.StatusCode, gin.H{
"error": err.OpenAIError,
})