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

View file

@ -24,6 +24,11 @@ import (
)
func ChatGPTContinueWriteBlocks(ids []string) (ret string) {
if "" == util.OpenAIAPIKey {
util.PushMsg(Conf.Language(193), 5000)
return
}
sqlBlocks := sql.GetBlocks(ids)
buf := bytes.Buffer{}
@ -37,5 +42,10 @@ func ChatGPTContinueWriteBlocks(ids []string) (ret string) {
return
}
func ChatGPT(msg string) (ret string) {
if "" == util.OpenAIAPIKey {
util.PushMsg(Conf.Language(193), 5000)
return
}
return util.ChatGPT(msg)
}