Blatantly copied code from theseephist's webgen: https://www.val.town/v/thesephist/webgen. Couldn't get streaming to work in valtown myself!!
https://yawnxyz-gettingopenaistreamingtowork.web.val.run
https://esm.town/v/yawnxyz/gettingOpenAiStreamingtoWork
<script type="module" src="https://esm.town/v/yawnxyz/gettingOpenAiStreamingtoWork" />