@Override
    public void endResponse() throws IOException {
        if (RENDER_END_EVENT) {
            generator.writeRaw("event: end\n");
        }
        generator.close();
    }
A Server-Sent Events (SSE) renderer for asynchronous events such as
tokens from a language model.

@author lesters
container-search/src/main/java/com/yahoo/search/rendering/EventRenderer.java