From 15d05046467d3c748b2357e20666681911a54e38 Mon Sep 17 00:00:00 2001 From: Bob Du Date: Tue, 14 May 2024 17:51:53 +0800 Subject: [PATCH] fix: user content format when no images (#538) Signed-off-by: Bob Du --- service/src/chatgpt/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/chatgpt/index.ts b/service/src/chatgpt/index.ts index 51e3a078..a62da9cf 100644 --- a/service/src/chatgpt/index.ts +++ b/service/src/chatgpt/index.ts @@ -403,7 +403,7 @@ async function getMessageById(id: string): Promise { url: string } }[] = chatInfo.prompt - if (chatInfo.images) { + if (chatInfo.images && chatInfo.images.length > 0) { content = [ { type: 'text',