Enha: notify user on llm resp error
This commit is contained in:
3
bot.go
3
bot.go
@@ -285,6 +285,9 @@ func sendMsgToLLM(body io.Reader) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("error parsing response body", "error", err,
|
logger.Error("error parsing response body", "error", err,
|
||||||
"line", string(line), "url", cfg.CurrentAPI)
|
"line", string(line), "url", cfg.CurrentAPI)
|
||||||
|
if err := notifyUser("LLM Response Error", "Failed to parse LLM response: "+err.Error()); err != nil {
|
||||||
|
logger.Error("failed to notify user", "error", err)
|
||||||
|
}
|
||||||
streamDone <- true
|
streamDone <- true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user