chore: modify the plug-in return

This commit is contained in:
Hk-Gosuto 2024-01-20 17:55:42 +08:00
parent 2e8c90fb21
commit 30f9dc756a

View File

@ -119,7 +119,7 @@ export class DallEAPIWrapper extends StructuredTool {
console.log("[DALL-E]", filePath);
var imageMarkdown = `![img](${filePath})`;
if (this.callback != null) await this.callback(imageMarkdown);
return imageMarkdown;
return "Generated success";
} catch (e) {
if (this.callback != null)
await this.callback("Image upload to OSS failed");