node-chatgpt-api
node-chatgpt-api copied to clipboard
The problem after a long conversation
After a very long conversation, I found this error. Is there any way to solve this problem now? Or is this the limit?

Same as me. It seems like some kind of limitations.
There's a TODO in BingAIClient. Need to count the tokens and remove older messages. Are you able to check how many tokens the conversation used before that error occurred?
There's a TODO in BingAIClient. Need to count the tokens and remove older messages. Are you able to check how many tokens the conversation used before that error occurred?
Yes. I now clearly know that when the total number of words I chat exceeds 20,000 Chinese characters, there will be an error. Since a Chinese character generally occupies two tokens, I think there will be an error when it exceeds 40,000 tokens. This problem is easy to reproduce. You send an article with about 40,000 words at once, and I think it will definitely report an error.