matrixgpt / matrix-chatgpt-bot

Talk to ChatGPT via any Matrix client!
GNU Affero General Public License v3.0
234 stars 63 forks source link

Optionally return errors in chat #148

Closed mrled closed 1 year ago

mrled commented 1 year ago

As a feature request, would you consider having the bot respond with any error messages it receives? It would be useful if I could see the problem in my Matrix client, rather than having to follow the bot logs to get it.

One way this would be useful: if I'm on my phone, I can log in to OpenAI and increase my billing quota, but I would probably wait to ssh to the server running the bot and follow the logs until I'm at a real computer. If the bot tells me that I am having a quota problem, I can fix it for my users while I'm still remote.

max298 commented 1 year ago

We've already discussed this earlier in #55 and #91, however I do understand your point.

Maybe we want to introduce a setting like SHOW_ERROR_DETAILS to the env?

mrled commented 1 year ago

Yeah, I'd be interested in something like that.

I see in those other threads that there is concern that sensitive data could be leaked. I'm not sure if all of the errors from the OpenAI API look like this or not, but for the error I was seeing related to the billing quota, there was a verbose message and a shorter error code. Even just the shorter code would be pretty useful to me, if there is concern in sharing the whole message.

max298 commented 1 year ago

I feel like the short error code would be something we could show by default. Just add the error-code to the message, like "The bot has encountered an error, please contact your administrator (Error code XX)."

bertybuttface commented 1 year ago

Closed by https://github.com/matrixgpt/matrix-chatgpt-bot/pull/155