mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 优化一些tool
This commit is contained in:
parent
8257779f5c
commit
328849b320
3 changed files with 19 additions and 9 deletions
|
|
@ -7,10 +7,10 @@ export class APTool extends AbstractTool {
|
|||
properties: {
|
||||
prompt: {
|
||||
type: 'string',
|
||||
description: 'draw prompt of StableDiffusion, must be in English'
|
||||
description: 'draw prompt of StableDiffusion, prefer to be in English. should be many keywords split by comma.'
|
||||
}
|
||||
},
|
||||
required: ['prompt']
|
||||
required: []
|
||||
}
|
||||
|
||||
description = 'Useful when you want to draw picture'
|
||||
|
|
@ -39,7 +39,7 @@ export class APTool extends AbstractTool {
|
|||
try {
|
||||
e.msg = '#绘图' + prompt
|
||||
await ap.aiPainting(e)
|
||||
return 'draw success!'
|
||||
return 'draw success, picture has been sent.'
|
||||
} catch (err) {
|
||||
return 'draw failed due to unknown error'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,12 +28,21 @@ export class QueryGenshinTool extends AbstractTool {
|
|||
}
|
||||
e.atBot = false
|
||||
try {
|
||||
let ProfileList = (await import('../../../miao-plugin/apps/profile/ProfileList.js')).default
|
||||
e.msg = `#${character}面板${uid}`
|
||||
e.user_id = qq
|
||||
e.isSr = false
|
||||
await ProfileList.render(e)
|
||||
return 'the player panel of genshin impact has been sent to group'
|
||||
if (character) {
|
||||
let ProfileDetail = (await import('../../../miao-plugin/apps/profile/ProfileDetail.js')).default
|
||||
e.msg = `#${character}面板${uid}`
|
||||
e.user_id = qq
|
||||
e.isSr = false
|
||||
await ProfileDetail.detail(e)
|
||||
return 'the character panel of genshin impact has been sent to group'
|
||||
} else {
|
||||
let ProfileList = (await import('../../../miao-plugin/apps/profile/ProfileList.js')).default
|
||||
e.msg = `#面板${uid}`
|
||||
e.user_id = qq
|
||||
e.isSr = false
|
||||
await ProfileList.render(e)
|
||||
return 'the player panel of genshin impact has been sent to group'
|
||||
}
|
||||
} catch (err) {
|
||||
return `failed to query, error: ${err.toString()}`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export class QueryStarRailTool extends AbstractTool {
|
|||
return '用户没有绑定uid,无法查询。可以让用户主动提供uid进行查询'
|
||||
}
|
||||
} catch (e) {
|
||||
// todo support miao-plugin and sruid
|
||||
return '未安装StarRail-Plugin,无法查询'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue