v2.4 🚀

This commit is contained in:
Evan 2022-12-15 11:30:28 +09:00
parent 45552dced7
commit 905354f9f6

View File

@ -6,6 +6,7 @@ import (
"github.com/wechatgpt/wechatbot/config" "github.com/wechatgpt/wechatbot/config"
"github.com/wechatgpt/wechatbot/handler/wechat" "github.com/wechatgpt/wechatbot/handler/wechat"
"os" "os"
"strings"
) )
func StartWebChat() { func StartWebChat() {
@ -52,7 +53,7 @@ func StartWebChat() {
func getKeyword() string { func getKeyword() string {
keyword := os.Getenv("wechat") keyword := os.Getenv("wechat")
if len(keyword) == 0 { if len(strings.Trim(keyword, " ")) == 0 {
gptConfig := config.GetConfig() gptConfig := config.GetConfig()
if gptConfig != nil { if gptConfig != nil {
if gptConfig.ChatGpt.Wechat != nil { if gptConfig.ChatGpt.Wechat != nil {