From 346b297487de9b64965b1d09f67d8f6a60f26cc0 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 22 Mar 2023 09:31:13 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=AF=E6=8C=81=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=86=85=E9=85=8D=E7=BD=AE=E4=BA=BA=E5=B7=A5=E6=99=BA=E8=83=BD?= =?UTF-8?q?=20https://github.com/siyuan-note/siyuan/issues/7714?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/ai.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/model/ai.go b/kernel/model/ai.go index bdc5ea1c4..4c895a5ca 100644 --- a/kernel/model/ai.go +++ b/kernel/model/ai.go @@ -57,7 +57,10 @@ func chatGPT(msg string, cloud bool) (ret string) { } func chatGPTWithAction(msg string, action string, cloud bool) (ret string) { - msg = action + ":\n\n" + msg + action = strings.TrimSpace(action) + if "" != action { + msg = action + ":\n\n" + msg + } ret, _, err := chatGPTContinueWrite(msg, nil, cloud) if nil != err { return