This is the simplest I could get it: still uses the OpenAI npm package and doesn't need streaming:
https://github.com/yisding/gpt-edge-test
If you want to try streaming you can take a look at the readpanda repo.