From f90d8a35b0991dad80c0d81c441cd2789f943b49 Mon Sep 17 00:00:00 2001 From: misaka20002 <40714502+misaka20002@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:03:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mj=20=E6=B2=A1=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=8E=9F=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/MJ_Painting.js | 4 ++-- apps/SF_Painting.js | 14 ++++++-------- guoba.support.js | 2 ++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/MJ_Painting.js b/apps/MJ_Painting.js index 2b50fa1..cd1d092 100644 --- a/apps/MJ_Painting.js +++ b/apps/MJ_Painting.js @@ -118,7 +118,7 @@ export class MJ_Painting extends plugin { const result = await this.pollTaskResult(taskId, config_date) if (result) { await this.reply(`图片生成完成!\n原始提示词:${prompt}\n任务ID:${taskId}\n图片链接:${result.imageUrl}`) - await this.reply(segment.image(result.imageUrl)) + await this.reply({ ...segment.image(result.imageUrl), origin: true }) redis.set(`sf_plugin:MJ_Painting:lastTaskId:${e.user_id}`, taskId, { EX: 7 * 24 * 60 * 60 }); // 写入redis,有效期7天 } else { await this.reply('生成图片失败,请稍后重试。') @@ -260,7 +260,7 @@ export class MJ_Painting extends plugin { const result = await this.pollTaskResult(newTaskId, config_date) if (result) { await this.reply(`操作完成!\n操作类型:${action}${position}\n新任务ID:${newTaskId}\n图片链接:${result.imageUrl}`) - await this.reply(segment.image(result.imageUrl)) + await this.reply({ ...segment.image(result.imageUrl), origin: true }) redis.set(`sf_plugin:MJ_Painting:lastTaskId:${e.user_id}`, newTaskId, { EX: 7 * 24 * 60 * 60 }); // 写入redis,有效期7天 } else { await this.reply('操作失败,请稍后重试。') diff --git a/apps/SF_Painting.js b/apps/SF_Painting.js index 116cdf7..84e30a6 100644 --- a/apps/SF_Painting.js +++ b/apps/SF_Painting.js @@ -252,14 +252,12 @@ export class SF_Painting extends plugin { async sf_help(e) { const helpMessage = ` -FLUXDEV插件使用帮助: -1. 生成图片:#flux [描述] -2. 设置画图API Key:#flux设置画图key [值] -3. 设置翻译API Key:#flux设置翻译key [值] -4. 设置翻译API地址:#flux设置翻译baseurl [地址] (OpenAI格式,以/v1结尾) -5. 设置翻译模型:#flux设置翻译模型 [模型名] -6. 开关提示词生成:#flux设置生成提示词 开/关 -7. 查看帮助:#flux帮助 +SF插件设置帮助: +1. 设置画图API Key:#flux设置画图key [值] +2. 设置翻译模型:#flux设置翻译模型 [模型名] +3. 开关提示词生成:#flux设置生成提示词 开/关 +4. 开关提示词生成:#flux设置推理步数 [值] +5. 查看帮助:#flux帮助 注意:设置命令仅限主人使用。 可用别名:siliconflow、硅基流动 diff --git a/guoba.support.js b/guoba.support.js index 8f00406..f792eaa 100644 --- a/guoba.support.js +++ b/guoba.support.js @@ -253,6 +253,8 @@ export function supportGuoba() { config = lodash.merge({}, Config.getConfig(), config) config.sf_keys = data['sf_keys'] config.sfBaseUrl = config.sfBaseUrl.replace(/\/$/, '') + config.mj_apiBaseUrl = config.mj_apiBaseUrl.replace(/\/$/, '') + config.mj_translationBaseUrl = config.mj_translationBaseUrl.replace(/\/$/, '') Config.setConfig(config) return Result.ok({}, '保存成功~') },