diff --git a/plugin/qunyou/main.go b/plugin/qunyou/main.go index 09f49da..43973ec 100644 --- a/plugin/qunyou/main.go +++ b/plugin/qunyou/main.go @@ -19,18 +19,20 @@ func init() { en.OnMessagePrefix("įœ‹įœ‹įž¤å‹").Limit(ctxext.LimitByGroup).Handle(func(ctx *nano.Ctx) { prompt := ctx.State["args"].(string) sb := strings.Builder{} + errsb := strings.Builder{} cmd := exec.Cmd{ Path: "/usr/local/bin/llama2.run", - Args: []string{"model.bin"}, + Args: []string{"/usr/local/bin/llama2.run", "model.bin"}, Dir: "/usr/local/src/llama2.c", Stdout: &sb, + Stderr: &errsb, } if prompt != "" { cmd.Args = append(cmd.Args, "-i", prompt) } err := cmd.Run() if err != nil { - ctx.SendChain(nano.Text("ERROR: ", err)) + ctx.SendChain(nano.Text("ERROR: ", err, errsb.String())) return } ctx.SendChain(nano.Text(sb.String()))