I wrote a framework to abstract away a lot of boilerplate code for working with ChatGPT. https://deno.land/x/deno_chat