
Using Server-Sent Events with PHP to Stream Responses from OpenAI ChatGPT API
In today’s video I upgrade my ChatGPT clone so that it prints out the response token-by-token while still highlighting code in the response. This makes the chatbot feel much faster as it starts to generate the response instantly.
GitHub: https://github.com/unconv/chat-wtf
Support: https://buymeacoffee.com/unconv
Consultations: https://www.buymeacoffee.com/unconv/e/146735
Memberships: https://www.buymeacoffee.com/unconv/membership
00:00 Intro
02:05 PHP Server-Sent Events Demo
11:57 Upgrading the Chatbot: PHP code
18:39 Upgrading the JavaScript code
23:52 Debugging
28:57 Fixing the code highlighting
37:43 It works!
Take the opportunity to connect and share this video with your friends and family if you find it useful.
No Comments