Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e25da168
authored
Nov 14, 2023
by
Calcium-Ion
Committed by
GitHub
Nov 14, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from luxlzz6/main
添加了图生文 混图路由
parents
539e598c
736b77b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
controller/relay.go
+4
-0
router/relay-router.go
+2
-0
No files found.
controller/relay.go
View file @
e25da168
...
@@ -255,6 +255,10 @@ func RelayMidjourney(c *gin.Context) {
...
@@ -255,6 +255,10 @@ func RelayMidjourney(c *gin.Context) {
relayMode
:=
RelayModeUnknown
relayMode
:=
RelayModeUnknown
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/submit/imagine"
)
{
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/submit/imagine"
)
{
relayMode
=
RelayModeMidjourneyImagine
relayMode
=
RelayModeMidjourneyImagine
}
else
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/submit/blend"
)
{
relayMode
=
RelayModeMidjourneyBlend
}
else
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/submit/describe"
)
{
relayMode
=
RelayModeMidjourneyDescribe
}
else
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/notify"
)
{
}
else
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/notify"
)
{
relayMode
=
RelayModeMidjourneyNotify
relayMode
=
RelayModeMidjourneyNotify
}
else
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/submit/change"
)
{
}
else
if
strings
.
HasPrefix
(
c
.
Request
.
URL
.
Path
,
"/mj/submit/change"
)
{
...
...
router/relay-router.go
View file @
e25da168
...
@@ -48,6 +48,8 @@ func SetRelayRouter(router *gin.Engine) {
...
@@ -48,6 +48,8 @@ func SetRelayRouter(router *gin.Engine) {
{
{
relayMjRouter
.
POST
(
"/submit/imagine"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
POST
(
"/submit/imagine"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
POST
(
"/submit/change"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
POST
(
"/submit/change"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
POST
(
"/submit/describe"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
POST
(
"/submit/blend"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
POST
(
"/notify"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
POST
(
"/notify"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
GET
(
"/task/:id/fetch"
,
controller
.
RelayMidjourney
)
relayMjRouter
.
GET
(
"/task/:id/fetch"
,
controller
.
RelayMidjourney
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment