Compare commits

..

2 Commits

Author SHA1 Message Date
oliver zhang
cc56b1ef55 Merge 0527993dd9 into 7ac553541b 2025-02-16 22:26:26 +08:00
oliver
0527993dd9 fix: change http server status_code 2025-02-13 16:20:47 +08:00
2 changed files with 10 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ _✨ 通过标准的 OpenAI API 格式访问所有的大模型,开箱即用
+ [x] [Anthropic Claude 系列模型](https://anthropic.com) (支持 AWS Claude)
+ [x] [Google PaLM2/Gemini 系列模型](https://developers.generativeai.google)
+ [x] [Mistral 系列模型](https://mistral.ai/)
+ [x] [字节跳动豆包大模型(火山引擎)](https://www.volcengine.com/experience/ark?utm_term=202502dsinvite&ac=DSASUQY5&rc=2QXCA1VI)
+ [x] [字节跳动豆包大模型](https://console.volcengine.com/ark/region:ark+cn-beijing/model)
+ [x] [百度文心一言系列模型](https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html)
+ [x] [阿里通义千问系列模型](https://help.aliyun.com/document_detail/2400395.html)
+ [x] [讯飞星火认知大模型](https://www.xfyun.cn/doc/spark/Web.html)

View File

@@ -96,9 +96,15 @@ func Relay(c *gin.Context) {
// BUG: bizErr is in race condition
bizErr.Error.Message = helper.MessageWithRequestId(bizErr.Error.Message, requestId)
c.JSON(bizErr.StatusCode, gin.H{
"error": bizErr.Error,
})
if bizErr.StatusCode < 500 || bizErr.StatusCode >= 100 {
c.JSON(http.StatusInternalServerError, gin.H{
"error": bizErr.Error,
})
} else {
c.JSON(bizErr.StatusCode, gin.H{
"error": bizErr.Error,
})
}
}
}