ChatGPT will stop generating text when it’s reached a token limit specified by the user or the maximum token limit set by its model parameters (like 4096 for gpt-3.5-turbo). It also may stop if it encounters an end-of-conversation token during dialogue tasks.