jas3333 / GPT-Helper

MIT License
140 stars 37 forks source link

No response #19

Closed Janninanni3011 closed 1 year ago

Janninanni3011 commented 1 year ago

After some time chatting the Chatbot randomly stops responding and my typed text disappears.

jas3333 commented 1 year ago

Your text should only disappear if the browser refreshes. No errors show up? Check the dev tools in the browser when it happens. I can't really troubleshoot without more info.

Janninanni3011 commented 1 year ago

Thanks for the quick response! I love your Project :) If I type something in the "Ask a Question" Field after I have already chatted for a while, the text I wrote disappears after less than a second of that little loading thingy showing up, but I don't get a response. I set the Tokens and the threads to the max if that helps. Now out of nowhere, GPT wrote this:

"I hope this helps! , what is the code to get the ratio?

CodeSage: The code to calculate the ratio is:

ratio = bpm2 / bpm1" He wrote that x37 times more in the same message for no reason. I didn't even ask him what the code to get the ratio is.

jas3333 commented 1 year ago

Looks like it might be related to the max_tokens setting. I'm going to reduce the max size back down. I was a bit confused on how it worked but think I have a better understanding now. The issue is when you set it to max which is 4096 right now, it is rejecting the API call because the max the model can output is 4096 and the app is asking for 4096 + the prompt size. Which means it is surpassing the max.

I just pushed the new changes, if you don't want to re-download you can set the max token size to 2048 which should fix the issue.

jas3333 commented 1 year ago

I'm going to close this issue, if you're still having problems feel free to open up another issue. Thanks for bringing this to my attention!