This commit is contained in:
Liang Ding
2023-03-03 23:55:48 +08:00
parent 1a0f176a05
commit 9a67ec3c09
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)
}