This commit is contained in:
Liang Ding 2023-03-03 23:55:48 +08:00
parent 1a0f176a05
commit 9a67ec3c09
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 21 additions and 6 deletions

View file

@ -17,6 +17,7 @@
package api
import (
"github.com/siyuan-note/siyuan/kernel/model"
"net/http"
"github.com/88250/gulu"
@ -34,5 +35,10 @@ func chatGPT(c *gin.Context) {
}
msg := arg["msg"].(string)
if "" == util.OpenAIAPIKey {
util.PushMsg(model.Conf.Language(193), 5000)
return
}
ret.Data = util.ChatGPT(msg)
}