Stream the answer from OpenAI

[ad_1]

Hi @myonlyeye,

I think you might be more interested in the way ChatGPT types its replies (typewriter-style), than actually using the streaming option of OpenAI 🙂

The real streaming option is actually going through line by line. There are multiple issues with this. Right now, the requests are made by the PHP-side, by WordPress, not by the JS client directly (otherwise, everybody could see your API key). So we would need to implement streaming on both end, which is tricky (of course, everything is possible).

Also, you should know that this streaming is made line by line. Not character by character 🙂 In the case of HTML, it will return half-baked HTML which will end-up in broken HTML.

So my question is, do you just like the typewriting effect that ChatGPT does, or you really actually want streaming?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer