Content Deep Dive
Build a ChatGPT SMS bot with the OpenAI API and ASP.NET Core
Blog post from Twilio
Post Details
Company
Date Published
Author
Niels Swimberghe
Word Count
3,394
Language
English
Hacker News Points
-
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.