Skip to content

Commit 728b68a

Browse files
author
zhukai
committed
doc: 文档修改
1 parent 9e3b857 commit 728b68a

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- [x] 支持 Blend(图片混合) 指令和相关动作
2020
- [x] 支持 Describe(图生文) 指令和相关动作
2121
- [x] 支持 Shorten 指令和相关动作
22-
- [x] 支持 Remix 模式,参考 [API接口说明](./docs/api.md)`/mj/submit/modal`
22+
- [x] 支持 Remix 模式,参考 [API接口说明](./docs/api.md)`/mj/submit/action`
2323
- [x] 支持获取图片的seed值
2424
- [x] 中英文翻译额外支持deepl
2525
- [x] 账号池持久化,动态维护

docs/api.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
{
3838
"code": 1,
3939
"description": "提交成功",
40-
"result": "14001929738841620"
40+
"result": "14001929738841620",
41+
"properties": {
42+
"discordInstanceId": "1118138338562560102"
43+
}
4144
}
4245
```
4346
- code=22: 提交成功,进入队列等待
@@ -47,7 +50,19 @@
4750
"description": "排队中,前面还有1个任务",
4851
"result": "14001929738841620",
4952
"properties": {
50-
"numberOfQueues": 1
53+
"numberOfQueues": 1,
54+
"discordInstanceId": "1118138338562560102"
55+
}
56+
}
57+
```
58+
- code=23: 队列已满,请稍后尝试
59+
```json
60+
{
61+
"code": 23,
62+
"description": "队列已满,请稍后尝试",
63+
"result": "14001929738841620",
64+
"properties": {
65+
"discordInstanceId": "1118138338562560102"
5166
}
5267
}
5368
```
@@ -77,13 +92,21 @@
7792
"customId": "MJ::JOB::reroll::0::1c6dff5e-5632-40c6-9d4c-afb261705313::SOLO"
7893
}
7994
```
80-
⚠️ 注意: 某些场景需要modal确认,提交后任务状态会变为MODAL,需调用`/mj/submit/modal`进行二次提交
95+
⚠️ 注意: 某些场景需要modal弹框确认
8196
- 执行CustomZoom(自定义变焦)
8297
- 执行PicReader(Describe后选择生图)
8398
- 执行PromptAnalyzer(Shorten后选择生图)
8499
- 账号开启了Remix & 执行Reroll、Variation、Pan
85100

86-
调用 `/mj/submit/modal`
101+
这时返回的code为 21,示例:
102+
```json
103+
{
104+
"code": 21,
105+
"description": "窗口等待",
106+
"result": "14001929738841620"
107+
}
108+
```
109+
该任务状态为MODAL,但不会进队列影响并发。需调用`/mj/submit/modal`提交最终任务
87110
```json
88111
{
89112
// 需确认的任务ID
@@ -92,13 +115,13 @@
92115
"prompt": "Cat"
93116
}
94117
```
95-
CustomZoom的prompt需要设置`--ar``--zoom`(1到2之间),例如: `Cat --ar 1:1 --zoom 1.5`
118+
CustomZoom的prompt需要设置`--zoom`(1到2之间),例如: `Cat --zoom 1.5`
96119

97120
## 4. `/mj/submit/describe` 图生文
98121
```json
99122
{
100-
// 图片的base64字符串
101-
"base64": "data:image/png;base64,xxx"
123+
// 图片的base64字符串
124+
"base64": "data:image/png;base64,xxx"
102125
}
103126
```
104127

@@ -158,7 +181,7 @@ CustomZoom的prompt需要设置`--ar` 和 `--zoom`(1到2之间),例如: `Cat -
158181

159182
绘图任务执行后,不会设置seed,如需获取seed,需要执行 `/mj/task/{id}/image-seed`
160183

161-
⚠️ 注意: 必须配置账号的 [Midjourney Bot私信ID](./discord-params.md#4-获取mj私信id),否则无法调用
184+
⚠️ 注意: 必须配置账号的Midjourney Bot私信ID,否则无法调用
162185

163186
- code=1: 获取成功,result为图片对应的seed
164187
```json

docs/config.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
| mj.account-store-type || 账号存储方式,默认in_memory(内存\重启后丢失),可选redis |
77
| mj.account-choose-rule || 账号选择策略:默认 BestWaitIdleRule(最少等待空闲)、RoundRobinRule(轮循) |
88
| mj.api-secret || 接口密钥,为空不启用鉴权;调用接口时需要加请求头 mj-api-secret |
9+
| mj.username || 后台管理登录的用户名 |
10+
| mj.password || 后台管理登录的密码,默认为接口密钥(两者均未设置默认admin) |
911
| mj.task-store.type || 任务存储方式,默认in_memory(内存\重启后丢失),可选redis |
1012
| mj.task-store.timeout || 任务存储过期时间,过期后删除,默认30天 |
1113
| mj.notify-hook || 全局的任务状态变更回调地址 |
@@ -60,6 +62,7 @@ mj:
6062
| core-size | 否 | 并发数,默认3 |
6163
| queue-size | 否 | 等待队列长度,默认10 |
6264
| timeout-minutes | 否 | 任务超时时间(分钟),默认5 |
65+
| remark | 否 | 备注说明 |
6366
6467
### spring.redis配置参考
6568
```yaml

docs/start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Docker
44

5-
1. 创建/xxx/xxx/config,docker用户需要有读写权限,目录文件如下
5+
1. /xxx/xxx/config目录下创建
66
> 注意: /xxx/xxx是 服务器目录示例,需自行修改
77
- `app.jar` 项目jar包,https://github.com/litter-coder/midjourney-proxy-plus/releases 下找到最新的jar包,下载并命名为app.jar
88
- `application.yml` mj配置项,参考 https://github.com/litter-coder/midjourney-proxy-plus/blob/main/resources/application.yml
@@ -17,7 +17,7 @@
1717
```
1818

1919
3. 在API文档页 `http://ip:port/doc` 服务激活 -> 获取机器码,联系作者获取激活码,激活服务
20-
4. 访问 `http://ip:port` 查看管理页面,用户名是admin,密码是设置的接口密钥(未设置默认密码是admin)
20+
4. 访问 `http://ip:port` 查看管理页面,用户名默认是admin,密码默认是设置的接口密钥(未设置默认密码是admin)
2121
5. 后续升级版本,直接替换config目录下的app.jar,重启容器即可,不需要重新激活
2222
```shell
2323
docker restart midjourney-proxy-plus

0 commit comments

Comments
 (0)