File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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 ()))
You can’t perform that action at this time.
0 commit comments