diff --git a/example/variation-ws.ts b/example/variation-ws.ts index 9e473f1..8d45025 100644 --- a/example/variation-ws.ts +++ b/example/variation-ws.ts @@ -40,45 +40,60 @@ async function main() { }, }); console.log("Variation", Variation); - client - .Variation({ - index: 2, - msgId: Imagine.id, - hash: Imagine.hash, - flags: Imagine.flags, - loading: (uri: string, progress: string) => { - console.log("Variation2.loading", uri, "progress", progress); - }, - }) - .then((msg2) => { - console.log({ msg2 }); - }); - client - .Variation({ - index: 3, - msgId: Imagine.id, - hash: Imagine.hash, - flags: Imagine.flags, - loading: (uri: string, progress: string) => { - console.log("Variation3.loading", uri, "progress", progress); - }, - }) - .then((msg3) => { - console.log({ msg3 }); - }); - client - .Variation({ - index: 4, - msgId: Imagine.id, - hash: Imagine.hash, - flags: Imagine.flags, - loading: (uri: string, progress: string) => { - console.log("Variation4.loading", uri, "progress", progress); - }, - }) - .then((msg4) => { - console.log({ msg4 }); - }); + if (!Variation) { + console.log("no Variation"); + return; + } + const Upscale = await client.Upscale({ + index: 2, + msgId: Variation.id, + hash: Variation.hash, + flags: Variation.flags, + content: prompt, + loading: (uri: string, progress: string) => { + console.log("loading", uri, "progress", progress); + }, + }); + console.log(Upscale); + // client + // .Variation({ + // index: 2, + // msgId: Imagine.id, + // hash: Imagine.hash, + // flags: Imagine.flags, + // loading: (uri: string, progress: string) => { + // console.log("Variation2.loading", uri, "progress", progress); + // }, + // }) + // .then((msg2) => { + // console.log({ msg2 }); + // }); + // client + // .Variation({ + // index: 3, + // msgId: Imagine.id, + // hash: Imagine.hash, + // flags: Imagine.flags, + // loading: (uri: string, progress: string) => { + // console.log("Variation3.loading", uri, "progress", progress); + // }, + // }) + // .then((msg3) => { + // console.log({ msg3 }); + // }); + // client + // .Variation({ + // index: 4, + // msgId: Imagine.id, + // hash: Imagine.hash, + // flags: Imagine.flags, + // loading: (uri: string, progress: string) => { + // console.log("Variation4.loading", uri, "progress", progress); + // }, + // }) + // .then((msg4) => { + // console.log({ msg4 }); + // }); } main().catch((err) => { console.error(err); diff --git a/src/interfaces/config.ts b/src/interfaces/config.ts index 0e30c8a..ff97ee5 100644 --- a/src/interfaces/config.ts +++ b/src/interfaces/config.ts @@ -32,6 +32,7 @@ export interface MJConfigParam { ApiInterval?: number; //ApiInterval request api interval Limit?: number; //Limit of get message list MaxWait?: number; + Remix?: boolean; //Remix:true use remix mode Ws?: boolean; //Ws:true use websocket get discord message (ephemeral message) HuggingFaceToken?: string; //HuggingFaceToken for verify human SessionId?: string;