How to stream data from a strapi endpoint (for openai)?

ah i found it, leaving here for anyone doing similar stuff. My controller was wrong, i was awaiting the content, but you can just directly return the promise (bit commented out was before):

 async completion(ctx) {
   
    return await strapi.plugin('openai-assistant').service('assistantService').completion( ctx);
    // const content = await strapi.plugin('openai-assistant').service('assistantService').completion( ctx);
    // ctx.body = { content };
  }