mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 支持ap的dev分支
This commit is contained in:
parent
a35f8a31a0
commit
6e912d68c8
1 changed files with 9 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ export class APTool extends AbstractTool {
|
|||
required: ['prompt']
|
||||
}
|
||||
|
||||
description = 'Useful when you want to draw'
|
||||
description = 'Useful when you want to draw picture'
|
||||
|
||||
func = async function (opts, e) {
|
||||
let { prompt } = opts
|
||||
|
|
@ -23,7 +23,14 @@ export class APTool extends AbstractTool {
|
|||
let { Ai_Painting } = await import('../../../ap-plugin/apps/aiPainting.js')
|
||||
ap = new Ai_Painting(e)
|
||||
} catch (err) {
|
||||
return 'the user didn\'t install ap-plugin'
|
||||
try {
|
||||
// ap的dev分支改名了
|
||||
// eslint-disable-next-line camelcase
|
||||
let { Ai_Painting } = await import('../../../ap-plugin/apps/ai_painting.js')
|
||||
ap = new Ai_Painting(e)
|
||||
} catch (err1) {
|
||||
return 'the user didn\'t install ap-plugin. suggest him to install'
|
||||
}
|
||||
}
|
||||
try {
|
||||
e.msg = '#绘图' + prompt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue