From 30f9dc756ac58222d7876242234632464a1ac1c1 Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Sat, 20 Jan 2024 17:55:42 +0800 Subject: [PATCH] chore: modify the plug-in return --- app/api/langchain-tools/dalle_image_generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/langchain-tools/dalle_image_generator.ts b/app/api/langchain-tools/dalle_image_generator.ts index 1ce20234f..0c4d14efa 100644 --- a/app/api/langchain-tools/dalle_image_generator.ts +++ b/app/api/langchain-tools/dalle_image_generator.ts @@ -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");