latitudegames / AIDungeon

Infinite adventures await!
http://www.aidungeon.io/
MIT License
3.19k stars 554 forks source link

[BUG] Use balking retries to handle "The AI is a little overloaded" #248

Open Sporking opened 4 years ago

Sporking commented 4 years ago

🐛 Bug Report

The web app (and sometimes at least the iPhone app) often replies to a submission with "The AI is a little overloaded.. Could you try that again?" Often it will do this repeatedly for a few minutes. In such cases, each time the error pops up, the client program seems to have immediately forgotten the text I just submitted: I am then forced to move my hands from my keyboard to my mouse to copy the text and then paste it back into the submission box so that I can press "enter" again to resubmit the same text again. This is annoying and disruptive to the dialog I am trying to have with the AI.

Instead, I suggest that if the first attempt to submit the text to the AI server fails, that the client program should not display an error message, but should instead automatically resubmit the same text again after a short delay. If the second attempt also fails, then it should try again after a slightly longer delay. And so forth, until some kind of maximum number of attempts (10?) is eventually reached. If it hasn't succeeded after 10 tries, then it would finally display the error message as before, but before displaying the error message, it should first fill the text entry box with the previously-submitted text (just as it was before the user typed \<Enter> or clicked the submit button) so that the user can just type \<Enter> or click the submit button again without having to copy-paste the previously submitted text.