update
This commit is contained in:
parent
bf342ff027
commit
f17fc31813
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ local/config.yaml
|
|||||||
token.json
|
token.json
|
||||||
wechatbot
|
wechatbot
|
||||||
wechatbot.exe
|
wechatbot.exe
|
||||||
|
run.log
|
||||||
|
@ -91,13 +91,13 @@ func StartTelegramBot() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg := tgbotapi.NewMessage(chatID, *reply)
|
msg := tgbotapi.NewMessage(chatID, *reply)
|
||||||
send, err := bot.Send(msg)
|
_, err := bot.Send(msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("发送消息出错:%s", err.Error())
|
log.Errorf("发送消息出错:%s", err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info("回答:", send.Text)
|
log.Info("回答:", *reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
select {}
|
select {}
|
||||||
|
@ -135,6 +135,5 @@ func Completions(msg string) (*string, error) {
|
|||||||
reply = gptErrorBody.Error["message"].(string)
|
reply = gptErrorBody.Error["message"].(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debugf("gpt response full text: %s \n", reply)
|
|
||||||
return &reply, nil
|
return &reply, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user