当chatGPT返回错误的时候把错误消息返回给IM
This commit is contained in:
parent
c80767c59f
commit
304093260e
@ -115,6 +115,8 @@ func Completions(msg string) (*string, error) {
|
||||
reply = v["text"].(string)
|
||||
break
|
||||
}
|
||||
} else {
|
||||
replay = v["error"]["message"].(string)
|
||||
}
|
||||
log.Printf("gpt response text: %s \n", reply)
|
||||
result := strings.TrimSpace(reply)
|
||||
|
Loading…
x
Reference in New Issue
Block a user