Skip to content

Commit

Permalink
fix: mj 没发送原图
Browse files Browse the repository at this point in the history
  • Loading branch information
misaka20002 committed Oct 12, 2024
1 parent 75ef02f commit f90d8a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apps/MJ_Painting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('生成图片失败,请稍后重试。')
Expand Down Expand Up @@ -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('操作失败,请稍后重试。')
Expand Down
14 changes: 6 additions & 8 deletions apps/SF_Painting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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、硅基流动
Expand Down
2 changes: 2 additions & 0 deletions guoba.support.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({}, '保存成功~')
},
Expand Down

0 comments on commit f90d8a3

Please sign in to comment.