When editing/creating generators which is very long code/thousands of lines of code, the AI will think for almost 30 minutes and finally shows this error:

Sorry, there was an error with the AI helper: Unexpected token ‘<’, "<!DOCTYPE "… is not valid JSON

How to fix this?