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() {
19
19
en .OnMessagePrefix ("看看群友" ).Limit (ctxext .LimitByGroup ).Handle (func (ctx * nano.Ctx ) {
20
20
prompt := ctx .State ["args" ].(string )
21
21
sb := strings.Builder {}
22
+ errsb := strings.Builder {}
22
23
cmd := exec.Cmd {
23
24
Path : "/usr/local/bin/llama2.run" ,
24
- Args : []string {"model.bin" },
25
+ Args : []string {"/usr/local/bin/llama2.run" , " model.bin" },
25
26
Dir : "/usr/local/src/llama2.c" ,
26
27
Stdout : & sb ,
28
+ Stderr : & errsb ,
27
29
}
28
30
if prompt != "" {
29
31
cmd .Args = append (cmd .Args , "-i" , prompt )
30
32
}
31
33
err := cmd .Run ()
32
34
if err != nil {
33
- ctx .SendChain (nano .Text ("ERROR: " , err ))
35
+ ctx .SendChain (nano .Text ("ERROR: " , err , errsb . String () ))
34
36
return
35
37
}
36
38
ctx .SendChain (nano .Text (sb .String ()))
You can’t perform that action at this time.
0 commit comments