From e37919ea97a8988b8278227c8f2efad718a83daa Mon Sep 17 00:00:00 2001 From: shaoyongjun Date: Wed, 22 May 2024 17:42:24 +0800 Subject: [PATCH] to:sync --- static/ai-chat2.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/ai-chat2.html b/static/ai-chat2.html index 28b0adf..d120413 100644 --- a/static/ai-chat2.html +++ b/static/ai-chat2.html @@ -68,8 +68,8 @@ parseResponse: function (res, requestType) { // alert(requestType); console.log(res); - if (requestType === 'send' && res?.choices?.length > 0) { - let res1 = res?.choices[0]?.message?.content; + if (requestType === 'send' && res?.code === 0) { + let res1 = res.data; res1 = DOMPurify.sanitize(res1)