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

This commit is contained in:
Xiangyuan Liu committed 2024-03-29 16:48:50 +08:00
1 parent 41a2619e84
commit d30187e24f
2 files changed
+10 -2

No files matched your search

+1 -1
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 ||