feat: support baichuan's models now (close #1057)

This commit is contained in:
JustSong
2024-03-02 00:55:48 +08:00
parent eac6a0b9aa
commit 614c2e0442
12 changed files with 64 additions and 1 deletions

View File

@@ -41,6 +41,10 @@ func relay(c *gin.Context, relayMode int) *model.ErrorWithStatusCode {
func Relay(c *gin.Context) {
ctx := c.Request.Context()
relayMode := constant.Path2RelayMode(c.Request.URL.Path)
if config.DebugEnabled {
requestBody, _ := common.GetRequestBody(c)
logger.Debugf(ctx, "request body: %s", string(requestBody))
}
bizErr := relay(c, relayMode)
if bizErr == nil {
return