mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 生成较长时suno token过期重新刷新
This commit is contained in:
parent
d004699e21
commit
32af7b9a74
2 changed files with 6 additions and 2 deletions
|
|
@ -86,6 +86,10 @@ export class Vocal extends plugin {
|
|||
}
|
||||
|
||||
let songs = await client.createSong(description)
|
||||
if (!songs || songs.length === 0) {
|
||||
e.reply('生成失败,可能是提示词太长或者违规,请检查日志')
|
||||
return
|
||||
}
|
||||
let messages = ['提示词:' + description]
|
||||
for (let song of songs) {
|
||||
messages.push(`歌名:${song.title}\n风格: ${song.metadata.tags}\n长度: ${lodash.round(song.metadata.duration, 0)}秒\n歌词:\n${song.metadata.prompt}\n`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue