Company
Date Published
Author
Niels Swimberghe
Word count
3394
Language
English
Hacker News points
None

Summary

This tutorial demonstrates how to create an SMS-based chatbot using Twilio's SMS service and OpenAI's ChatGPT API. The chatbot can receive SMS messages from users and respond with answers generated by ChatGPT. To integrate the two services, the application uses ASP.NET Core, Twilio's .NET SDK, and an unofficial OpenAI client library for .NET. The chatbot stores its conversation history in a server session to maintain context and generate more accurate responses. The tutorial also covers how to split long text into shorter messages to comply with Twilio's recommended message length limit of 320 characters.