feat: 支持 /mj-{mode} 路径

This commit is contained in:
Xiangyuan Liu
2024-03-29 16:48:50 +08:00
parent 5c39f54040
commit 49df4b6eed
2 changed files with 10 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ func Distribute() func(c *gin.Context) {
// Select a channel for the user
var modelRequest ModelRequest
var err error
if strings.HasPrefix(c.Request.URL.Path, "/mj") {
if strings.Contains(c.Request.URL.Path, "/mj/") {
relayMode := relayconstant.Path2RelayModeMidjourney(c.Request.URL.Path)
if relayMode == relayconstant.RelayModeMidjourneyTaskFetch ||
relayMode == relayconstant.RelayModeMidjourneyTaskFetchByCondition ||