This commit is contained in:
Liang Ding 2023-03-05 11:27:26 +08:00
parent db636d8b5b
commit 436f487171
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 59 additions and 3 deletions

View file

@ -19,6 +19,7 @@ package util
import (
"bytes"
"context"
"github.com/siyuan-note/siyuan/kernel/model"
"net/http"
"net/url"
"os"
@ -47,6 +48,7 @@ func ChatGPT(msg string) (ret string) {
func ChatGPTContinueWrite(msg string, contextMsgs []string) (ret string, retContextMsgs []string) {
if "" == OpenAIAPIKey {
PushMsg(model.Conf.Language(193), 5000)
return
}