![]() ![]() Here’s the full code, I’ll explain what it is doing further down. Having built this little bot, I’m no less excited about the potential for building with this API though. It turns out that Node.js requires a bit more code to deal with command line input than Python, so where Greg’s version was 16 lines mine takes 31. (It turns out that Ricky Robinett also had this idea and published his bot code here, it’s pleasing to see how similar the implementations are!) The code I thought I’d start by trying to build the same chatbot but using JavaScript. This was inspired by Greg Baugues’s implementation of a chatbot command line interface (CLI) in 16 lines of Python. With the API available, now is that time. I’ve spent some time playing with ChatGPT in the browser, but the best way to really get on board with these new capabilities is to try building something with it. ![]() ChatGPT has taken the world by storm and this week OpenAI released the ChatGPT API.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |