Skip to content

Commit 8273c97

Browse files
committed
fix: qunyou
1 parent 23429be commit 8273c97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugin/qunyou/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ func init() {
1919
en.OnMessagePrefix("看看群友").Limit(ctxext.LimitByGroup).Handle(func(ctx *nano.Ctx) {
2020
prompt := ctx.State["args"].(string)
2121
sb := strings.Builder{}
22+
errsb := strings.Builder{}
2223
cmd := exec.Cmd{
2324
Path: "/usr/local/bin/llama2.run",
24-
Args: []string{"model.bin"},
25+
Args: []string{"/usr/local/bin/llama2.run", "model.bin"},
2526
Dir: "/usr/local/src/llama2.c",
2627
Stdout: &sb,
28+
Stderr: &errsb,
2729
}
2830
if prompt != "" {
2931
cmd.Args = append(cmd.Args, "-i", prompt)
3032
}
3133
err := cmd.Run()
3234
if err != nil {
33-
ctx.SendChain(nano.Text("ERROR: ", err))
35+
ctx.SendChain(nano.Text("ERROR: ", err, errsb.String()))
3436
return
3537
}
3638
ctx.SendChain(nano.Text(sb.String()))

0 commit comments

Comments
 (0)