SMS Helper is an AI-powered, function-calling text assistant designed to process and respond to SMS messages. This application is written in Python and hosted through Azure Functions, utilizing Twilio as the SMS texting platform.
- Backend can call external tools to perform various functions, such as scheduling text and phone reminders.
- This functionality is supported through by allowing AI to call flask-automated-reminders.
- Azure Functions allow us to write the backend purely in Python & easily deploy changes.
- Uses Twilio for SMS functionalities and integration.
-
Create an Azure account & create a function with all defaults (Python).
- (Optional) You can also just create using the Azure functions extension on VS code, see step 3.
-
Create required environment variables on your function.
-
In VS Code, install the Azure Functions extension (this will make it way easier).
-
Open the folder where this repo is located.
- (Optional) Edit
__init__.py
code to use alternative helper if you want to send less messages per request. - (Optional) If using the 'schedule reminders' function, edit system message and API call to get the current time and date if you want something different than pacific time.
- (Optional) Edit
-
Go to the extension, and under 'Workspace' click on the little thunder sign and select 'Deploy to existing function...'.
-
Follow the prompts and done. Get your URL endpoint from Azure & load on Twilio.
Follow instructions here to enable updating your Azure function when edits are made on Github repo:
-
Create Twilio account.
-
Go to Phone Numbers > Manage > Active Numbers > Your number > Messaging configuration.
-
Set when a message comes in to use a webhook with your Azure Function endpoint (see image below)
Note: Your endpoint will look like this:
https://YOUR-FUNCTION-NAME.azurewebsites.net/api/sms_helper
- Configure Azure & Twilio
- Create function in Azure
- Deploy
- Load on Twilio
- Text your new SMS bud
The project requires the following dependencies:
azure-functions==1.17.0
twilio==8.10.2
openai==1.3.2
sentry-sdk
Contributions to SMS Helper are welcome. Just submit a pull request and I'll take a look at it.
GPL-3.0 license