File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ docker run -d --name wechatgpt -e apiKey="你的chatgpt apiKey" -e wechat="触
67
67
docker run -d --name wechatgpt -e apiKey="你的chatgpt apiKey" -e wechat="触发关键字" xiaomoinfo/wechatgpt-amd64:latest
68
68
69
69
```
70
+ <img src =" screenshots/docker部署.png " alt =" drawing " style =" width :250px ;" />
70
71
71
72
### 微信
72
73
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ package wechat
3
3
import (
4
4
"fmt"
5
5
"github.com/eatmoreapple/openwechat"
6
+ log "github.com/sirupsen/logrus"
6
7
"github.com/wechatgpt/wechatbot/config"
7
8
"github.com/wechatgpt/wechatbot/openai"
8
- "log"
9
9
"os"
10
10
"strings"
11
11
)
@@ -37,6 +37,8 @@ func (gmh *GroupMessageHandler) ReplyText(msg *openwechat.Message) error {
37
37
appConfig := config .GetConfig ()
38
38
if appConfig != nil {
39
39
keyword = appConfig .ChatGpt .Keyword
40
+ } else {
41
+ keyword = "chatgpt"
40
42
}
41
43
}
42
44
@@ -48,6 +50,7 @@ func (gmh *GroupMessageHandler) ReplyText(msg *openwechat.Message) error {
48
50
return nil
49
51
}
50
52
requestText := strings .TrimSpace (splitItems [1 ])
53
+ log .Println ("问题:%s" , requestText )
51
54
reply , err := openai .Completions (requestText )
52
55
if err != nil {
53
56
log .Println (err )
You can’t perform that action at this time.
0 commit comments