Note : All the examples I saw using OpenAI used TS. But I always use JS, so I had to do some research. Here is the working result.
Any feedback appreciated : PeterCLI@hotmail.com