In this intro episode, we kick things off by talking about how to interact with ChatGPT using PHP. Instead of just getting basic responses back, we're aiming for something cooler—streamed responses, where you see the reply arriving in real-time, and proper conversation context, so the bot actually remembers what you've said before.
You’ll see a demo of a friendly web development bot that can respond to your questions, remember details (like your name!), and stream its answers as they come in. We'll also touch on the fact that out-of-the-box, OpenAI's API doesn't keep track of conversation history, so we’re going to build that in.
Finally, there's a quick look at how streaming works and a mention of wire:stream
—a helpful tool if you want to deal with any live, streamed content in PHP. After running through a few examples, we're ready to get everything set up and start building!
If you’re new, this episode serves as a tour of what you’ll learn and why it’s going to be useful for your own projects.