V 2.2.6 增加了MJ的api
This commit is contained in:
@@ -1,16 +1,89 @@
|
||||
import { Tools } from "../../main/tools";
|
||||
import { define } from "../define";
|
||||
import path from "path";
|
||||
import { DEFINE_STRING } from "../define_string";
|
||||
import { get, has } from "lodash";
|
||||
let tools = new Tools();
|
||||
const { v4: uuidv4 } = require('uuid'); // 引入UUID库来生成唯一标识符
|
||||
import { successMessage } from "../../main/generalTools";
|
||||
|
||||
export class MjSetting {
|
||||
constructor(golbal) {
|
||||
this.golbal = golbal;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取MJ生成图片的机器人模型
|
||||
*/
|
||||
GetMJImageRobotModel() {
|
||||
return successMessage([
|
||||
{
|
||||
label: "MJ V6.0",
|
||||
text: "v 6",
|
||||
type: "mj",
|
||||
value: "3e6473ab-9a64-4574-9a38-f5c75af552b6"
|
||||
},
|
||||
{
|
||||
label: "MJ V5.2",
|
||||
text: "v 5.2",
|
||||
type: "mj",
|
||||
value: "27a0d30e-f46c-4684-96c8-d91334deb94f"
|
||||
},
|
||||
{
|
||||
label: "MJ V5.1",
|
||||
text: "v 5.1",
|
||||
type: "mj",
|
||||
value: "e1226715-e969-44c4-b18b-f2ad5dae5d2f"
|
||||
}, {
|
||||
label: "MJ V5.0",
|
||||
text: "v 5",
|
||||
type: "mj",
|
||||
value: "afb7bea1-4eda-46ea-8165-34701b4566bf"
|
||||
}, {
|
||||
label: "MJ V4.0",
|
||||
text: "v 4",
|
||||
type: "mj",
|
||||
value: "d05b8497-7f4a-4890-8fac-89f1803984d2"
|
||||
}, {
|
||||
label: "NIJI V6",
|
||||
text: "niji 6",
|
||||
type: "niji",
|
||||
value: "99377cad-c103-4cee-a958-86a104879328"
|
||||
}, {
|
||||
label: "NIJI V5",
|
||||
text: "niji 5",
|
||||
type: "niji",
|
||||
value: "53cec077-9885-4635-ab18-e021066b2c4c"
|
||||
}, {
|
||||
label: "NIJI V4",
|
||||
text: "niji 4",
|
||||
type: "niji",
|
||||
value: "6a7199fe-6e0d-40a9-9772-b5eb3d2e2e66"
|
||||
},
|
||||
])
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生图的比例
|
||||
* @returns
|
||||
*/
|
||||
GetMJImageScale() {
|
||||
return successMessage([{
|
||||
label: "1:1",
|
||||
text: "1:1",
|
||||
value: "3e2772f2-041c-49c6-ba13-d0ed120310b8"
|
||||
}, {
|
||||
label: "4:3",
|
||||
text: "4:3",
|
||||
value: "fcef555c-1958-4082-88fe-434782aa8151"
|
||||
}, {
|
||||
label: "3:4",
|
||||
text: "3:4",
|
||||
value: "13f71d53-73a3-4c9b-9c1e-6e7e939aee73"
|
||||
}, {
|
||||
label: "16:9",
|
||||
text: "16:9",
|
||||
value: "bf33ce1a-15cd-4901-b38e-89543cf14a1f"
|
||||
}, {
|
||||
label: "9:16",
|
||||
text: "9:16",
|
||||
value: "fd4641e2-97f4-4a86-8616-4965e05f3348"
|
||||
}])
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回mj生成图片方式的分类
|
||||
*/
|
||||
@@ -18,20 +91,24 @@ export class MjSetting {
|
||||
return {
|
||||
code: 1,
|
||||
data: [{
|
||||
label: "本地MJ",
|
||||
value: "local_mj"
|
||||
label: "本地MJ(待开发)",
|
||||
value: "local_mj",
|
||||
disable: true
|
||||
},
|
||||
{
|
||||
label: "代理MJ(待开发)",
|
||||
value: "remote_mj"
|
||||
value: "remote_mj",
|
||||
disable: true
|
||||
},
|
||||
{
|
||||
label: "浏览器模式",
|
||||
value: "browser_mj"
|
||||
value: "browser_mj",
|
||||
disable: false
|
||||
},
|
||||
{
|
||||
label: "API模式(待开发)",
|
||||
value: "api_mj"
|
||||
label: "API模式",
|
||||
value: "api_mj",
|
||||
disable: false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user