A TwiML generator using GPT-3 from OpenAI
brew tap twilio/brew && brew install twilio
twilio plugins:install @twilio-labs/plugin-serverless
Setup your environment
From the root of your repository
npm install
npx configure-env
Develop locally
twilio serverless:start
Deploy to dev
twilio serverless:deploy
Deploy to prod
twilio serverless:deploy --production
The main interface currently lives at /index
Use the output from your deploys to locate the full url.
It will look something like:
https://twiliomatic-9999-dev.twil.io/index
Where 9999 is unique to your deploy and environment.
Provides the ability to change modes by environment. keynote
for when it airs. shutdown
to turn things off.
npm run change-mode --mode=keynote --env=production
npm run change-mode --mode=shutdown --env=dev
Update the shutdown
mode favorites. Value is comma separated
npm run set-favorites --gists=ABC123,DEF456 --env=production
Removes all gists for the GITHUB_USER
npm run delete-all-gists
Purges cache for Cloudflare Zone CLOUDFLARE_ZONE_ID
npm run purge-cache
The OpenAI prompts are defined in twiml-prompts
/mode
Returns an object that helps to detect the current state of things
{
"mode": "keynote",
"enabled": true
}
/requester
Allows for a long running query through the use of Sync.
Parameter | Description |
---|---|
Query | (Required intiially) The prompt you'd like to complete |
ID | The ID of the request delivered after the initial Query is ran |
See client side long-query.js and it's usage
There are not too many 😢
npm test